/* ============================================
   RESET Y CONFIGURACIÓN INICIAL
============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}


/* ============================================
   SECCIONES GENERALES - MEJORADAS
============================================ */

.about-section {
    background-color: #ffffff;
    width: 100%;
    min-height: 80vh;
    /* Opcional: hace que la sección sea alta */
    display: flex;
    align-items: center;
    /* Centra verticalmente el contenido */
    justify-content: center;
    padding: 100px 0;
    /* Espacio arriba y abajo */
    box-sizing: border-box;
}

/* Si quieres que la primera sección tenga menos espacio arriba: */
.about-section:first-of-type {
    padding-top: 2rem;
    /* Reduce el espacio solo al inicio de la página */
}

.about-section.light {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.about-container {
    width: 80%;
    max-width: 1200px;
    /* Controla qué tan ancho quieres el contenido */
    margin: 0 auto;
    /* Centra el contenedor */
    padding: 0 5%;
    /* Esto da el margen generoso a los lados */
}

.section-title {
    font-size: 2.5rem;
    color: #363a51;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.section-title.center {
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #1c7aff, #363a51);
    margin-top: 0.5rem;
    border-radius: 2px;
}

.section-title.center::after {
    margin: 0.5rem auto;
}

.section-subtitle {
    color: #6b7280;
    font-size: 1.1rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* ============================================
   SECCIÓN QUIÉNES SOMOS - MEJORADA
============================================ */

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    /* Reducimos de 4rem a 1.5rem para móvil */
    align-items: center;
}


/* 1. Hacemos que el contenedor sea más ancho en pantallas grandes */
@media (min-width: 1400px) {
    .about-container {
        max-width: 90%;
        /* Ocupa casi todo el ancho de la pantalla */
        padding: 0 2rem;
    }
}

/* 2. Ajustamos la altura y el alineamiento en Desktop */
@media (min-width: 992px) {
    .about-section:first-of-type {
        min-height: 85vh;
        /* Ocupa todo el largo de la pantalla */
        display: flex;
        align-items: center;
        /* Centra el contenido verticalmente */
        padding: 0;
        /* Quitamos paddings excesivos para que el 100vh mande */
    }

    .about-grid {
        /* 1.3fr para texto y 0.7fr para imagen hace que la letra no se estire tanto */
        grid-template-columns: 1.3fr 0.7fr;
        gap: 6rem;
        /* Un gap elegante para pantallas anchas */
        width: 100%;
    }

    .section-title {
        font-size: 3.5rem;
        /* Tamaño grande pero controlado para laptop */
    }

    .about-description {
        font-size: 1.25rem;
        /* Legible sin ser gigante */
        max-width: 800px;
        /* Evita que las líneas de texto sean demasiado largas */
    }

    .about-image img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
}




.about-text {
    padding-right: 1rem;
}

.about-description {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1c7aff, #2F66B4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    padding: 0.8rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-item h3 {
    font-size: 1.2rem;
    color: #363a51;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-item p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

.about-image {
    position: relative;
    padding-top: 3rem;
}

.image-placeholder {
    height: 400px;
    width: 100%;
    background: linear-gradient(135deg, #363a51, #2D3C59);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-overlay {
    text-align: center;
    color: white;
    padding: 2rem;
}

.image-overlay h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.image-overlay p {
    font-size: 1.2rem;
    opacity: 0.9;
}


/* ==========================================
   AJUSTE ESPECÍFICO PRIMERA SECCIÓN - MÓVIL
========================================== */

@media (max-width: 768px) {

    #nosotros.about-section {
        min-height: auto !important;
        /* Quitamos 80vh */
        align-items: flex-start !important;
        /* Quitamos centrado vertical */
        padding-top: 50px !important;
        /* Reducimos arriba */
        padding-bottom: 80px !important;
        /* Aumentamos abajo */
    }

    .about-grid {
        gap: 1rem !important;
        /* antes 3rem */
    }

    .about-text {
        margin-bottom: 0 !important;
    }

    .about-image {
        padding-top: 0rem !important;
    }

}

/* ===== AJUSTE ESPECÍFICO PARA IPAD Y TABLETS (1024px) ===== */
@media (max-width: 1024px) {

    /* 1. Forzamos a que ninguna sección sea más alta que el contenido */
    .about-section,
    .intro-que-hacemos {
        min-height: auto !important;
        height: auto !important;
        /* Reducimos el espacio exagerado arriba y abajo */
        padding-top: 80px !important;
        padding-bottom: 60px !important;
    }

    /* 2. Ajuste específico para la sección "¿Qué hacemos?" */
    .intro-que-hacemos {
        padding-top: 120px !important;
        /* Más espacio arriba por el Navbar */
    }

    /* 3. Ajuste de los contenedores para que no estén tan pegados a los bordes */
    .about-container {
        padding: 0 40px !important;
    }

    /* 4. En iPad, el grid de "Quiénes Somos" suele verse apretado,
          ajustamos el margen entre texto e imagen */
    .about-grid {
        gap: 30px !important;
        align-items: center;
    }

    /* 5. Si las "Monedas" (Misión/Visión) se ven muy grandes, las ajustamos */
    .mv-coin-grid {
        gap: 20px !important;
        margin-top: 30px !important;
    }

    /* 6. Sección Equipo: Evitar que la imagen sea gigante */
    .team-image-wrapper img {
        max-height: 200px;
        width: auto;
        margin: 0 auto;
    }

    .team-layout {
        gap: 40px !important;
    }
}

/* Ajuste extra: Si el iPad está en vertical, el texto puede ser muy ancho */
@media (max-width: 1024px) and (orientation: portrait) {
    .section-title {
        font-size: 2.2rem !important;
        margin-bottom: 1.5rem !important;
    }

    .about-description {
        font-size: 1.1rem !important;
    }
}

/* ============================================
   SECCIÓN MISIÓN/VISIÓN - MEJORADA
============================================ */
/* ============================================
   MISIÓN / VISIÓN - HEADER MEJORADO
============================================ */
/* ============================================
   MISIÓN / VISIÓN - HEADER CORREGIDO
============================================ */

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    height: 100%;
    text-align: center;
}

/* ICONO */
.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s ease;
}

/* Misión */
.card-icon.mission {
    background: linear-gradient(135deg, #1c7aff, #0A5ED6);
    box-shadow: 0 15px 30px rgba(28, 122, 255, 0.25);
}

/* Visión */
.card-icon.vision {
    background: linear-gradient(135deg, #1c7aff, #0A5ED6);
    box-shadow: 0 15px 30px rgba(26, 28, 41, 0.25);
}

.card-icon svg {
    width: 30px;
    height: 30px;
    color: #ffffff;
}

/* 🔥 TÍTULO (VISIBLE Y SEGURO) */
.mv-front h3 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    color: #1a1c29;
    /* aseguramos que no sea blanco */
    letter-spacing: -0.5px;
}

/* Línea decorativa elegante */
.mv-front h3::after {
    content: "";
    width: 40px;
    height: 3px;
    display: block;
    margin: 12px auto 0;
    border-radius: 2px;
    background: #1c7aff;
    opacity: 0.8;
}

/* ============================================
   COIN EFFECT - MISIÓN / VISIÓN
   ⚠️ NO MODIFICADO FUNCIONALMENTE
============================================ */

.mv-coin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .mv-coin-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* CONTENEDOR PRINCIPAL */
.mv-coin-card {
    perspective: 1200px;
    width: 100%;
    height: 320px;
    cursor: pointer;
}

/* INTERIOR */
.mv-coin-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

/* CARAS */
.mv-coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 24px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* FRENTE */
.mv-front {
    align-items: center;
    text-align: center;
}

/* ATRÁS */
/* ============================================
   REVERSO CORPORATIVO - MISIÓN / VISIÓN
============================================ */

.mv-back {
    transform: rotateY(180deg);
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff, #f5f9ff);
    color: #1a1c29;
    line-height: 1.7;
    font-size: 1.05rem;
    text-align: center;
    border: 2px solid #e6eefc;
}

/* Texto más legible */
.mv-back p {
    position: relative;
    z-index: 2;
    margin: 0;
}

/* 🔵 CÍRCULO DECORATIVO GRANDE */
.mv-back::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(28, 122, 255, 0.15), transparent 85%);
    border-radius: 50%;
    top: -60px;
    right: -60px;
    z-index: 1;
}

/* 🔹 LÍNEAS DECORATIVAS */
.mv-back::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    border: 2px solid rgba(28, 123, 255, 0.221);
    border-radius: 24px;
    bottom: -50px;
    left: -50px;
    transform: rotate(25deg);
    z-index: 1;
}


/* Texto "Haz clic" */
.mv-coin-card::after {
    content: "";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    opacity: 0.8;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .mv-coin-card {
        height: 280px;
    }

    .mv-coin-face {
        padding: 1.5rem;
    }

    .mv-back {
        font-size: 0.95rem;
    }
}

/* HOVER (no modificado funcionalmente) */
@media (hover: hover) {
    .mv-coin-card:hover .mv-coin-inner {
        transform: rotateY(179deg);
    }
}

.mv-coin-card.active .mv-coin-inner {
    transform: rotateY(179deg);
}

/* ============================================
   SECCIÓN VALORES - MEJORADA
============================================ */
.about-values-detailed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto 0;
}

@media (min-width: 640px) {
    .about-values-detailed {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .about-values-detailed {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .about-values-detailed {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 2.5rem;
    }

    /* Primeras 3 tarjetas */
    .about-values-detailed .val-flip-card:nth-child(1) {
        grid-column: 1 / span 2;
    }

    .about-values-detailed .val-flip-card:nth-child(2) {
        grid-column: 3 / span 2;
    }

    .about-values-detailed .val-flip-card:nth-child(3) {
        grid-column: 5 / span 2;
    }

    /* Últimas 2 centradas abajo */
    .about-values-detailed .val-flip-card:nth-child(4) {
        grid-column: 2 / span 2;
    }

    .about-values-detailed .val-flip-card:nth-child(5) {
        grid-column: 4 / span 2;
    }
}


.value-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #1c7aff, #363a51);
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(28, 122, 255, 0.15);
}

.value-icon {
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, #1c7aff, #1a1c29);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    box-shadow:
        0 10px 25px rgba(28, 122, 255, 0.35);
    transition: all 0.4s ease;
}

.value-icon svg {
    width: 34px;
    height: 34px;
}

.value-title {
    font-size: 1.35rem;
    color: #1a1c29;
    margin-bottom: 1rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.3px;
}


.value-description {
    color: #4b5563;
    line-height: 1.65;
    font-size: 0.95rem;
    margin: 0;
}


/* ============================================
   FLIP VALORES
============================================ */

.val-flip-card {
    perspective: 1200px;
    width: 100%;
    height: 260px;
    cursor: pointer;
}

.val-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.val-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    padding: 2.2rem;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}


.val-front {
    background: linear-gradient(145deg, #ffffff, #f4f7ff);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(28, 122, 255, 0.08);
    border: 1px solid rgba(28, 122, 255, 0.08);
    align-items: center;
}

/* Línea decorativa superior */
.val-front::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1c7aff, #363a51);
}

.val-back {
    transform: rotateY(180deg);
    background: linear-gradient(145deg, #ffffff, #eef4ff);
    color: #1f2937;
    line-height: 1.6;
    font-size: 0.95rem;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(28, 122, 255, 0.08);
    position: relative;
}

/* Círculo decorativo */
.val-back::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(28, 122, 255, 0.12), transparent 70%);
    border-radius: 50%;
    top: -60px;
    right: -60px;
}


/* Marco decorativo inferior */
.val-back::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px solid rgba(28, 122, 255, 0.12);
    border-radius: 20px;
    bottom: -40px;
    left: -40px;
    transform: rotate(25deg);
}

/* Hover solo desktop */
@media (hover: hover) {
    .val-flip-card:hover .val-flip-inner {
        transform: rotateY(179deg);
    }
}

/* Click */
.val-flip-card.active .val-flip-inner {
    transform: rotateY(179deg);
}

/* ============================================
   SECCIÓN CONTACTO - MEJORADA
============================================ */
.contact-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #363a51;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1c7aff;
    box-shadow: 0 0 0 3px rgba(28, 122, 255, 0.1);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: linear-gradient(135deg, #1c7aff, #0A5ED6);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(28, 122, 255, 0.2);
}

.btn-primary svg {
    width: 20px;
    height: 20px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.info-card h3 {
    color: #363a51;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1c7aff, #363a51);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    padding: 0.8rem;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
}

.contact-item h4 {
    color: #363a51;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.contact-item p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

.map-container {
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.map-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   ANIMACIONES
============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-section>* {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.section-animate>* {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}


.about-hero-content {
    animation: fadeInUp 0.8s ease-out forwards;
}

.about-grid {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.1s;
}

.mission-vision-grid {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.2s;
}

.about-values-detailed {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.3s;
}

.contact-grid {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.4s;
}

.value-card:nth-child(1) {
    animation-delay: 0.1s;
}

.value-card:nth-child(2) {
    animation-delay: 0.2s;
}

.value-card:nth-child(3) {
    animation-delay: 0.3s;
}

.value-card:nth-child(4) {
    animation-delay: 0.4s;
}

.value-card:nth-child(5) {
    animation-delay: 0.5s;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
============================================ */
@media (max-width: 768px) {
    .about-hero {
        min-height: 60vh;
        padding: 3rem 1rem;
    }

    .about-hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-section {
        padding: 3rem 1rem;
    }

    .mission-card,
    .vision-card,
    .contact-form,
    .info-card {
        padding: 1.5rem;
    }

    .value-card {
        padding: 1.5rem;
    }

    .value-icon {
        width: 60px;
        height: 60px;
    }

    .value-icon svg {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .about-hero-content h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .card-icon {
        margin: 0 auto;
    }
}

/* Aplicar la forma curva a la imagen de Quiénes Somos */
.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Asegura que la imagen llene el espacio sin deformarse */
    display: block;

    /* Esta es la propiedad mágica para esa forma específica */
    border-radius: 180px 15px 180px 15px / 180px 15px 180px 15px;

    /* Opcional: Un pequeño borde o sombra para que resalte más */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Ajuste para que el contenedor no corte la sombra */
.image-wrapper {
    padding: 20px;
}


/* ============================================
   FONDO TIPO TUMBLR - NUESTRA FILOSOFÍA
============================================ */
.filosofia-bg {
    position: relative;
    padding: 5rem 1.5rem;
    background-image: url('/images/fondos/quehacemos.jpg');
    /* TU IMAGEN */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.filosofia-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(15, 23, 42, 0.75),
            rgba(15, 23, 42, 0.85));
    z-index: 0;
}


/* TEAM SECTION */
.team-section {
    background:
        radial-gradient(circle at top,
            rgba(28, 122, 255, 0.06),
            transparent 60%),
        #f9fafc;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}



.team-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #1f2937;
}

.team-role {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #363a51;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.team-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4b5563;
}

.text-gray {
    color: #4b5563;
}

.team-copy {
    max-width: 680px;
    margin: 0 auto;
    color: #4b5563;
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: left;
}

.team-copy p {
    margin-bottom: 1.4rem;
}

.team-intro {
    font-size: 1.15rem;
    color: #1f2937;
}

.team-areas {
    list-style: none;
    margin-top: 2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;

    align-items: flex-start;
}



/* CADA ÍTEM */
.team-areas li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
    text-align: left;
}

/* PUNTO AZUL */
.team-areas li::before {
    content: "";
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #1c7aff, #0A5ED6);
    border-radius: 50%;
    flex-shrink: 0;
}


.team-block {
    margin-bottom: 2.2rem;
}

.team-block.highlight {
    padding-left: 1.5rem;
    border-left: 4px solid #1c7aff;
}

.team-block.highlight p {
    font-size: 1.1rem;
    color: #1f2937;
}

/* LAYOUT IMAGEN + TEXTO */
.team-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 3.5rem;
    align-items: center;
    margin-top: 3rem;
}

/* IMAGEN DE EQUIPO CON FORMA ORGÁNICA */
.team-image-wrapper {
    width: 320px;
    height: 320px;
    margin: 0 auto;
}

/* FIGURA TRIDIMENSIONAL AZUL */
.team-image-wrapper::before {
    top: -6px;
    bottom: -6px;
    left: 10px;
    right: -26px;

    box-shadow:
        0 30px 55px rgba(28, 122, 255, 0.28),
        inset 0 -10px 22px rgba(0, 0, 0, 0.16);

    transform: rotate(-4deg);
}

/* IMAGEN */
.team-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 180px 40px 180px 40px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}




@media (max-width: 900px) {
    .team-layout {
        grid-template-columns: 1fr;
    }

    .team-image-wrapper {
        margin: 0 auto 1.5rem;
    }

    .team-copy {
        text-align: left;
        /* 👈 sigue alineado */
    }

    .team-areas {
        align-items: flex-start;
    }
}

/* =====================================================
   NUEVA CLASE PARA IMAGEN DE EQUIPO (responsiva y sin scroll)
   ===================================================== */
.equipo-img-container {
    width: 320px;
    margin: 0 auto;
    position: relative;
    /* Opcional: si quieres que se centre y tenga margen inferior */
    margin-bottom: 1.5rem;
}

/* La imagen mantiene la misma forma y efectos */
.equipo-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 180px 40px 180px 40px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    object-fit: cover;
}

/* Pseudoelemento decorativo (sin desborde) */
.equipo-img-container::before {
    content: "";
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: 10px;
    right: -10px;
    /* Valor seguro, no sobresale */
    box-shadow: 0 30px 55px rgba(28, 122, 255, 0.28),
        inset 0 -10px 22px rgba(0, 0, 0, 0.16);
    transform: rotate(-4deg);
    border-radius: 180px 40px 180px 40px;
    z-index: -1;
    pointer-events: none;
}

/* ========== RESPONSIVE (solo móvil) ========== */
@media (max-width: 768px) {
    .equipo-img-container {
        width: 220px;
    }
}

@media (max-width: 480px) {
    .equipo-img-container {
        width: 180px;
    }
}

/* Asegurar que el texto no desborde en móvil */
@media (max-width: 768px) {
    .team-copy {
        width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    #equipo .about-container,
    #equipo .team-layout {
        overflow-x: hidden;
    }
}

/* =====================================================
   FIX 1: IMAGEN "¿QUIÉNES SOMOS?" - EVITAR QUE SE ESTIRE
   ===================================================== */
@media (max-width: 768px) {

    /* Contenedor de la imagen */
    #nosotros .image-wrapper {
        padding: 10px !important;
        max-width: 280px !important;
        margin: 0 auto !important;
    }

    /* La imagen mantiene proporción */
    #nosotros .image-wrapper img {
        width: 100% !important;
        height: auto !important;
        max-height: 250px !important;
        object-fit: contain !important;
    }

    /* Contenedor padre */
    #nosotros .about-image {
        padding-top: 0 !important;
        display: flex;
        justify-content: center;
    }
}

/* =====================================================
   FIX 2: TARJETAS MISIÓN/VISIÓN - TEXTO ATRÁS COMPLETO
   ===================================================== */
@media (max-width: 768px) {

    /* Aumentamos altura de las tarjetas */
    .mv-coin-card {
        height: 380px !important;
    }

    /* Reducimos padding para más espacio */
    .mv-coin-face {
        padding: 1.8rem !important;
    }

    /* Texto del reverso más compacto pero legible */
    .mv-back {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        overflow-y: auto !important;
    }

    /* Ajuste de títulos frontales */
    .mv-front h3 {
        font-size: 1.6rem !important;
    }

    .card-icon {
        width: 60px !important;
        height: 60px !important;
    }

    .card-icon svg {
        width: 24px !important;
        height: 24px !important;
    }
}

@media (max-width: 480px) {
    .mv-coin-card {
        height: 420px !important;
    }

    .mv-coin-face {
        padding: 1.2rem !important;
    }

    .mv-back {
        font-size: 0.85rem !important;
    }
}

/* =====================================================
   FIX 3: TARJETAS DE VALORES - TÍTULOS LARGOS + ICONO
   ===================================================== */
@media (max-width: 768px) {

    /* Altura fija pero con scroll si es necesario */
    .val-flip-card {
        height: 300px !important;
    }

    /* Icono más pequeño pero proporcionado */
    .value-icon {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 1rem !important;
    }

    .value-icon svg {
        width: 24px !important;
        height: 24px !important;
    }

    /* Título con tamaño adaptativo y word-break */
    .value-title {
        font-size: 1rem !important;
        word-break: break-word !important;
        line-height: 1.3 !important;
        margin-bottom: 0.8rem !important;
    }

    /* Texto trasero con scroll si es necesario */
    .val-back {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        padding: 1.5rem !important;
        overflow-y: auto !important;
    }

    /* Padding general de las caras */
    .val-face {
        padding: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .val-flip-card {
        height: 320px !important;
    }

    .value-title {
        font-size: 0.9rem !important;
    }

    .val-back {
        font-size: 0.8rem !important;
        padding: 1rem !important;
    }
}

/* =====================================================
   EXTRA: MEJORA GENERAL EN MÓVIL
   ===================================================== */
@media (max-width: 768px) {

    /* Evita que el texto de filosofía se desborde */
    .mv-back p,
    .val-back p {
        margin: 0 !important;
        word-break: break-word !important;
    }

    /* Ajuste de grid de valores en móvil */
    .about-values-detailed {
        gap: 1.5rem !important;
    }

    .mv-back,
    .val-back {
        touch-action: none;
        /* Evita scroll táctil dentro del reverso */
        overflow-y: hidden;
        /* Opcional: elimina la barra de scroll */
    }
}