:root {
    --clr-brand-red: #FDB913;
    --clr-brand-gold: #FDB913;
    --clr-brand-blue: #FDB913;
    --clr-dark: #1e293b;
    --clr-text: #475569;
    --clr-bg-light: #f8fafc;
    --clr-bg-card: #ffffff;
    --clr-border: #e2e8f0;
    --clr-green-flat: #FDB913;

    --clr-blue-dark: #081178;
    --clr-blue-main: #1A3E7C;

    --clr-brand-title: linear-gradient(90deg, var(--clr-blue-main), var(--clr-brand-gold));

    --font-pro: 'Inter', 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-pro);
    color: var(--clr-text);
    background-color: #ffffff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.about-header {
    background-color: var(--clr-bg-light);
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--clr-border);
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-header h1 {
    font-size: 3rem;
    background: var(--clr-brand-title);
    font-weight: 800;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.about-header h1 span {
    color: var(--clr-brand-blue);
}

.about-header p {
    font-size: 1.15rem;
    color: var(--clr-text);
    font-weight: 400;
}

/* Sección Quiénes Somos */
.content-section {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.images-column .image-pro {
    width: 100%;
    height: clamp(420px, 27vw, 500px);
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

.text-column h2 {
    font-size: 2.2rem;
    background: var(--clr-brand-title);
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.text-lead {
    font-size: 1.2rem;
    color: var(--clr-dark);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.text-column p {
    text-align: justify;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.text-column strong {
    color: var(--clr-brand-blue);
}

/* Pilares en Grilla */
.about-grid {
    padding: 5rem 1.5rem;
    background-color: var(--clr-bg-light);
}

.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.about-card {
    background: var(--clr-bg-card);
    padding: 3rem 2.5rem;
    border-radius: 0px;
    border: 1px solid var(--clr-border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-card:hover {
    transform: translateY(-4px);
    border-color: var(--clr-brand-blue);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
}

.about-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.about-card h3 {
    font-size: 1.4rem;
    color: var(--clr-dark);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.about-card p {
    font-size: 0.95rem;
    color: var(--clr-text);
    text-align: justify;
}

/* =========================================
   BOTÓN - CONOCE NUESTRA HISTORIA
========================================= */
.btn-history {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 12px 22px;
    border: 0;
    border-radius: 6px;
    background: var(--clr-brand-gold);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.25s ease;
}

.btn-history:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-history-icon {
    font-size: 1.1rem;
    transition: transform 0.25s ease;
}

.btn-history:hover .btn-history-icon {
    transform: translateX(4px);
}

/* =========================================
   MODAL
========================================= */
.history-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    visibility: hidden;
    opacity: 0;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}
.history-modal.active {
    visibility: visible;
    opacity: 1;
}

/* Fondo oscuro */
.history-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(4px);
}

/* Contenedor */
.history-modal-content {
    position: relative;
    z-index: 1;
    width: min(100%, 1000px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    transform: translateY(25px) scale(0.98);
    transition: transform 0.3s ease;
}
.history-modal.active .history-modal-content {
    transform: translateY(0) scale(1);
}

/* =========================================
   HEADER DEL MODAL
========================================= */
.history-modal-header {
    position: relative;
    min-height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 80px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.history-modal-logo {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.history-modal-logo img {
    display: block;
    width: 150px;
    height: auto;
    object-fit: contain;
}

.history-modal-title {
    text-align: center;
}

.history-modal-label {
    display: block;
    margin-bottom: 5px;
    color: var(--clr-brand-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.history-modal-title h2 {
    margin: 0;
    color: var(--clr-dark);
    font-size: 1.7rem;
    line-height: 1.2;
}

.history-modal-label {
    display: block;
    margin-bottom: 5px;
    color: var(--clr-brand-gold);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.history-modal-header h2 {
    margin: 0;
    color: var(--clr-dark);
    font-size: 1.8rem;
}

/* Botón cerrar */
.history-modal-close {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.history-modal-close:hover {
    background: var(--clr-brand-gold);
    color: #ffffff;
    transform: translateY(-50%) rotate(90deg);
}

/* =========================================
   CUERPO DEL MODAL
========================================= */
.history-modal-body {
    padding: 35px 40px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Scrollbar */
.history-modal-body::-webkit-scrollbar {
    width: 7px;
}
.history-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.history-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.history-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =========================================
   CAPÍTULOS
========================================= */
.history-item {
    position: relative;
    display: grid;
    grid-template-columns: 55px 1fr;
    gap: 20px;
    padding-bottom: 38px;
    margin-bottom: 38px;
    border-bottom: 1px solid #e5e7eb;
}
.history-item:last-child {
    margin-bottom: 0;
}

/* Número */
.history-number {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--clr-brand-gold);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Contenido */
.history-item-content h3 {
    margin: 2px 0 12px;
    color: var(--clr-dark);
    font-size: 1.25rem;
    line-height: 1.3;
}
.history-item-content p {
    margin: 0 0 12px;
    color: var(--clr-text);
    font-size: 0.95rem;
    line-height: 1.75;
}
.history-item-content p:last-child {
    margin-bottom: 0;
}
.history-final-message {
    margin-top: 20px !important;
    color: var(--clr-brand-gold) !important;
    font-size: 1rem !important;
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 768px) {
    .history-modal {
        padding: 15px;
    }
    .history-modal-content {
        max-height: 92vh;
        border-radius: 10px;
    }
    .history-modal-header {
        padding: 20px;
    }
    .history-modal-header h2 {
        font-size: 1.4rem;
    }
    .history-modal-body {
        padding: 25px 20px;
    }
    .history-item {
        grid-template-columns: 42px 1fr;
        gap: 14px;
        padding-bottom: 28px;
        margin-bottom: 28px;
    }
    .history-number {
        width: 38px;
        height: 38px;
        font-size: 0.72rem;
    }
    .history-item-content h3 {
        font-size: 1.05rem;
    }
    .history-item-content p {
        font-size: 0.9rem;
        line-height: 1.65;
    }
    .btn-history {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .history-modal-header {
        padding: 18px 16px;
    }
    .history-modal-label {
        font-size: 0.65rem;
    }
    .history-modal-header h2 {
        font-size: 1.25rem;
    }
    .history-modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }
    .history-modal-body {
        padding: 22px 16px;
    }
}

/* SECCIÓN NUESTROS VALORES */
.about-values {
    padding: 2rem 1rem;
    background-color: var(--clr-bg-card);
    text-align: center;
}

.values-container {
    max-width: 1280px;
    margin: 0 auto;
}

.values-title {
    font-size: 1.7rem;
    font-weight: 400;
    color: #2c3e50;
    text-transform: capitalize;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    letter-spacing: 0.5px;
}

.values-title span {
    font-weight: 700;
    background:var(--clr-brand-title);
    background-clip: text;
    color: transparent;
}

.values-title::before,
.values-title::after {
    content: '';
    width: 60px;
    height: 1.5px;
    background-color: var(--clr-green-flat);
    display: inline-block;
}

.values-grid-flat {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 3.5rem;
    position: relative;
}

.value-item-flat {
    padding: 0 1.8rem;
    text-align: center;
    position: relative;
}

.value-item-flat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    width: 1px;
    height: 70%;
    background-color: var(--clr-border);
}

.value-icon-flat {
    color: var(--clr-green-flat);
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.value-item-flat h4 {
    font-size: 1.25rem;
    color: #1a202c;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.value-item-flat p {
    font-size: 0.95rem;
    color: var(--clr-text);
    line-height: 1.6;
    text-align: center;
}

/* Misión y Visión */
.vm-section {
    padding: 3rem 1.5rem;
    background-color: var(--clr-bg-light);
    border-top: 1px solid var(--clr-border);
}

.vm-container-pro {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.vm-block {
    display: flex;
    flex-direction: column;
}

.vm-tag {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--clr-brand-red);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.vm-block h2 {
    font-size: 2.5rem;
    background: var(--clr-brand-title);
    background-clip: text;
    color: transparent;
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}

.vm-block p {
    font-size: 1.05rem;
    color: var(--clr-text);
    text-align: justify;
}

@media (max-width: 992px) {
    .content-container, .vm-container-pro {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .values-grid-flat {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem 0;
    }

    .value-item-flat:nth-child(2)::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .about-header h1 {
        font-size: 2.2rem;
    }

    .values-grid-flat {
        grid-template-columns: 1fr;
        gap: 2.5rem 0;
    }

    .value-item-flat::after {
        display: none !important;
    }

    .images-column .image-pro {
        height: 300px;
    }

    .history-modal-logo img {
        display: none;
    }
}