:root {
    /* Base Color Tokens */
    --primary: #0056b3;
    --primary-dark: #003d82;
    --secondary: #FF5E00;
    --dark: #0A0A0B;
    --dark-light: #161618;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --container: 1200px;

    /* Theme Variables - LIGHT (Default) */
    --bg-body: var(--white);
    --bg-section: var(--light);
    --bg-card: var(--white);
    --bg-footer: var(--dark);
    --text-main: var(--dark);
    --text-body: #334155;
    --text-muted: #64748B;
    --header-bg: transparent;
    --header-scrolled: rgba(255, 255, 255, 0.95);
    --header-text: var(--dark);
    --nav-link: rgba(0, 0, 0, 0.7);
    --nav-link-hover: var(--primary);
    --glass: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --bg-cta: var(--primary);
    --text-cta: var(--white);
    --btn-outline: var(--primary);
    --transition: all 0.3s ease;
}

body.dark-mode {
    /* Theme Variables - DARK (Deep Blue/Arctic) */
    --bg-body: #050c1a;
    --bg-section: #0a162b;
    --bg-card: #0f1d3a;
    --bg-footer: #030812;
    --text-main: var(--white);
    --text-body: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.5);
    --header-bg: transparent;
    --header-scrolled: rgba(5, 12, 26, 0.95);
    --header-text: var(--white);
    --nav-link: rgba(255, 255, 255, 0.85);
    --nav-link-hover: var(--secondary);
    /* Orange highlight for contrast in blue dark mode */
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --bg-cta: #0046ad;
    /* Lighter/France Blue for Dark Mode contrast */
    --text-cta: var(--white);
    --btn-outline: var(--white);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1,
h2,
h3,
.logo-text {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    padding: 1rem 0;
    transition: all 0.4s ease;
    background: var(--header-bg);
}

header.scrolled {
    background: var(--header-scrolled);
    backdrop-filter: blur(10px);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 120px;
    /* Ajusta este valor si necesitas que el logo sea más grande o pequeño */
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

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

nav ul li a {
    color: var(--nav-link);
    font-weight: 500;
    font-size: 1.25rem;
}

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

.nav-social-mobile {
    display: none;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    margin-left: 1.5rem;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.theme-toggle .icon-dark {
    display: none;
}

body.dark-mode .theme-toggle .icon-light {
    display: none;
}

body.dark-mode .theme-toggle .icon-dark {
    display: block;
}

/* Brillo para legibilidad del logo en modo oscuro */
body.dark-mode .logo-img {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10001;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #25D366;
    /* WhatsApp Green */
    color: var(--white);
    padding: 1.2rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.btn-secondary:hover {
    background: #128C7E;
    transform: translateY(-3px);
}

.btn-outline {
    border: 1px solid var(--btn-outline);
    color: var(--btn-outline) !important;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
}

.btn-outline:hover {
    background: var(--btn-outline);
    color: var(--bg-body) !important;
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.btn-link {
    color: var(--white);
    font-weight: 600;
    margin-left: 2rem;
    border-bottom: 2px solid transparent;
}

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

.btn-card {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-card:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.2);
}

/* Hero Section */
#hero {
    height: 100vh;
    min-height: 700px;
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow: hidden;
    padding-top: 220px;
    /* Account for fixed header with larger logo */
}

.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    z-index: 1;
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--bg-body) 10%, transparent 100%);
}

body.dark-mode .hero-image img {
    opacity: 0.6;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

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

.badge {
    display: inline-block;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-weight: 800;
}

#hero p {
    font-size: 1.25rem;
    color: var(--text-body);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.stat strong {
    display: block;
    font-size: 1.8rem;
    font-family: 'Montserrat';
    color: var(--primary);
}

.stat span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Services */
#servicios {
    padding: 100px 0;
    background: var(--bg-section);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.service-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.service-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.service-card ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.service-card ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.service-card ul li::before {
    content: '→';
    color: var(--primary);
    font-weight: bold;
}

/* Testimonials */
#testimonios {
    padding: 100px 0;
    background: var(--bg-body);
}

.google-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.google-rating .stars {
    color: #FBBC05;
    font-size: 1.5rem;
}

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

.testimonial-card {
    background: var(--bg-section);
    padding: 2.5rem;
    border-radius: 20px;
    position: relative;
    border: 1px solid var(--glass-border);
}

.testimonial-card p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text);
}

.author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.author strong {
    display: block;
}

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

/* About */
#nosotros {
    padding: 100px 0;
    background: var(--bg-section);
    color: var(--text-body);
}

#nosotros h2 {
    color: var(--text-main);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.feature {
    background: var(--glass);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.info-box {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.info-box h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Contact CTA */
#contacto {
    padding: 100px 0;
    background: var(--bg-body);
}

.cta-box {
    background: var(--bg-cta);
    color: var(--text-cta);
    padding: 5rem 2rem;
    border-radius: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.cta-box h2 {
    color: var(--text-cta);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 80px 0 30px;
    border-top: 1px solid var(--glass-border);
}

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

.footer-brand p {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.footer-contact p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-instagram a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    transition: var(--transition);
}

.footer-instagram a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    #hero h1 {
        font-size: 3rem;
    }

    .hero-image {
        width: 100%;
        opacity: 0.4;
    }

    .hero-image::after {
        background: radial-gradient(circle, transparent 0%, var(--dark) 70%);
    }

    .about-wrapper {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {

    header {
        padding: 0.5rem 0;
    }

    header.scrolled {
        padding: 0.4rem 0;
    }

    .logo-img {
        height: 70px;
    }

    .theme-toggle {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 1.5rem;
        padding: 0.5rem;
    }

    [data-theme='dark'] .logo-img {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 11, 0.98);
        backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: all 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
        z-index: 10000;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    nav ul li a {
        font-size: 1.5rem;
        color: var(--white);
    }

    .nav-social-mobile {
        display: block;
        margin-top: 1rem;
        border-top: 1px solid var(--glass-border);
        padding-top: 1.5rem;
    }

    .header-cta {
        display: none;
    }

    #hero {
        padding-top: 260px;
    }

    #hero h1 {
        font-size: 2.2rem;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
        justify-content: center;
    }

    .stat {
        text-align: center;
    }

    .cta-box h2 {
        font-size: 2rem;
    }

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

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