/* Asegurarnos de que la fuente Montserrat esté correctamente importada */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap&subset=latin,latin-ext');
@import url('https://fonts.googleapis.com/css2?family=Merriweather+Sans:wght@400;700;800&display=swap&subset=latin,latin-ext');
/* Variables */
:root {
    --primary-color: #1B2D72;
    --secondary-color: #FDD97E;
    --tertiary-color: #AA0000;
    --quaternary-color: #A05F3C;
    --background-color: #FFFFFB;
    --background-color-card:#EEE4E4;
    --color-text-card: #2E2A25;
    --button-hero-color:#62D9F4;
    --button-hero-color-hover:#68f2ff;
    --button-know-more-color:#0F6CBD;
    --button-know-more-color-hover:#0e5899;
    --white: #fff;
    --gray:#E0D8D7;
    --gray-200:#DCDEE3;
    --gray-300: #CCCFD8;
    --text-color: #333;
    --light-text: #666;
    --max-width: 1200px;
    --header-height: 80px;
    --section-padding: 4rem;
    --border-radius: 8px;
    --transition: 0.3s ease;
    --font-family-title: 'Merriweather Sans', sans-serif;
    --font-family-text: 'Montserrat', sans-serif;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-color);
    font-family: var(--font-family-title);
    /* line-height: 1.6; */
    /* color: var(--text-color); */
    overflow-x: hidden; /* Previene scroll horizontal durante la animación del menú */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    width: 100%;
    /* max-width: var(--max-width); */
    margin: 0 auto;
    padding: 0 20px;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Header y Navegación - Mobile First */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    height: var(--header-height);
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 1rem;
    padding: 0 1rem;
}

.logo {
    flex-shrink: 0; /* Evita que el logo se encoja */
}

.logo img {
    height: 70px;
    display: block;
}

/* Menú Hamburguesa - Solo visible en móvil */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    margin-left: auto; /* Empuja el botón a la derecha */
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    background: var(--primary-color);
    height: 2px;
    width: 24px;
    transition: var(--transition);
}

.hamburger::before {
    transform: translateY(-7px);
}

.hamburger::after {
    transform: translateY(5px);
}

/* Menú hamburguesa activo */
.menu-open .hamburger {
    background: transparent;
}

.menu-open .hamburger::before {
    transform: rotate(45deg);
}

.menu-open .hamburger::after {
    transform: translateY(-2px) rotate(-45deg);
}

/* Navegación - Mobile First (hasta 767px) */
.nav-links {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    /* height: calc(100vh - var(--header-height)); */ /* Comentado para mostrar la alternativa */
    height: auto; /* Altura automática */
    max-height: calc(100vh - var(--header-height)); /* Previene que exceda la pantalla */
    background: var(--white);
    padding: 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition: transform var(--transition);
    transform: translateX(100%);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.123);
}

.menu-open .nav-links {
    display: flex;
    transform: translateX(0);
}

.nav-links li {
    list-style: none;
    width: 100%;
    padding-left: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.75rem;
    display: block;
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* Tablets y pantallas medianas (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .nav-links {
        width: 320px;
        right: 0;
        left: auto;
        align-items: flex-start;
        padding: 2rem 1rem;
    }

    .nav-links li {
        text-align: left;
    }
    nav .container{
        padding: 0 5rem;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }

    nav .container {
        justify-content: space-between;
        gap: 2rem;
    }

    .nav-links {
        position: static;
        height: auto;
        padding: 0;
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex: 1;
        background: none;
        gap: 1.5rem;
        transform: none;
        box-shadow: none;
        align-items: center;
    }

    .nav-links li {
        width: auto;
        padding-left: 0;
    }

    .nav-links a {
        font-size: 1rem;
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
    }
    nav .container{
        padding: 0 5rem;
    }
}

/* Selector de idioma */
.language-selector {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1000; /* Aseguramos que esté por encima de otros elementos */
}

.language-button {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    border: none;
    background: none;
    color: var(--text-color);
    font-weight: 500;
    gap: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-height: 44px; /* Altura mínima para touch targets */
    min-width: 44px; /* Ancho mínimo para touch targets */
}

.language-button:hover {
    background-color: var(--gray-200);
}

.language-button .chevron {
    transition: transform 0.3s ease;
}

.language-button[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

/* Estilos base del dropdown */
.language-dropdown {
    background: var(--white);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    list-style: none;
}

.language-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem;
    border: none;
    background: none;
    gap: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: var(--text-color);
    font-weight: 500;
}

.language-option:hover {
    background-color: var(--gray-200);
}

.language-option.active {
    background-color: var(--gray-300);
}

/* Estilos específicos para mobile */
@media (max-width: 768px) {
    .language-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 1000;
    }

    .language-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
        padding: 1rem;
        z-index: 1001;
        transform: translateY(100%);
        transition: transform 0.3s ease, visibility 0s linear 0.3s;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .language-button[aria-expanded="true"] ~ .language-overlay {
        display: block;
        opacity: 1;
    }

    .language-button[aria-expanded="true"] ~ .language-dropdown {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        transition-delay: 0s;
    }

    .language-dropdown::before {
        content: 'Seleccionar idioma';
        display: block;
        text-align: center;
        font-weight: 600;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--gray-200);
    }

    .language-option {
        justify-content: center;
        font-size: 1.1rem;
        padding: 1rem;
        border-radius: var(--border-radius);
    }

    .language-dropdown li + li {
        margin-top: 0.5rem;
    }
}

/* Estilos específicos para desktop */
@media (min-width: 769px) {
    .language-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        min-width: 160px;
        margin-top: 0.5rem;
        padding: 0.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateY(-10px);
    }

    .language-button[aria-expanded="true"] ~ .language-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .language-option {
        padding: 0.5rem;
        justify-content: flex-start;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .language-button {
        padding: 0.5rem 0.25rem;
        gap: 0.25rem;
    }

    .language-button span {
        font-size: 0.9rem;
    }

    .language-button img {
        width: 14px;
        height: 14px;
    }

    .language-button .chevron {
        width: 8px;
        height: 5px;
    }
}

/* Overlay para el menú móvil */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 999;
}

.menu-open .menu-overlay {
    display: block;
    opacity: 1;
}

/* Media Queries - Adaptación a pantallas más grandes */
@media (min-width: 1200px) {
    .nav-links {
        gap: 2rem;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .language-selector {
        margin-left: 1.5rem;
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    height: auto;
    display: flex;
    align-items: center;
    overflow: visible;
}

.hero picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero .container {
    position: relative;
    z-index: 1;
    height: 100%;
}

.hero-wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    width: 100%;
    padding: clamp(2rem, 5vh, 6rem) 1rem;
    gap: 2rem;
}

.hero-content {
    color: var(--white);
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 auto;
    padding-top: clamp(4rem, 10vh, 8rem);
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    font-family: var(--font-family-title);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-family: var(--font-family-text);
    line-height: 1.6;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.btn-donation {
    background-color: var(--button-hero-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 4px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-transform: uppercase;
    font-size: clamp(1rem, 2vw, 1.25rem);
    letter-spacing: 0.05em;
    min-width: min(280px, 90%);
    width: auto;
    height: auto;
    min-height: 60px;
    transition: all 0.3s ease;
}
.btn-donation:hover{
    background-color: var(--button-hero-color-hover);
}


.hero-logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.hero-logo {
    text-align: center;
}

.hero-logo img {
    height: auto;
    width: min(140px, 100%);
    max-width: 100%;
    filter: brightness(0) invert(1);
}

.hero-text {
    display: block;
}

.hero-text + .hero-text {
    margin-top: 0.5rem;
}

.highlight {
    color: var(--secondary-color);
    display: inline-block;
    width: auto;
}

.hero p:last-of-type {
    margin-bottom: 2rem;
}

/* Pantallas medianas (desktop) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .hero-wrapper {
        padding: 0 2rem 2rem;
    }
    
    .hero-content {
        max-width: 800px;
        /* padding-top: clamp(6rem, 15vh, 10rem); */
    }

    .hero-logo img {
        width: min(220px, 100%);
    }
    .hero-logo-container {
        justify-content: flex-end;
        margin-top: 15rem;
    }
    
}

/* Pantallas grandes */
@media (min-width: 1440px) {
    .hero-wrapper {
        padding: 0 2rem 2rem;
    }
    
    .hero-content {
        max-width: none;
        /* padding-top: clamp(8rem, 20vh, 12rem); */
    }

    .hero-logo img {
        width: min(260px, 100%);
    }
    .hero-logo-container {
        justify-content: flex-end;
        padding-bottom: 3rem;
    }
    .hero-logo-container {
        justify-content: flex-end;
        margin-top: 15rem;
    }
}

/* Para alturas pequeñas o zoom */
@media (max-height: 800px) {
    .hero {
        height: auto;
        min-height: 100vh;
        align-items: flex-start; /* Cambiamos a flex-start para eliminar el centrado vertical */
    }
    
    .hero-wrapper {
        margin: 0;
        padding: 1rem; /* Reducimos el padding */
        gap: 1rem; /* Reducimos el gap entre elementos */
    }
    
    .hero-content {
        padding-top: 1rem; /* Reducimos el padding superior */
    }
    
    .hero h1 {
        font-size: clamp(1rem, 4vw, 2rem);
        margin-bottom: 1rem; /* Reducimos el margen inferior del título */
    }

    .hero-logo-container {
        justify-content: flex-end;
        /* margin-top: 2rem; */
        margin-top: 6rem;
    }

    .hero-logo img {
        height: auto;
        width: min(160px, 100%);
        max-width: 100%;
        filter: brightness(0) invert(1);
    }

    .btn.btn-donation {
        font-size: 1rem;
        width: min(250px, 100%);
        height: auto;
        margin: 0;
    }
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    font-family: var(--font-family-text);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo img {
    /* height: 70px; */
    /* filter: brightness(0) invert(1); */
}
.wrapper-indevelo{
    width: 100%;
    /* margin: 0 auto; */
    display: flex;
    align-items: center;
    justify-content: end;
}
.indevelo-link{
    text-decoration: none;
    color: var(--white);
}
.indevelo-link:hover{
    text-decoration: underline;
}

.footer-links h3,
.footer-social h3,
.footer-contact h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-social{
    width: 100%;
}

.social-icons {
    display: flex;
    gap: 2rem;
    justify-content: start;
}

.social-icons img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s ease;
}

.social-icons a:hover img {
    opacity: 0.8;
}

.footer-contact p {
    margin-bottom: 0.5rem;
    /* opacity: 0.8; */
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Ajuste para el contenido principal */
main {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* Media Queries */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* .services h2 {
        font-size: 2rem;
    } */
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    .wrapper-indevelo{
        width: 100%;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Overlay para móvil */
.language-overlay {
    display: none; /* Por defecto oculto */
}
.mail-de-contacto{
    color: var(--white);
    text-decoration: none;
}
.mail-de-contacto:hover{
    color: var(--secondary-color);
    text-decoration: underline;
}


