/* Fonts */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/montserrat.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/montserrat.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('assets/fonts/montserrat.woff2') format('woff2');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('assets/fonts/opensans.woff2') format('woff2');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/opensans.woff2') format('woff2');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/opensans.woff2') format('woff2');
}

:root {
    --primary-color: #1e293b;
    /* Modern Slate */
    --accent-color: #2563eb;
    /* Royal Blue Modern */
    --accent-hover: #1d4ed8;
    --text-dark: #0f172a;
    --text-muted: #475569;
    --bg-light: #ffffff;
    --bg-alt: #f8fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --transition: cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

.bg-alt {
    background-color: var(--bg-alt) !important;
}

h1,
h2,
h3,
h4,
.serif {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

h1 {
    font-size: 3.2rem;
}

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

/* Header */
header {
    background: var(--white);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.4rem;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    padding: 0.5rem;
    /* Better tap target for best practices */
}

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

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    z-index: 2000;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Hero */
.hero {
    padding: 8rem 0;
    background: var(--primary-color);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 20%, transparent 100%);
    z-index: 1;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.2rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero span {
    color: var(--accent-color);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: var(--white) !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.btn:hover {
    background: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.btn-accent {
    background: var(--accent-color);
}

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

.hero-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.6;
    filter: brightness(0.9) contrast(1.1);
    z-index: 0;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
    padding: 4rem 0;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.faq-question {
    width: 100%;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--accent-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding-bottom: 1.5rem;
}

.faq-answer p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* FAQ Section */
#faq {
    margin-top: 18rem;
}

/* Sections */
section {
    padding: 10rem 0;
}

.trayectoria-grid {
    grid-template-columns: 1.2fr 1fr !important;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
}

.section-title h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--accent-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Quien Soy */
#quien-soy {
    scroll-margin-top: 100px;
    margin-top: 12rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-img img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    object-position: top center;
    border-radius: 4px;
    /* Suave redondeo en lugar de marcos */
    transition: var(--transition);
}

.about-img img:hover {
    transform: scale(1.02);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 3rem;
    border: 1px solid #eee;
    transition: var(--transition);
    border-radius: 4px;
}

.service-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Testimonials */
.testimonials {
    background: var(--bg-alt);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 4px;
    border-top: 4px solid var(--accent-color);
}

/* Contact Form */
.contact-form-container {
    background: var(--white);
    padding: 3rem;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    border-radius: 4px;
}

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

.form-control {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    border-radius: 4px;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.checkbox-group input {
    margin-top: 5px;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    line-height: 1.4;
    color: var(--text-dark);
    /* Improved contrast */
}

.checkbox-group label a {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Cookie Banner (Badagine Style) */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 20px;
    right: 20px;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 1.5rem;
    transition: bottom 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 8px;
    border: 1px solid #eee;
}

.cookie-banner.active {
    bottom: 20px;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cookie-buttons {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.7rem 1.4rem;
    font-size: 0.85rem;
    border-radius: 4px;
    font-weight: 600;
}

.btn-outline {
    background: #ffffff;
    color: var(--accent-color) !important;
    border: 2px solid var(--accent-color);
    font-weight: 700;
}

.btn-outline:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff !important;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 6rem 0 2rem;
}

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

.footer-contact a:hover {
    color: var(--accent-color) !important;
    text-decoration: underline !important;
}

.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s ease;
        z-index: 1500;
        gap: 2.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .about-grid,
    .footer-grid,
    .testimonial-grid,
    .trayectoria-grid {
        grid-template-columns: 1fr !important;
        gap: 4rem;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero-img {
        display: none;
    }

    .hero::after {
        display: none;
    }

    .contact-form-container {
        padding: 2rem;
    }

    .cookie-banner {
        bottom: -100%;
        left: 10px;
        right: 10px;
        padding: 1.2rem;
    }

    .cookie-banner.active {
        bottom: 10px;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1.2rem;
    }

    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
}