/* ============================
    Variables y reset
    ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --aynicoin-yellow: #F7B410;
    --aynicoin-blue: #181A99;
    --light-bg: #F8F9FA;
    --text-dark: #1f254d;
    --gradient: linear-gradient(135deg, var(--aynicoin-blue) 0%, var(--aynicoin-yellow) 100%);
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Arial', sans-serif;
    background: white;
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #eee;
}
::-webkit-scrollbar-thumb {
    background: var(--aynicoin-yellow);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #df9e0f;
}

/* ============================
    Loader
    ============================ */
.loader {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.4s ease;
}
.loader.hidden {
    opacity: 0;
    visibility: hidden;
}
.loader-logo, .loader img {
    max-width: 160px;
    animation: pulse 2s infinite alternate;
}
@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* ============================
    Navbar
    ============================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 0.75rem 0;
}
.navbar.scrolled {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.logo img { /* Selector específico para el logo del HEADER */
    height: 65px; /* Puedes ajustar este valor para el logo de la cabecera */
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.75rem;
    align-items: center;
}
.nav-link {
    position: relative;
    text-decoration: none;
    color: var(--aynicoin-blue);
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.25s ease;
}
.nav-link.active,
.nav-link:hover {
    color: var(--aynicoin-yellow);
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width .3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hamburger (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--aynicoin-blue);
    border-radius: 2px;
    transition: all .3s ease;
}

/* ============================
    Hero / Slider
    ============================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}
.hero-slider {
    position: absolute;
    inset: 0;
}
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
}
.slide.active {
    opacity: 1;
    z-index: 1;
}
.slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}
.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 0;
}
.slide-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    padding: 1.5rem 2rem;
    color: white;
}
.slide-content h2 {
    font-size: 2.8rem;
    margin-bottom: .75rem;
    line-height: 1.1;
}
.slide-content p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}
.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: var(--aynicoin-yellow);
    color: var(--aynicoin-blue);
    font-weight: 700;
    border: 2px solid var(--aynicoin-yellow);
    border-radius: 50px;
    text-decoration: none;
    transition: all .3s ease;
}
.cta-button:hover {
    background: white;
    color: var(--aynicoin-blue);
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.15);
}

/* Slider controls */
.slider-controls {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}
.slider-controls button {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s ease;
}
.slider-controls button svg path {
    fill: white;
}
.slider-controls button:hover {
    background: rgba(255,255,255,0.5);
}

/* ============================
    Secciones
    ============================ */
.section {
    padding: 90px 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.about {
    background: var(--light-bg);
}
.about-content {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.about-text {
    flex: 1;
    min-width: 280px;
}
.about-text p {
    margin-bottom: 1rem;
}
.about-video {
    flex: 1;
    min-width: 280px;
}
.about-video iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.08);
}

/* Misión */
.mision {
    background: white;
}
.mision-container {
    max-width: 1200px;
    margin: 0 auto;
}
.mision-content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}
.mision-image {
    flex: 1;
    min-width: 260px;
}
.mision-image img {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}
.mision-text {
    flex: 1;
    min-width: 260px;
}
.mision-text .section-title {
    text-align: left;
}
.mision-text p {
    margin-bottom: 0.75rem;
}
.mision-text strong {
    color: var(--aynicoin-yellow);
}

/* Servicios */
.services {
    background: var(--light-bg);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 1.75rem;
}
.service-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    transition: transform .3s ease, box-shadow .3s ease;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}
.service-icon {
    width: 70px;
    margin-bottom: 1rem;
}
.service-card h3 {
    margin: .75rem 0;
    color: var(--aynicoin-blue);
}
.service-card p {
    font-size: .95rem;
    color: #555;
}

/* Stats */
.stats {
    background: var(--aynicoin-blue);
    color: white;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 1.5rem;
    text-align: center;
}
.stat-item h3 {
    font-size: 2.8rem;
    margin-bottom: .5rem;
    color: var(--aynicoin-yellow);
}
.stat-item p {
    font-size: .95rem;
    opacity: .9;
}

/* Roadmap */
.roadmap {
    background: var(--light-bg);
}
.roadmap-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 0;
}
.roadmap-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: var(--gradient);
    border-radius: 3px;
}
.roadmap-item {
    position: relative;
    background: white;
    border-radius: 15px;
    padding: 1.75rem;
    margin: 2rem 0;
    box-shadow: 0 25px 60px rgba(0,0,0,0.07);
    width: 45%;
}
.roadmap-item:nth-child(odd) {
    left: 0;
}
.roadmap-item:nth-child(even) {
    left: 55%;
}
.roadmap-item::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    background: var(--aynicoin-yellow);
    border-radius: 50%;
    transform: translateY(-50%);
}
.roadmap-item:nth-child(odd)::before {
    right: -9px;
}
.roadmap-item:nth-child(even)::before {
    left: -9px;
}
.roadmap-item h4 {
    margin-bottom: .75rem;
    color: var(--aynicoin-yellow);
}

/* Footer - Corregido y Final */
.footer {
    background: var(--aynicoin-blue);
    color: white;
    padding: 3rem 1rem;
}

.footer-grid-exact { /* Contenedor principal del footer */
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* Tres columnas: izquierda (más ancha), centro, derecha */
    gap: 2rem; /* Espacio entre las columnas */
    align-items: flex-start; /* Alinea el contenido de las columnas en la parte superior */
}

.footer-col-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Alinea el contenido de esta columna a la izquierda */
}

.footer-col-left .footer-logo { /* Selector específico para el logo del FOOTER */
    height: 100px; /* Puedes ajustar este valor para el logo del footer */
    margin-bottom: .5rem;
}

.footer-col-left p {
    font-size: .9rem;
    margin-top: .25rem;
}

.footer-col-middle,
.footer-col-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Alinea el contenido de estas columnas a la izquierda */
}

.footer-col-middle h3,
.footer-col-right h3 {
    color: var(--aynicoin-yellow);
    margin-bottom: .75rem;
}

.footer-col-middle ul {
    list-style: none;
    padding: 0;
}

.footer-col-middle li {
    margin-bottom: .5rem;
}

.footer-col-middle a {
    color: #e6e6e6;
    text-decoration: none;
    transition: color .2s ease;
}

.footer-col-middle a:hover {
    color: var(--aynicoin-yellow);
}

.footer-col-right .social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon img {
    width: 32px;
    height: 32px;
    display: block;
    filter: brightness(1);
    transition: transform .2s ease;
}

.social-icon:hover img {
    transform: scale(1.1);
}

/* WhatsApp flotante */
.whatsapp-btn {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 1500;
    width: 60px;
    height: 60px;
}
.whatsapp-btn img {
    width: 100%;
    height: 100%;
}

/* Redes sociales flotantes */
.social-floating {
    position: fixed;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1200;
}
.social-icon-floating {
    width: 45px;
    height: 45px;
    display: block;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform .25s ease;
}
.social-icon-floating img {
    width: 100%;
    height: 100%;
}
.social-icon-floating:hover {
    transform: scale(1.08);
}

/* Popup de contacto */
.popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    z-index: 2000;
}
.popup.active {
    display: flex;
}
.popup-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    position: relative;
    box-shadow: 0 40px 90px rgba(0,0,0,0.08);
}
.close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #555;
}
.popup-header h3 {
    margin-bottom: .5rem;
}
.popup-header p {
    margin-bottom: 1rem;
    font-size: .9rem;
}
.contact-form .form-group {
    margin-bottom: 1rem;
}
.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: .9rem;
    resize: vertical;
}
.submit-btn {
    background: var(--aynicoin-yellow);
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    color: var(--aynicoin-blue);
    margin-top: 5px;
    transition: all .3s ease;
}
.submit-btn:hover {
    background: #e0a50f;
}

/* Animaciones fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all .6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .about-content, .mision-content {
        flex-direction: column;
    }
    .roadmap-item {
        width: 100%;
        left: 0 !important;
        padding-left: 40px;
        margin: 1.5rem 0;
    }
    .roadmap-timeline::before {
        left: 20px;
    }
    .roadmap-item:nth-child(odd)::before, .roadmap-item:nth-child(even)::before {
        left: 10px;
        right: auto;
    }
}

@media (max-width: 900px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        padding: 2rem 0;
        gap: 1rem;
        transition: left .3s ease;
    }
    .nav-menu.active {
        left: 0;
    }
    .hamburger {
        display: flex;
    }
    .slide-content h2 {
        font-size: 2rem;
    }
    .slide-content p {
        font-size: 1rem;
    }
    .slider-controls {
        display: none;
    }
}

@media (max-width: 600px) {
    .stat-item h3 {
        font-size: 2rem;
    }
    .footer-grid-exact { /* Para móviles, apilamos las columnas */
        grid-template-columns: 1fr;
        text-align: center;
        align-items: center;
    }
    .footer-col-left,
    .footer-col-middle,
    .footer-col-right {
        align-items: center; /* Centra el contenido de las columnas */
    }
    .footer-col-left p {
        margin-top: 1rem;
    }
}