*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --black: #000000;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --red-500: #ef4444;
}

html {
    scroll-behavior: smooth;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-fade-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.animate-fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-fade-right.animated {
    opacity: 1;
    transform: translateX(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-900);
    text-decoration: none;
}

.logo-mark {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--indigo-600), var(--indigo-500));
    color: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

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

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

.nav-cta {
    background: var(--indigo-600);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-cta:hover {
    background: var(--indigo-700);
}

.nav-login {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-login:hover {
    color: var(--indigo-600);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* ===== MAIN CONTENT ===== */
main {
    padding-top: 4rem;
}

/* ===== CONTACT HERO ===== */
.contact-hero {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    padding: 4rem 1.5rem 2rem;
    text-align: center;
}

.contact-hero-inner {
    max-width: 48rem;
    margin: 0 auto;
}

.contact-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.contact-hero p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 36rem;
    margin: 0 auto;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 3rem 1.5rem 5rem;
}

.contact-container {
    max-width: 72rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

/* Contact Info */
.contact-info {
    padding: 2rem 0;
}

.contact-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: var(--gray-50);
    transform: translateX(5px);
}

.contact-item-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--indigo-600), var(--indigo-500));
    color: white;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-item:hover .contact-item-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.contact-item-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.contact-item-content p,
.contact-item-content a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9375rem;
}

.contact-item-content a:hover {
    color: var(--indigo-600);
}

/* Quick Subjects */
.quick-subjects {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.quick-subjects h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.quick-subject-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    border-radius: 2rem;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.quick-subject-btn:hover {
    background: var(--indigo-600);
    color: white;
    border-color: var(--indigo-600);
}

.quick-subject-btn.active {
    background: var(--indigo-600);
    color: white;
    border-color: var(--indigo-600);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.contact-form-wrapper:hover {
    box-shadow: 0 20px 60px -15px rgba(99, 102, 241, 0.2);
}

.contact-form-wrapper h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--gray-900);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

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

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--indigo-600);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    background: var(--indigo-700);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* Flash messages */
.flash-message {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.flash-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gray-900);
    color: #fff;
    padding: 4rem 2rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        order: 2;
        padding: 2rem;
        background: var(--gray-50);
        border-radius: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        position: relative;
        z-index: 1000;
    }

    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        flex-direction: column;
        padding: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        margin-bottom: 1rem;
        list-style: none;
        padding: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        width: 100%;
        border-radius: 0.5rem;
        transition: background 0.2s;
    }

    .nav-links a:hover {
        background: var(--gray-100);
    }

    .nav-cta, .nav-login {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
        position: relative;
    }

    .contact-hero h1 {
        font-size: 2rem;
    }

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

    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
