:root {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --bg-surface-alt: #f8fafc;
    --bg-topbar: #0f172a;
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --bg-badge: #dbeafe;
    --bg-specs: #f8fafc;
    --bg-input: #ffffff;
    --bg-success: #dcfce7;
    --bg-danger: #fee2e2;
    --bg-dropdown: #ffffff;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #dbeafe;
    --whatsapp: #25d366;
    --whatsapp-hover: #1da851;
    --success: #22c55e;
    --danger: #ef4444;
    
    --header-height: 72px;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-hover: #334155;
    --bg-surface-alt: #1e293b;
    --bg-topbar: #020617;
    --bg-header: #1e293b;
    --bg-card: #1e293b;
    --bg-badge: #1e3a5f;
    --bg-specs: #0f172a;
    --bg-input: #0f172a;
    --bg-success: #064e3b;
    --bg-danger: #7f1d1d;
    --bg-dropdown: #1e293b;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;
    
    --border-color: #334155;
    --border-light: #1e293b;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-light: #1e3a5f;
    --success: #22c55e;
    --danger: #ef4444;
}

/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    padding-top: var(--header-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

body.nav-open {
    overflow: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: 'Inter', sans-serif;
    min-height: 44px;
    touch-action: manipulation;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-whatsapp {
    background: var(--whatsapp);
}

.btn-whatsapp:hover {
    background: var(--whatsapp-hover);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* ---------- HEADER ---------- */
header {
    background: var(--bg-header);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
}

/* ---------- HAMBURGER BUTTON ---------- */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    touch-action: manipulation;
    flex-shrink: 0;
}

.hamburger-menu:hover {
    background: var(--bg-surface-hover);
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- NAV ---------- */
nav ul {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

nav ul li a {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    white-space: nowrap;
    padding: 4px 0;
}

nav ul li a:hover {
    color: var(--accent);
}

nav ul li a.active {
    color: var(--accent);
    font-weight: 600;
}

/* Account Dropdown */
.account-dropdown {
    position: relative;
    display: inline-block;
}

.account-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    min-height: 36px;
    touch-action: manipulation;
}

.account-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.account-btn i {
    font-size: 1rem;
}

.account-btn .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-dropdown);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 200;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.dropdown-menu.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu .dropdown-header {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.dropdown-menu .dropdown-header .welcome-text {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.dropdown-menu .dropdown-header .user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.dropdown-menu .dropdown-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.dropdown-menu .dropdown-item i {
    width: 18px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

.dropdown-menu .btn-login-dropdown {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s ease;
    text-decoration: none;
}

.dropdown-menu .btn-login-dropdown:hover {
    background: var(--accent-hover);
}

.dropdown-menu .btn-register-dropdown {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dropdown-menu .btn-register-dropdown:hover {
    background: var(--bg-surface-hover);
    border-color: var(--accent);
}

.dropdown-menu .dropdown-footer-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 10px;
}

.theme-toggle {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    padding: 0;
    touch-action: manipulation;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--accent);
    color: #fff;
    transform: rotate(20deg);
}

/* ---------- PAGE HEADER ---------- */
.page-header {
    padding: 50px 0 30px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.page-header p {
    color: var(--text-tertiary);
    font-size: 1rem;
    margin-top: 8px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    transition: color 0.3s ease;
}

/* ---------- CONTACT SECTION ---------- */
.contact-section {
    padding: 50px 0 60px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

/* Contact Info */
.contact-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-surface);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.info-item .icon {
    width: 44px;
    height: 44px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

.info-item .content h4 {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.info-item .content p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 0;
    transition: color 0.3s ease;
}

.info-item .content a {
    color: var(--accent);
    transition: color 0.2s ease;
}

.info-item .content a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    background: var(--bg-surface);
    padding: 32px 36px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.contact-form h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.contact-form .form-subtitle {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.form-group label .required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success {
    background: var(--bg-success);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: var(--bg-danger);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert i {
    font-size: 1.1rem;
}

/* ---------- FLOATING WHATSAPP ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--whatsapp);
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    :root {
        --header-height: 64px;
    }
    
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info {
        order: 2;
    }

    .contact-form {
        order: 1;
    }
}

/* ---- Hamburger takes over below 768px ---- */
@media (max-width: 768px) {
    :root {
        --header-height: 58px;
    }

    .hamburger-menu {
        display: flex;
    }

    nav#mainNav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-header);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        padding: 8px 20px 20px;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
        z-index: 150;
    }

    nav#mainNav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    nav#mainNav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
    }

    nav#mainNav ul li {
        width: 100%;
    }

    nav#mainNav ul li a {
        display: block;
        width: 100%;
        padding: 12px 4px;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-light);
    }

    nav#mainNav ul li:has(.account-dropdown),
    nav#mainNav ul li:has(.theme-toggle) {
        border-bottom: none;
        padding: 12px 4px 0;
    }

    .account-dropdown {
        width: 100%;
    }

    .account-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 8px 4px;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 12px 0 0;
        min-width: 100%;
    }

    .theme-toggle {
        margin-top: 4px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 24px 20px;
    }

    .info-item {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 54px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    header .container {
        flex-wrap: nowrap;
    }

    .page-header {
        padding: 30px 0 20px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .contact-form {
        padding: 18px 14px;
    }

    .info-item .icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .whatsapp-float {
        width: 44px;
        height: 44px;
        font-size: 20px;
        bottom: 16px;
        right: 16px;
    }
}