@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* ===== ANIMACIONES OPTIMIZADAS ===== */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translate3d(-50px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translate3d(50px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Header Styles con animación */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    animation: slideInDown 0.6s ease-out;
    will-change: transform;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
}

.logo img {
    height: 50px;
    animation: scaleIn 0.8s ease-out 0.2s both;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu li {
    animation: fadeInUp 0.6s ease-out both;
}

.nav-menu li:nth-child(1) { animation-delay: 0.1s; }
.nav-menu li:nth-child(2) { animation-delay: 0.2s; }
.nav-menu li:nth-child(3) { animation-delay: 0.3s; }
.nav-menu li:nth-child(4) { animation-delay: 0.4s; }

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 15px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    background: #007bff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover {
    color: #007bff;
    transform: translateY(-2px);
}

.nav-menu a:hover::after {
    width: 80%;
}

/* Hero Section - TEXTO DIRECTO SOBRE IMAGEN */
.hero-section {
    background-image: url('/imagenes opt/Quienes-somos-niñas.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    width: 100vw;
    height: 100vh;
    margin-left: calc(-50vw + 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    text-align: center;
    overflow: hidden;
}

/* Overlay sutil para mejorar legibilidad */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(0, 0, 0, 0.2) 50%, 
        rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

/* CONTENEDOR DE TEXTO SIN FONDO - DIRECTO SOBRE IMAGEN */
.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    z-index: 2;
    /* SIN FONDO - Solo el texto sobre la imagen */
}

.hero-container h1 {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 3px 3px 12px rgba(0,0,0,0.8);
    letter-spacing: 2px;
    /* Animación fade in up */
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 30px;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    /* Animación fade in up con delay */
    animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 12px 30px rgba(255, 107, 53, 0.4),
        0 6px 15px rgba(255, 107, 53, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    /* Animación fade in up con más delay */
    animation: fadeInUp 1s ease-out 0.9s both;
    will-change: transform;
}

/* Efecto shimmer en el botón */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 16px 35px rgba(255, 107, 53, 0.45),
        0 8px 20px rgba(255, 107, 53, 0.25);
}

/* Content Section con animaciones */
.content-section {
    background-color: #ffffff;
    padding: 80px 0;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    animation: fadeInUp 0.8s ease-out both;
}

.main-text {
    margin-bottom: 60px;
    text-align: justify;
}

.main-text p {
    margin-bottom: 25px;
    font-size: 17px;
    line-height: 1.8;
    color: #555;
    animation: fadeInUp 0.6s ease-out both;
    transition: color 0.3s ease;
}

.main-text p:nth-child(1) { animation-delay: 0.1s; }
.main-text p:nth-child(2) { animation-delay: 0.2s; }
.main-text p:nth-child(3) { animation-delay: 0.3s; }

.main-text p:hover {
    color: #333;
}

.main-text strong {
    color: #333;
    font-weight: 600;
}

/* Mission and Vision con animaciones */
.mision-vision-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 60px;
    padding: 0 20px;
}

.mision-box, .vision-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 45px 35px;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.mision-box {
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.vision-box {
    animation: slideInRight 0.8s ease-out 0.4s both;
}

.mision-box::before, .vision-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #007bff 0%, #28a745 100%);
}

.mision-box:hover, .vision-box:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 18px 45px rgba(0,0,0,0.13);
}

.icon-container {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 8px 25px rgba(0,123,255,0.3);
    animation: float 3s ease-in-out infinite;
}

.icon-container span {
    font-size: 2.8rem;
    filter: brightness(0) invert(1);
}

.mision-box h3, .vision-box h3 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.mision-box p, .vision-box p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    text-align: justify;
    margin: 0;
}

/* Valores Section con animaciones - IMAGEN MEJORADA */
.valores-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 100px 0;
}

.valores-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 0 20px;
}

.valores-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
    animation: slideInLeft 0.8s ease-out both;
    height: 600px; /* Altura fija aumentada */
}

.valores-image img {
    width: 100%;
    height: 100%; /* Usa toda la altura del contenedor */
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.valores-image:hover img {
    transform: scale(1.03);
}

.valores-content {
    padding: 20px;
    animation: slideInRight 0.8s ease-out 0.2s both;
}

.valores-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 50px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Accordion Styles con animaciones MEJORADAS */
.accordion-item {
    background: #ffffff;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
    will-change: transform;
}

.accordion-item:nth-child(1) { animation-delay: 0.1s; }
.accordion-item:nth-child(2) { animation-delay: 0.2s; }
.accordion-item:nth-child(3) { animation-delay: 0.3s; }
.accordion-item:nth-child(4) { animation-delay: 0.4s; }

.accordion-item:hover {
    transform: translateX(3px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.12);
}

.accordion-header {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    padding: 22px 28px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.accordion-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent);
    transition: left 0.5s ease;
}

.accordion-header:hover::before {
    left: 100%;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%);
}

.accordion-header.active {
    background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%);
}

.accordion-icon {
    font-size: 26px;
    font-weight: bold;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.accordion-header.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #ffffff;
}

.accordion-content.active {
    max-height: 250px;
    padding: 30px 28px;
}

.accordion-content p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: #666;
}

/* ===== OPTIMIZACIONES DE RENDIMIENTO ===== */
.hero-section,
.mision-box,
.vision-box,
.accordion-item,
.cta-button {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }

    .nav-menu {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero-section {
        height: 100vh;
        margin-left: calc(-50vw + 50%);
        width: 100vw;
        background-attachment: scroll;
    }

    .hero-container {
        padding: 35px 25px;
    }

    .hero-container h1 {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .mision-vision-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 10px;
    }

    .mision-box, .vision-box {
        padding: 35px 25px;
        animation: fadeInUp 0.8s ease-out both;
    }

    .mision-box:hover, .vision-box:hover {
        transform: translateY(-3px) scale(1.01);
    }

    .icon-container {
        width: 75px;
        height: 75px;
    }

    .icon-container span {
        font-size: 2.2rem;
    }

    .mision-box h3, .vision-box h3 {
        font-size: 1.7rem;
    }

    .valores-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .valores-title {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .valores-image {
        height: 450px; /* Altura reducida en móvil pero aún generosa */
    }
    
    .accordion-header {
        padding: 18px 22px;
        font-size: 15px;
    }
    
    .accordion-content.active {
        padding: 25px 22px;
    }

    .accordion-item:hover {
        transform: translateY(-1px);
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 100vh;
        margin-left: calc(-50vw + 50%);
        width: 100vw;
    }

    .hero-container {
        padding: 30px 20px;
    }

    .hero-container h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .main-text p {
        font-size: 15px;
    }
    
    .mision-box h3, .vision-box h3 {
        font-size: 1.5rem;
    }

    .mision-box p, .vision-box p {
        font-size: 15px;
    }

    .valores-section {
        padding: 70px 0;
    }
    
    .valores-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .valores-image {
        height: 350px; /* Altura mínima en dispositivos muy pequeños */
    }
    
    .accordion-header {
        padding: 15px 18px;
        font-size: 14px;
    }
    
    .accordion-icon {
        font-size: 22px;
        width: 30px;
        height: 30px;
    }
    
    .accordion-content.active {
        padding: 20px 18px;
    }
    
    .accordion-content p {
        font-size: 14px;
    }
}

/* Preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-section {
        background-attachment: scroll;
    }
}
/* ===== RESPONSIVE ADICIONAL PARA TODOS LOS DISPOSITIVOS ===== */

/* Tablets grandes (1024px - 1200px) */
@media (min-width: 1024px) and (max-width: 1200px) {
    .content-container {
        max-width: 1000px;
        padding: 0 30px;
    }
    
    .hero-container h1 {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .mision-vision-container {
        gap: 40px;
    }
    
    .valores-container {
        gap: 50px;
    }
    
    .valores-title {
        font-size: 2.5rem;
    }
}

/* Tablets medianas (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .nav-container {
        padding: 0 30px;
    }
    
    .hero-container {
        padding: 40px 30px;
    }
    
    .hero-container h1 {
        font-size: 3.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .content-section {
        padding: 60px 0;
    }
    
    .content-container {
        padding: 0 30px;
    }
    
    .main-text p {
        font-size: 16px;
    }
    
    .mision-vision-container {
        gap: 35px;
        padding: 0 15px;
    }
    
    .mision-box, .vision-box {
        padding: 40px 30px;
    }
    
    .valores-section {
        padding: 80px 0;
    }
    
    .valores-container {
        padding: 0 30px;
        gap: 45px;
    }
    
    .valores-title {
        font-size: 2.4rem;
    }
    
    .valores-image {
        height: 500px;
    }
}

/* Tablets pequeñas (600px - 768px) */
@media (min-width: 600px) and (max-width: 768px) {
    .nav-menu {
        gap: 20px;
    }
    
    .hero-container h1 {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .cta-button {
        padding: 14px 30px;
        font-size: 1.05rem;
    }
    
    .mision-vision-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .valores-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .valores-title {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .valores-image {
        height: 400px;
    }
}

/* Móviles grandes (480px - 600px) */
@media (min-width: 480px) and (max-width: 600px) {
    .nav-container {
        padding: 10px 20px;
    }
    
    .nav-menu {
        gap: 15px;
        font-size: 14px;
    }
    
    .hero-container {
        padding: 30px 20px;
    }
    
    .hero-container h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .content-section {
        padding: 50px 0;
    }
    
    .content-container {
        padding: 0 15px;
    }
    
    .main-text p {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .mision-box, .vision-box {
        padding: 30px 20px;
    }
    
    .icon-container {
        width: 70px;
        height: 70px;
        margin-bottom: 25px;
    }
    
    .icon-container span {
        font-size: 2rem;
    }
    
    .mision-box h3, .vision-box h3 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .mision-box p, .vision-box p {
        font-size: 14px;
    }
    
    .valores-section {
        padding: 60px 0;
    }
    
    .valores-container {
        padding: 0 15px;
    }
    
    .valores-title {
        font-size: 1.9rem;
        margin-bottom: 35px;
    }
    
    .valores-image {
        height: 300px;
    }
}

/* Móviles muy pequeños (320px - 480px) */
@media (max-width: 480px) {
    .navbar {
        padding: 0;
    }
    
    .nav-container {
        padding: 8px 15px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .nav-menu {
        gap: 10px;
        font-size: 13px;
    }
    
    .nav-menu a {
        padding: 8px 10px;
    }
    
    .hero-container {
        padding: 25px 15px;
    }
    
    .hero-container h1 {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 12px;
        letter-spacing: 1px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 20px;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        letter-spacing: 0.5px;
    }
    
    .content-section {
        padding: 40px 0;
    }
    
    .content-container {
        padding: 0 10px;
    }
    
    .main-text {
        margin-bottom: 40px;
    }
    
    .main-text p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .mision-vision-container {
        gap: 25px;
        margin-top: 40px;
        padding: 0 5px;
    }
    
    .mision-box, .vision-box {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .icon-container {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .icon-container span {
        font-size: 1.8rem;
    }
    
    .mision-box h3, .vision-box h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .mision-box p, .vision-box p {
        font-size: 13px;
        line-height: 1.6;
    }
    
    .valores-section {
        padding: 50px 0;
    }
    
    .valores-container {
        padding: 0 10px;
        gap: 30px;
    }
    
    .valores-title {
        font-size: 1.7rem;
        margin-bottom: 30px;
        line-height: 1.2;
    }
    
    .valores-image {
        height: 250px;
        border-radius: 15px;
    }
    
    .accordion-item {
        margin-bottom: 15px;
        border-radius: 10px;
    }
    
    .accordion-header {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .accordion-icon {
        font-size: 20px;
        width: 28px;
        height: 28px;
    }
    
    .accordion-content.active {
        padding: 15px;
        max-height: 200px;
    }
    
    .accordion-content p {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* Dispositivos ultra pequeños (menos de 320px) */
@media (max-width: 320px) {
    .hero-container h1 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .cta-button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .main-text p {
        font-size: 13px;
    }
    
    .mision-box, .vision-box {
        padding: 20px 12px;
    }
    
    .mision-box h3, .vision-box h3 {
        font-size: 1.2rem;
    }
    
    .mision-box p, .vision-box p {
        font-size: 12px;
    }
    
    .valores-title {
        font-size: 1.5rem;
    }
    
    .valores-image {
        height: 200px;
    }
    
    .accordion-header {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .accordion-content p {
        font-size: 12px;
    }
}

/* Orientación landscape en móviles */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        background-attachment: scroll;
    }
    
    .hero-container {
        padding: 20px;
    }
    
    .hero-container h1 {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .content-section {
        padding: 40px 0;
    }
    
    .valores-section {
        padding: 50px 0;
    }
}

/* Dispositivos con pantalla táctil */
@media (hover: none) and (pointer: coarse) {
    .nav-menu a:hover {
        transform: none;
    }
    
    .cta-button:hover {
        transform: none;
    }
    
    .mision-box:hover, .vision-box:hover {
        transform: none;
    }
    
    .accordion-item:hover {
        transform: none;
    }
    
    .valores-image:hover img {
        transform: none;
    }
    
    /* Mejorar la experiencia táctil */
    .nav-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .cta-button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .accordion-header {
        min-height: 44px;
    }
}

/* Dispositivos con densidad de píxeles alta */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section {
        background-image: url('/imagenes opt/quienesomosfoto.webp');
        background-size: cover;
        background-position: center;
    }
    
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Ajustes para pantallas muy anchas */
@media (min-width: 1400px) {
    .content-container {
        max-width: 1300px;
    }
    
    .hero-container h1 {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .valores-container {
        max-width: 1300px;
    }
    
    .valores-title {
        font-size: 3rem;
    }
}

/* Ajustes para impresión */
@media print {
    .navbar {
        display: none;
    }
    
    .hero-section {
        background: none;
        color: #333;
        height: auto;
        margin: 0;
        width: auto;
    }
    
    .hero-overlay {
        display: none;
    }
    
    .cta-button {
        display: none;
    }
    
    .accordion-item {
        break-inside: avoid;
    }
    
    .mision-box, .vision-box {
        break-inside: avoid;
    }
}

/* ===== MENÚ HAMBURGUESA PARA MÓVILES ===== */

/* Botón hamburguesa - oculto por defecto */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    transition: all 0.3s ease;
    border: none;
    background: none;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    transform-origin: center;
}

/* Animación del botón hamburguesa cuando está activo */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Ajustes del navbar para móvil */
.nav-container {
    position: relative;
}

/* Menú móvil overlay */
.nav-menu.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.98) 100%);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
}

.nav-menu.mobile-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Estilos de los enlaces en el menú móvil */
.nav-menu.mobile-menu a {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
    opacity: 0;
    animation: slideInMobile 0.5s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.nav-menu.mobile-menu.active a:nth-child(1) { animation-delay: 0.1s; }
.nav-menu.mobile-menu.active a:nth-child(2) { animation-delay: 0.2s; }
.nav-menu.mobile-menu.active a:nth-child(3) { animation-delay: 0.3s; }
.nav-menu.mobile-menu.active a:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInMobile {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-menu.mobile-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    transition: left 0.3s ease;
    z-index: -1;
    border-radius: 50px;
}

.nav-menu.mobile-menu a:hover {
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.nav-menu.mobile-menu a:hover::before {
    left: 0;
}

/* Botón de cerrar en el menú móvil */
.close-menu {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu:hover {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    transform: rotate(90deg);
}

/* Media queries para mostrar/ocultar elementos */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-menu.mobile-menu {
        display: flex;
    }
    
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        height: 70px;
        padding: 0 20px;
    }
    
    /* Prevenir scroll cuando el menú está abierto */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .hamburger span {
        width: 22px;
        height: 2.5px;
    }
    
    .nav-menu.mobile-menu a {
        font-size: 1.5rem;
        padding: 12px 25px;
    }
    
    .close-menu {
        top: 20px;
        right: 20px;
        font-size: 1.8rem;
        width: 45px;
        height: 45px;
    }
}

/* Animación de entrada para el overlay */
@keyframes fadeInOverlay {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(20px);
    }
}

.nav-menu.mobile-menu.active {
    animation: fadeInOverlay 0.4s ease-out;
}

/* Efecto de partículas opcional para el fondo del menú */
.nav-menu.mobile-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 123, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(40, 167, 69, 0.1) 0%, transparent 50%);
    z-index: -1;
}

/* Indicador visual de que el menú puede cerrarse tocando fuera */
.nav-menu.mobile-menu::after {
    content: 'Toca fuera para cerrar';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 480px) {
    .nav-menu.mobile-menu::after {
        bottom: 20px;
        font-size: 0.8rem;
    }
}