/* --- CSS Reset & Variables --- */
:root {
    /* Color Palette */
    --color-primary: #0B1D3A;
    /* Deep Navy Blue */
    --color-primary-light: #15325C;
    --color-accent: #C5A059;
    /* Premium Gold */
    --color-accent-hover: #D8B368;
    --color-bg-light: #F8F9FA;
    /* Clean White/Gray */
    --color-text-dark: #1E293B;
    --color-text-light: #F8F9FA;

    /* Typography */
    /* El usuario solicitó la tipografía Century Schoolbook */
    --font-heading: 'Century Schoolbook', 'Georgia', serif;
    --font-body: 'Century Schoolbook', 'Georgia', serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Effects */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --shadow-soft: 0 10px 30px rgba(11, 29, 58, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    /* Slightly rounded for elegance */
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text-light);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.7rem 1.8rem;
    font-size: 0.85rem;
}

/* --- Navbar (White/Elegant) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    box-shadow: 0 8px 25px rgba(11, 29, 58, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-img {
    max-height: 110px;
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
    letter-spacing: 2px;
}

.logo-subtext {
    font-size: 0.7rem;
    color: #fff;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--color-primary);
    /* Navy blue on white background */
    font-size: 1rem;
    /* Slightly larger text */
    font-weight: 600;
    /* Bolder text for visibility */
    position: relative;
    opacity: 0.9;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    /* Thicker line */
    bottom: -4px;
    left: 0;
    background-color: var(--color-accent);
    transition: var(--transition-smooth);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.nav-links a:not(.btn):hover {
    color: var(--color-accent);
    opacity: 1;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(11, 29, 58, 0.75), rgba(11, 29, 58, 0.85)),
        url('../assets/hero_bg_real.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 5rem;
}

.hero-text-box {
    max-width: 800px;
}

.hero .subtitle {
    color: var(--color-accent);
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 50px;
    display: inline-block;
    font-weight: 500;
}

.hero .subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 40px;
    height: 1px;
    background-color: var(--color-accent);
}

.hero h1 {
    font-size: 5rem;
    color: var(--color-text-light);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero .description {
    color: #cbd5e1;
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

/* --- Hamburger Menu Button --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 4px 0;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 2px;
}

/* Hamburger → X animation */
.hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 360px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 1000;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.25rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 0.85rem;
        padding-left: 35px;
    }

    .hero .subtitle::before {
        width: 25px;
    }

    .hero .description {
        font-size: 1.05rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .about-text h2 {
        font-size: 2rem;
    }

    .stats-grid {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

/* Mobile overlay (backdrop oscuro) */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* --- Whatsapp Floating Button --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* Esquina inferior izquierda para no chocar con el scroll-top */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: currentColor;
    margin-left: 2px;
    margin-bottom: 2px;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 2px 2px 15px rgba(37, 211, 102, 0.5);
    color: white;
}

/* Pulsing Animation for WhatsApp */
.whatsapp-float::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #25d366;
    border-radius: 50%;
    z-index: -1;
    animation: pulse-wa 2s infinite;
}

@keyframes pulse-wa {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* --- Scroll to Top Button --- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: var(--color-primary);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 900;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-accent);
    transform: translateY(-3px);
}

/* --- Animations --- */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- General Sections & Utilities --- */
.section {
    padding: var(--spacing-xl) 0;
}

.bg-light {
    background-color: #f1f5f9;
}

.section-header {
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
}

.text-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.subtitle {
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.section-header p {
    color: #64748b;
    font-size: 1.15rem;
    line-height: 1.6;
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

@media (max-width: 768px) {
    .services-grid {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        height: 70vh;
        /* Barra de desplazamiento vertical */
        scroll-snap-type: y mandatory;
        padding-bottom: 2rem;
        border-radius: 8px;
        scroll-behavior: smooth;
        /* Ocultar barra scroll nativa */
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
        /* Dejar espacio para los puntos */
        padding-right: 25px;
    }

    /* Paginador de puntos lateral */
    .services-dot-nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 12px;
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.7);
        padding: 15px 8px;
        border-radius: 20px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        z-index: 10;
        backdrop-filter: blur(5px);
    }

    .services-dot-nav .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: transparent;
        border: 1px solid #94a3b8;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .services-dot-nav .dot.active {
        width: 10px;
        height: 10px;
        background-color: transparent;
        border: 2px solid var(--color-accent);
    }

    .services-grid::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari and Opera */
    }

    .service-card {
        scroll-snap-align: start;
        flex-shrink: 0;
    }
}

.service-card {
    background: #ffffff;
    padding: 3rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 10px 15px rgba(0, 0, 0, 0.03);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(11, 29, 58, 0.08);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    background-color: rgba(197, 160, 89, 0.1);
    border-radius: 50%;
    color: var(--color-primary);
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
    background-color: var(--color-primary);
    color: var(--color-accent);
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.service-card p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- About Us --- */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.8rem;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: #475569;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.stats-grid {
    display: flex;
    gap: 3.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--color-accent);
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.8rem;
    font-weight: 500;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    object-fit: cover;
    height: 550px;
    transition: var(--transition-smooth);
}

.about-image:hover img {
    transform: scale(1.02);
}

@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
    }
}

/* --- Footer --- */
.footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: var(--spacing-xl) 0 2rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    display: inline-block;
    background-color: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.social-links {
    margin-top: 2.2rem;
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

.social-links a {
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--color-accent);
    transform: translateY(-3px);
}

.footer-logo .logo-img {
    max-height: 60px;
    /* Slightly smaller in footer to keep balance */
}

.footer-desc {
    color: #cbd5e1;
    margin-top: 1.5rem;
    max-width: 350px;
    line-height: 1.8;
}

.footer-heading {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.footer-contact,
.footer-link {
    display: block;
    color: #cbd5e1;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-contact a:hover,
.footer-link:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}