:root {
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --accent: #f59e0b;
    --bg: #ffffff;
    --fg: #0f172a;
    --text-muted: #64748b;
    --border: #f1f5f9;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --bg: #0f172a;
    --fg: #f8fafc;
    --text-muted: #94a3b8;
    --border: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    background-color: var(--bg);
}

[data-theme="dark"] header {
    background: rgba(15, 23, 42, 0.8);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo .dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--fg);
}

.theme-toggle {
    background: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: 0.3s;
}

.theme-toggle:hover {
    background: var(--border);
    color: var(--primary);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--fg);
    cursor: pointer;
}

/* Alert System */
.alert {
    position: fixed;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 1rem;
    z-index: 9999;
    font-weight: 600;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    animation: slideDown 0.5s ease forwards;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: opacity 0.5s ease;
}

.alert-success {
    background: #10b981;
    color: white;
}

.alert-error {
    background: #ef4444;
    color: white;
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    background: var(--border);
    border-radius: 2rem;
    padding: 0.25rem 0.5rem 0.25rem 1rem;
    margin: 0 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

[data-theme="dark"] .search-form { background: rgba(255,255,255,0.05); }

.search-form:focus-within {
    background: var(--bg);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-input {
    background: none;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--fg);
    width: 140px;
    transition: width 0.3s ease;
}

.search-input::placeholder { color: var(--text-muted); opacity: 0.7; }
.search-input:focus { width: 220px; }

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.search-btn:hover { color: var(--primary); }

/* Footer */
footer {
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

/* Custom Forms */
.custom-form-container {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s ease;
}

[data-theme="dark"] .custom-form-container {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
}

.custom-form-container:hover {
    box-shadow: var(--card-shadow-hover);
}

.custom-form-container h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
    position: relative;
    padding-bottom: 0.75rem;
}

.custom-form-container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3rem;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.custom-form .form-group {
    margin-bottom: 1.5rem;
}

.custom-form label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.custom-form .form-control {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: 0.85rem;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

[data-theme="dark"] .custom-form .form-control {
    background: rgba(15, 23, 42, 0.6);
}

.custom-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    background: var(--bg);
}

.custom-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.custom-form .btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.85rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    margin-top: 1rem;
}

.custom-form .btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.custom-form .btn-primary:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .custom-form-container {
        padding: 1.5rem;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.8fr 0.8fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.footer-logo { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; display: block; }
.footer-desc { color: var(--text-muted); max-width: 320px; line-height: 1.6; font-size: 0.9rem; }
.footer-heading { font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--fg); margin-bottom: 1.5rem; display: block; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: var(--text-muted); font-size: 0.875rem; }
.footer-links a:hover { color: var(--primary); }

.newsletter-box {
    background: var(--border);
    padding: 3rem;
    border-radius: 1.5rem;
    text-align: center;
    margin-bottom: 4rem;
}
.newsletter-box h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.newsletter-box p { color: var(--text-muted); margin-bottom: 1.5rem; }
.newsletter-form { display: flex; max-width: 500px; margin: 0 auto; gap: 0.5rem; }
.newsletter-input { 
    flex: 1; 
    padding: 0.8rem 1.2rem; 
    border-radius: 0.75rem; 
    border: 1px solid transparent;
    outline: none;
}
.newsletter-btn {
    background: var(--fg);
    color: var(--bg);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.bottom-bar {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .nav-links { 
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 2rem;
        display: none;
        z-index: 999;
    }
    .nav-links.active { display: flex; }
    .menu-btn { display: block; }
    .search-form { margin: 1rem 0; width: 100%; justify-content: space-between; }
    .search-input { width: 100% !important; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .newsletter-form { flex-direction: column; }
}
