/* Import Google Font Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #0f3266;
    --accent-orange: #f2521d;
    --accent-pink: #d63384;
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.85);
    --transition-speed: 0.3s;
    --nav-height: 118px;
}

/* Import Work Sans (usado por el index) */
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

h1 {
    font-size: 3.815rem;
    line-height: 1 !important;
    word-spacing: -3px;
    margin-bottom: 1%;
}

h2 {
    font-size: 3.052rem;
}

h3 {
    font-size: 2.1rem;
}

h4 {
    font-size: 1.953rem;
}

h5 {
    font-size: 1.563rem;
}

h6 {
    font-size: 1.25rem;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: "Work Sans", sans-serif !important;
    font-weight: 500 !important;
    line-height: 1.1;
}

.container {
    max-width: 90% !important;
}

p {
    font-family: "Work Sans", sans-serif !important;
}

.hero-text-movil {
    display: none;
}

.hero-text-pc {
    display: block;
}

.highlight {
    text-decoration: none !important;
    text-decoration-color: none !important;
    text-decoration-thickness: 0 !important;
    text-underline-offset: 0 !important;
    color: #f08531 !important;
    font-weight: 700 !important
}

.hero-section-wrap {
    position: sticky !important;
    top: 0;
    height: 100vh;
    /* Ocupa toda la pantalla */
    z-index: 1;
    /* Capa inferior */
}

section {
    position: relative;
    z-index: 10;
}

.row-hero-text {
    height: 80vh;
}

.problem {
    background-color: #f8f4f5ff;
    height: auto;
    margin-bottom: 5%;
}

.about-img img {
    width: 100%;
}

.about-row-content {
    gap: 3%;
    padding-left: 25%;
}

.trust {
    height: auto;
    display: flex;
    align-items: center;
    background: white;
    color: #000;
    padding: 5% 0;
    justify-content: center;
}

.bigsiymbol {
    font-size: 5rem;
}

.question {
    background: white;
    height: auto;
    padding: 5% 0;
}

.question-img img {
    width: 60%;
}

.question-content {
    width: 90%;
}

.question-col {
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
}

/* Hero Section Container */
#hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    margin-top: calc(-1 * var(--nav-height, 118px));
}

/* Background Video Styles */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: 100vh;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Hero Content Area */
.blurbg {
    position: absolute;
    z-index: 100;
    top: 0;
    left: 0;
    background: #01075373;
    width: 100%;
    height: 100vh;
}

.hero-content-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding-bottom: 80px;
    z-index: 2;
}

.hero-content-container .container {
    position: relative;
    z-index: 1000;
}

.hero-text-container p {
    padding-left: 20%;
}

/* Left Column Heading */
.hero-title-left {
    line-height: 1.4;
    font-weight: bold;
}

/* Why MGD Content */
.section-white {
    height: auto;
    display: flex;
    align-items: center;
    background: #f6f6f6;
    color: #000;
    padding: 2.5% 0 20% 0;
}

/* Benefits Section Styling */
#benefits {
    background-color: #0f2656;
    height: 0;
    overflow: hidden;
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
}

#benefits h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.5px;
    margin-bottom: 0;
}

.benefits-list {
    padding: 2%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/*services section*/
.services {
    background-color: #efefef;
    height: auto;
    padding: 10% 0;
}

.services-text {
    padding: 0 5%;
}

/* Responsive Breakpoints */
@media (max-width: 575.98px) {
    .navbar-brand img {
        max-height: 50px;
    }

    .hero-text-movil {
        display: block !important;
    }

    .hero-text-pc {
        display: none !important;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2.2rem !important;
    }

    h3 {
        font-size: 1.8rem !important;
    }

    .title-hero h5,
    .title-hero h1 {
        text-align: left !important;
    }

    .title-hero h5 {
        display: none;
    }

    .title-hero h5 {
        font-size: 1.2rem !important;
        line-height: 1.4 !important;
        margin-bottom: 6% !important;
    }

    .row-hero-text {
        height: auto;
    }

    .hero-video {
        position: absolute;
        top: 55%;
        left: 0;
        width: auto;
        height: auto;
        transform: translate(-50%, -50%);
    }

    .hero-content-container {
        display: flex;
        align-items: center;
        height: auto;
        position: relative;
    }

    .hero-section {
        height: auto;
        padding: 6% 0;
    }

    .hero-section-wrap {
        display: flex;
        flex-direction: column;
    }

    .button-wrapper {
        width: 100%;
        justify-content: left !important;
        margin-top: 8% !important;
    }

    .button-wrapper-benefits {
        display: flex;
        justify-content: center !important;
        margin-top: 4%;
    }

    .button-wrapper-benefits>button {
        padding: 4%;
    }

    .problem {
        padding: 10% 0;
    }

    .problem-text-movil {
        margin-top: -17% !important;
    }

    .question {
        padding: 15% 0;
    }

    .question-img img {
        width: 100%;
    }

    .about-row-content {
        gap: 3%;
        padding-left: 0;
    }

    .button-wrapper {
        justify-content: center !important;
        margin-top: 22% !important;
    }

    .btn-left {
        /*justify-content: flex-start !important;*/
        margin-top: 5% !important;
    }

    .bigsiymbol {
        font-size: 2rem;
        margin-top: -70px;
    }

    .section-white {
        position: relative;
        padding: 0;
    }

    #benefits {
        position: relative;
        height: 30vh;
        padding: 5% 0;
    }

    .benefits {
        position: relative;
        height: auto;
        padding: 10% 0;
    }

    .benefits-row {
        display: flex;
        flex-direction: column;
    }

    .benefits-list {
        width: 100%;
        margin-top: 10%;
    }

    #services {
        height: auto;
        padding: 20% 0;
    }

    .services-text {
        padding: 0;
    }

    .services {
        padding: 12% 0;
    }

    .index-text .services-title-container {
        width: 100% !important;
    }

    .index-text .os-actions {
        justify-content: center !important;
    }

    .index-text #benefits h2 {
        color: #1c1c1e;
        width: 100% !important;
    }

    .os-thumbs {
        order: 2 !important;
    }

    .index-text .os-copy {
        padding: 0 !important;
    }
}

/* ============================================================
   INDEX-TEXT VIEW — vista editorial "Serenidad certificada"
   Todos los estilos están scoped bajo body.index-text para
   no afectar a la vista index.php.
   ============================================================ */
body.index-text {
    font-family: "Inter", system-ui, -apple-system,
        "Segoe UI", sans-serif;
    line-height: 1.65;
    background-color: #F5F5F5;
    color: #1c1c1e;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.index-text .display-1,
.index-text .display-2,
.index-text .h1,
.index-text h1,
.index-text .h2,
.index-text h2 {
    font-family: "Space Grotesk", system-ui, -apple-system,
        "Segoe UI", sans-serif;
    font-weight: 400;
    color: #1c1c1e;
    letter-spacing: -0.02em;
}

.index-text h3,
.index-text h4,
.index-text h5 {
    font-weight: 400;
}

.index-text .text-editorial-muted {
    font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
}

.index-text #benefits {
    background-color: #efefef;
}

.index-text #benefits h2 {
    color: #1c1c1e;
    width: 50%;
}

/* Textos del hero en blanco para legibilidad sobre el video */
.index-text #hero .hero-title-left,
.index-text #hero #hero-heading-left,
.index-text #hero .hero-title-right,
.index-text #hero #hero-heading-right,
.index-text #hero .title-hero h5,
.index-text #hero #hero-desc-right,
.index-text #hero .hero-description-right {
    color: #ffffff;
}

.index-text .services-title-container {
    width: 55%;
}

.index-text .hero-text-container p {
    padding-left: 0% !important;
    font-size: 1.1rem;
    width: 65%;
}

.index-text .button-wrapper {
    justify-content: flex-start;
}

.index-text #hero .blurbg {
    background: transparent;
}

/* ============================================================
   OURSERVICES — galería/portafolio minimalista "Impeccable"
   Tira de miniaturas a la izquierda · texto central · imagen
   destacada a la derecha. Fondo gris muy claro, esquinas
   pronunciadas, micro-interacciones de hover.
   ============================================================ */
.index-text #ourservices {
    background: white;
    padding: clamp(4.5rem, 10vw, 8rem) 0;
}

.index-text .os-gallery {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    display: grid;
    grid-template-columns: auto 1fr 1.25fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.index-text .os-thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.index-text .os-thumb {
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: #e8e8e8;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s ease,
        opacity 0.3s ease;
    opacity: 0.55;
    filter: saturate(0.85);
}

.index-text .os-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.index-text .os-thumb:hover {
    transform: translateX(4px) scale(1.05);
    opacity: 1;
    filter: saturate(1);
    box-shadow: 0 10px 22px rgba(15, 50, 102, 0.16);
}

.index-text .os-thumb.is-active {
    opacity: 1;
    filter: saturate(1);
    transform: translateX(4px);
    box-shadow: 0 0 0 2px #0f3266, 0 12px 24px rgba(15, 50, 102, 0.18);
}

.index-text .os-copy {
    padding: 1rem 0;
}

.index-text .os-tag-label {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #0f3266;
}

.index-text .os-title {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0a1f3c;
    margin: 0 0 1.1rem;
    max-width: 12ch;
}

.index-text .os-sub {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin: 0 0 1.8rem;
}

.index-text .os-desc {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 1.02rem;
    line-height: 1.75;
    color: #4a5a6e;
    max-width: 42ch;
    margin: 0 0 1rem;
}

.index-text .os-list {
    list-style: none;
    margin: 0 0 2.4rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.index-text .os-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.98rem;
    line-height: 1.6;
    color: #2b3a50;
}

.index-text .os-list li i {
    color: #f2521d;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    flex: 0 0 auto;
}

.index-text .os-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #ffffff;
    background: #f2521d;
    border: 0;
    border-radius: 100px;
    padding: 0.7rem 1.4rem;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(242, 82, 29, 0.28);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.index-text .os-tag:hover,
.index-text .os-tag:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(242, 82, 29, 0.36);
    color: #ffffff;
}

.index-text .os-tag .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
    flex: 0 0 auto;
}

.index-text .os-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
}

.index-text .btn-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #ffffff;
    background: #0f3266;
    border: 0;
    border-radius: 100px;
    padding: 0.7rem 1.4rem;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(15, 50, 102, 0.24);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.index-text .btn-blue:hover,
.index-text .btn-blue:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 50, 102, 0.32);
    color: #ffffff;
}

.index-text .os-featured {
    position: relative;
}

.index-text .os-featured figure {
    margin: 0;
    border-radius: 40px;
    overflow: hidden;
    background: #e8e8e8;
    box-shadow: 0 30px 60px rgba(15, 50, 102, 0.18);
}

.index-text .os-featured img {
    width: 100%;
    height: clamp(380px, 46vw, 620px);
    object-fit: cover;
    display: block;
    transition: opacity 0.4s ease;
}

.index-text .os-featured img.swapping {
    opacity: 0;
}

@media (max-width: 991.98px) {
    .index-text .os-gallery {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .index-text .os-thumbs {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .index-text .os-copy {
        order: 2;
    }

    .index-text .os-featured {
        order: 1;
    }

    .index-text .os-featured img {
        height: clamp(320px, 60vw, 460px);
    }

    .index-text .os-title {
        max-width: 16ch;
    }
}