/* Base Styles - Ajustada a la paleta del Logo */
:root {
    --primary: #5A8F70;      /* Verde terroso más neutro del logo */
    --primary-dark: #436B53; /* Verde más profundo para contrastar texto */
    --secondary: #90B4CE;    /* Azul hortensia claro tomado del logo */
    --accent: #F4F6EB;       /* Un crema muy sutil en lugar de un azul frío */
    --background: #FCFDFB;   /* Blanco cálido en lugar de blanco frío */
    --white: #FFFFFF;
    --text-main: #3D4A43;    /* Gris verdoso muy oscuro y cálido */
    --text-muted: #7E8D86;
    --danger: #D96C6C;       /* Rojo desaturado, más elegante */
    --border: #E8EDE9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 20px;
}

.bg-light {
    background-color: var(--white);
}

/* Typography */
h1,
h2,
h3 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 110px;
}

.logo {
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
}

.main-logo {
    position: fixed;
    top: 8px;
    left: 20px;
    width: 95px;
    height: 95px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: white;
    padding: 4px;
    transition: transform 0.3s ease;
    z-index: 1050;
}

.main-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin-left: 140px;
    /* Evita que el primer link se esconda debajo del nuevo logo fijo de 130px de ancho */
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
}

.nav-links a:hover {
    color: var(--primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
}

.sidebar-header .user-avatar {
    width: 60px;
    height: 60px;
    background-color: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 15px;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-sm);
    overflow: hidden; /* IMPORTANTE para que el logo .jpeg no se salga del círculo */
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    display: block;
}

.hero-buttons {
    display: none;
}

.hero-btn-overlay {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    background: rgba(90, 143, 112, 0.85);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    text-decoration: none;
}

.hero-btn-overlay:hover {
    background: rgba(90, 143, 112, 0.95);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Legacy - kept for compatibility */
.hero-btn-special {
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: bounce 2s infinite;
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 159, 112, 0.3);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--primary);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card h3 {
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Abstract Image Details */
.section-image {
    position: relative;
}

.image-placeholder {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.image-placeholder img {
    width: 100%;
    height: auto;
    display: block;
}

.glass-orb {
    position: absolute;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
    z-index: 1;
    top: -30px;
    left: -30px;
}

.orb-2 {
    bottom: -30px;
    right: -30px;
    top: auto;
    left: auto;
    background: var(--secondary);
}

/* Features Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-bottom: 4px solid transparent;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--primary-dark);
}

/* Logros Section */
.logros-section {
    position: relative;
    overflow: hidden;
}

.logros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.logro-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--secondary);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.logro-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--primary);
}

.logro-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.logro-card h3 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.logro-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.logro-card ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
}

.logro-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Marquee / Asociados */
.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    padding: 20px 0;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.marquee {
    display: inline-block;
    animation: scroll-left 40s linear infinite;
}

.asociado-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    margin: 0 15px;
    background: var(--accent);
    border-radius: 50px;
    font-weight: 600;
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.asociado-item img {
    height: 40px;
    width: auto;
    max-width: 100px;
    /* Para que logotipos muy horizontales no ocupen demasiado */
    object-fit: contain;
    border-radius: 4px;
    /* Las marcas se ven mejor con un sutil redondeado en vez de un circulo completo */
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Footer */
.footer {
    background-color: var(--text-main);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
    margin-bottom: 20px;
}

.footer-contact {
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact h4 {
    color: var(--white);
    font-weight: 600;
}

.footer-contact a:hover {
    color: var(--white);
}

.footer-brand h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Utilidades */
.mobile-only {
    display: none;
}

/* =============================================
   RESPONSIVE - TABLET (max 1024px)
   ============================================= */
@media (max-width: 1024px) {
    .section {
        padding: 70px 0;
    }

    .section-grid {
        gap: 40px;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 3rem;
    }
}

/* =============================================
   RESPONSIVE - MOBILE (max 768px)
   ============================================= */
@media (max-width: 768px) {

    /* Prevent horizontal overflow globally */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    /* ---- Nosotros: Misión y Visión en una columna en móvil ---- */
    #nosotros div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* ---- NAVBAR ---- */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 110px;
        left: -100%;
        width: 100%;
        margin-left: 0;
        background-color: var(--white);
        box-shadow: var(--shadow-md);
        padding: 20px 0;
        transition: left 0.3s ease;
        z-index: 999;
    }

    .main-logo {
        width: 80px;
        height: 80px;
        left: 10px;
        top: 15px;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        text-align: center;
        margin: 8px 0;
    }

    .mobile-only {
        display: block;
    }

    .nav-actions {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* ---- HERO ---- */
    .hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        margin-bottom: -30px;
    }

    .hero-btn-special {
        font-size: 0.9rem;
        padding: 10px 22px;
    }

    /* ---- SECTIONS ---- */
    .section {
        padding: 50px 0;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .section-image {
        margin-top: 10px;
        order: -1; /* Show image before text on mobile */
    }

    /* ---- IMAGE PLACEHOLDER ---- */
    .image-placeholder {
        /* aspect-ratio ya definido: escala auto con el ancho del contenedor */
        border-radius: 14px;
    }

    /* Glass orbs: hide on very small screens to avoid overflow */
    .glass-orb {
        display: none;
    }

    /* ---- CARDS ---- */
    .card {
        padding: 20px;
        border-radius: 12px;
        /* Disable hover transform on touch devices */
        transform: none !important;
    }

    /* ---- GRID-3 (Benefits) ---- */
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 30px 20px;
    }

    /* ---- LOGROS ---- */
    .logros-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* ---- MARQUEE / ASOCIADOS ---- */
    .marquee-container {
        border-radius: 10px;
    }

    .asociado-item {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .asociado-item img {
        height: 30px;
    }

    /* ---- FOOTER ---- */
    .footer {
        padding: 40px 0 15px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 25px;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .footer-brand h3 {
        font-size: 1.4rem;
    }

    .footer-brand p {
        margin: 0 auto;
    }

    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-contact a {
        justify-content: center !important;
    }

    .footer-bottom p {
        font-size: 0.8rem;
        padding: 0 15px;
    }
}

/* =============================================
   RESPONSIVE - SMALL MOBILE (max 480px)
   ============================================= */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .main-logo {
        width: 70px;
        height: 70px;
        top: 20px;
    }
}