/* =========================================================
   DIBAMED SHARED HEADER + FOOTER V111
   Isolated selectors — no legacy generic class conflicts
   ========================================================= */

/* ================= HEADER ================= */

.d111-header-shell,
.d111-header-shell * {
    box-sizing: border-box;
}

.d111-header-shell {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 8px clamp(12px, 2vw, 34px) 9px;
    background: linear-gradient(
        180deg,
        rgba(245, 255, 254, .97),
        rgba(245, 255, 254, .82)
    );
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.d111-header {
    width: 100%;
    max-width: 1640px;
    min-height: 82px;
    margin: 0 auto;
    padding: 9px 16px;

    display: grid;
    grid-template-columns:
        minmax(260px, 305px)
        minmax(530px, 1fr)
        auto;
    grid-template-areas: "brand nav actions";
    align-items: center;
    gap: clamp(15px, 1.5vw, 26px);

    border: 1px solid rgba(9, 57, 69, .08);
    border-radius: 0 0 28px 28px;

    background:
        linear-gradient(
            100deg,
            rgba(255,255,255,.99),
            rgba(255,255,255,.965) 57%,
            rgba(255,248,246,.975)
        );

    box-shadow:
        0 16px 42px rgba(7, 38, 50, .075),
        inset 0 1px 0 rgba(255,255,255,.95);
}

.d111-brand {
    grid-area: brand;
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 14px;

    padding-inline-end: 18px;
    border-inline-end: 1px solid rgba(7, 46, 61, .09);

    color: #071c39;
    text-decoration: none;
}

.d111-brand img {
    display: block;
    width: 68px;
    height: 56px;
    object-fit: contain;
    flex: 0 0 68px;
}

.d111-brand strong {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 18px;
    line-height: 1.02;
    letter-spacing: -.04em;
    font-weight: 900;
    color: #071c39;
}

.d111-nav {
    grid-area: nav;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(15px, 1.25vw, 24px);
    white-space: nowrap;
}

.d111-nav a {
    position: relative;
    padding: 9px 0;

    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1;
    font-weight: 850;

    color: #071c39;
    text-decoration: none;
    transition: color .2s ease;
}

.d111-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;

    height: 2px;
    border-radius: 999px;

    background: linear-gradient(90deg, #00a795, #e0b56c, #e75d7c);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

.d111-nav a:hover,
.d111-nav a.is-active {
    color: #008679;
}

.d111-nav a:hover::after,
.d111-nav a.is-active::after {
    transform: scaleX(1);
}

.d111-actions {
    grid-area: actions;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;

    direction: ltr;
}

.d111-language,
.d111-action {
    position: relative;
    overflow: hidden;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    height: 40px;
    min-height: 40px;
    margin: 0;

    border-radius: 14px;
    text-decoration: none;
    white-space: nowrap;

    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1;
    font-weight: 850;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.d111-language {
    gap: 6px;
    padding: 5px 10px 5px 6px;

    color: #087b76;
    border: 1px solid rgba(0, 148, 137, .20);
    background: rgba(244,255,254,.90);

    box-shadow:
        0 8px 20px rgba(0, 112, 107, .08),
        inset 0 1px 0 rgba(255,255,255,.94);
}

.d111-language-icon {
    position: static;
    inset: auto;

    display: grid;
    place-items: center;

    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;

    padding: 0;
    margin: 0;

    border-radius: 10px;
    color: #fff;

    background:
        radial-gradient(circle at 32% 24%, #38d9ca, #008d88 65%, #047170);

    box-shadow:
        0 6px 13px rgba(0, 126, 120, .22),
        inset 0 1px 0 rgba(255,255,255,.35);
}

.d111-language-icon svg {
    display: block;
    width: 17px;
    height: 17px;
}

.d111-action {
    gap: 7px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,.48);
    color: #fff;
}

.d111-action svg {
    display: block;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.d111-whatsapp {
    background: linear-gradient(135deg, #18ca79, #009b5d);
    box-shadow: 0 11px 24px rgba(0, 155, 93, .18);
}

.d111-book {
    background: linear-gradient(135deg, #ef7e9c, #d84670);
    box-shadow: 0 11px 25px rgba(210, 65, 105, .17);
}

.d111-language:hover,
.d111-action:hover {
    transform: translateY(-1px);
}

.d111-whatsapp:hover {
    box-shadow: 0 14px 30px rgba(0, 155, 93, .24);
}

.d111-book:hover {
    box-shadow: 0 14px 30px rgba(210, 65, 105, .24);
}

.d111-mobile-menu {
    display: none;
    grid-area: menu;
    position: relative;
}

.d111-mobile-menu summary {
    width: 40px;
    height: 40px;
    padding: 0;

    display: grid;
    place-content: center;
    gap: 4px;

    border: 1px solid rgba(0, 137, 126, .18);
    border-radius: 13px;

    background: rgba(255,255,255,.88);
    cursor: pointer;
    list-style: none;
}

.d111-mobile-menu summary::-webkit-details-marker {
    display: none;
}

.d111-mobile-menu summary span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #087c76;
}

.d111-mobile-menu nav {
    position: absolute;
    top: 48px;
    right: 0;
    z-index: 20;

    min-width: 220px;
    padding: 10px;

    display: grid;
    gap: 3px;

    border: 1px solid rgba(8, 52, 66, .10);
    border-radius: 18px;

    background: rgba(255,255,255,.97);
    box-shadow: 0 24px 60px rgba(6, 41, 55, .16);

    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.d111-mobile-menu nav a {
    padding: 11px 12px;
    border-radius: 10px;

    font-size: 13px;
    font-weight: 800;

    color: #071c39;
    text-decoration: none;
}

.d111-mobile-menu nav a:hover {
    color: #007f75;
    background: #edfafa;
}

/* ================= FOOTER ================= */

.d111-footer,
.d111-footer * {
    box-sizing: border-box;
}

.d111-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    padding:
        clamp(50px, 4.8vw, 76px)
        clamp(22px, 4vw, 68px)
        22px;

    color: #fff;

    border-top: 1px solid rgba(237, 197, 121, .55);

    background:
        radial-gradient(
            circle at 88% 10%,
            rgba(89, 232, 218, .18),
            transparent 25%
        ),
        radial-gradient(
            circle at 70% 92%,
            rgba(237, 190, 109, .13),
            transparent 29%
        ),
        linear-gradient(
            125deg,
            #05364a 0%,
            #004f61 46%,
            #008277 100%
        );
}

.d111-footer::before {
    content: "";
    position: absolute;
    z-index: -1;

    width: 520px;
    height: 520px;
    right: -170px;
    top: -270px;

    border: 1px solid rgba(246, 214, 153, .13);
    border-radius: 50%;
}

.d111-footer::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;

    background:
        linear-gradient(
            116deg,
            transparent 0 62%,
            rgba(245, 211, 143, .09) 62.05%,
            transparent 62.30%
        );

    pointer-events: none;
}

.d111-footer-inner {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
}

.d111-footer-top {
    display: grid;
    grid-template-columns:
        minmax(225px, 1.1fr)
        minmax(145px, .62fr)
        minmax(145px, .62fr)
        minmax(230px, .94fr)
        minmax(270px, 1.05fr);

    gap: clamp(24px, 3vw, 50px);
    align-items: start;
}

.d111-footer-brand img {
    display: block;
    width: 148px;
    height: auto;
    margin-bottom: 15px;
    object-fit: contain;

    filter: drop-shadow(0 12px 28px rgba(0,0,0,.14));
}

.d111-footer-brand > p {
    max-width: 270px;
    margin: 0;

    color: rgba(255,255,255,.84);
    font-size: 14px;
    line-height: 1.55;
}

.d111-footer-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 17px;
}

.d111-footer-trust span {
    padding: 6px 9px;

    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;

    background: rgba(255,255,255,.055);

    color: rgba(255,255,255,.82);
    font-size: 10px;
    line-height: 1;
    font-weight: 750;
}

.d111-footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
}

.d111-footer-column h2 {
    margin: 0 0 10px;

    color: #ffe2a0;

    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.d111-footer-column a,
.d111-footer-column address {
    color: rgba(255,255,255,.86);

    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1.48;
    font-weight: 500;

    text-decoration: none;
    font-style: normal;
}

.d111-footer-column a {
    transition:
        color .2s ease,
        transform .2s ease;
}

.d111-footer-column a:hover {
    color: #ffe4a8;
    transform: translateX(2px);
}

.d111-footer-contact address {
    margin-top: 4px;
    color: rgba(255,255,255,.74);
}

.d111-footer-cta {
    padding: 21px;

    border: 1px solid rgba(255,255,255,.19);
    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.14),
            rgba(255,255,255,.055)
        );

    box-shadow:
        0 22px 50px rgba(0, 38, 53, .15),
        inset 0 1px 0 rgba(255,255,255,.17);

    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.d111-footer-eyebrow {
    display: block;
    margin-bottom: 10px;

    color: #ffe1a0;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.d111-footer-cta h2 {
    margin: 0;

    color: #fff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 600;
}

.d111-footer-cta p {
    margin: 11px 0 17px;

    color: rgba(255,255,255,.77);
    font-size: 12px;
    line-height: 1.5;
}

.d111-footer-cta > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.d111-footer-cta a {
    min-height: 38px;
    padding: 9px 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.23);
    border-radius: 12px;

    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 850;
    text-decoration: none;

    background: rgba(255,255,255,.09);
}

.d111-footer-cta a:first-child {
    background: linear-gradient(135deg, #19c77b, #009962);
}

.d111-footer-cta a:last-child {
    background: linear-gradient(135deg, #ef7b99, #d94770);
}

.d111-socials {
    display: flex;
    gap: 7px;
    margin-top: 18px;
}

.d111-socials a {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;

    color: rgba(255,255,255,.87);
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;

    background: rgba(255,255,255,.035);
    transition: .2s ease;
}

.d111-socials a:hover {
    color: #063e50;
    background: #ffe1a0;
    border-color: #ffe1a0;
    transform: translateY(-2px);
}

.d111-footer-gallery {
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.d111-footer-gallery-heading {
    margin-bottom: 13px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.d111-footer-gallery-heading span {
    color: #ffe2a0;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.d111-footer-gallery-heading strong {
    color: rgba(255,255,255,.80);
    font-size: 12px;
    font-weight: 650;
}

.d111-footer-gallery-images {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.d111-footer-gallery-images img {
    display: block;
    width: 100%;
    height: 88px;

    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;

    object-fit: cover;
    filter: saturate(.92) contrast(1.02);

    transition:
        transform .25s ease,
        filter .25s ease;
}

.d111-footer-gallery-images img:hover {
    transform: translateY(-2px);
    filter: saturate(1.04) contrast(1.03);
}

.d111-footer-bottom {
    margin-top: 28px;
    padding-top: 20px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;

    border-top: 1px solid rgba(255,255,255,.12);

    color: rgba(255,255,255,.65);
    font-size: 11px;
    line-height: 1.4;
}

.d111-footer-bottom > span:last-child {
    justify-self: end;
    display: flex;
    gap: 15px;
}

.d111-footer-bottom a {
    color: rgba(255,255,255,.78);
    text-decoration: none;
}

.d111-footer-bottom a:hover {
    color: #ffe2a0;
}

.d111-footer-credit {
    justify-self: center;
}

.d111-footer-credit a {
    color: #ffe2a0;
    font-weight: 800;
}

/* ================= RTL ================= */

html[dir="rtl"] .d111-header {
    grid-template-columns:
        auto
        minmax(530px, 1fr)
        minmax(260px, 305px);

    grid-template-areas: "actions nav brand";
}

html[dir="rtl"] .d111-brand {
    padding-inline-start: 18px;
    padding-inline-end: 0;
    border-inline-start: 1px solid rgba(7, 46, 61, .09);
    border-inline-end: 0;
}

html[dir="rtl"] .d111-nav a::after {
    transform-origin: right;
}

html[dir="rtl"] .d111-footer-column {
    align-items: flex-start;
    text-align: right;
}

html[dir="rtl"] .d111-footer-column a:hover {
    transform: translateX(-2px);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1360px) {
    .d111-header {
        grid-template-columns:
            minmax(220px, 260px)
            minmax(445px, 1fr)
            auto;

        gap: 12px;
        padding-inline: 13px;
    }

    html[dir="rtl"] .d111-header {
        grid-template-columns:
            auto
            minmax(445px, 1fr)
            minmax(220px, 260px);
    }

    .d111-brand img {
        width: 60px;
        height: 50px;
        flex-basis: 60px;
    }

    .d111-brand strong {
        font-size: 16px;
    }

    .d111-nav {
        gap: 13px;
    }

    .d111-nav a {
        font-size: 12px;
    }

    .d111-language,
    .d111-action {
        height: 38px;
        min-height: 38px;
        font-size: 11px;
    }

    .d111-action {
        padding-inline: 11px;
    }

    .d111-footer-top {
        grid-template-columns:
            minmax(210px, 1.05fr)
            minmax(140px, .7fr)
            minmax(140px, .7fr)
            minmax(210px, 1fr);
    }

    .d111-footer-cta {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 18px;
    }

    .d111-footer-cta p {
        margin: 0;
    }
}

@media (max-width: 1050px) {
    .d111-header {
        grid-template-columns: 1fr auto auto;
        grid-template-areas: "brand actions menu";
        min-height: 72px;
    }

    html[dir="rtl"] .d111-header {
        grid-template-columns: auto auto 1fr;
        grid-template-areas: "menu actions brand";
    }

    .d111-nav {
        display: none;
    }

    .d111-mobile-menu {
        display: block;
    }

    html[dir="rtl"] .d111-mobile-menu nav {
        right: auto;
        left: 0;
    }

    .d111-footer-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .d111-footer-cta {
        grid-column: auto;
        display: block;
    }

    .d111-footer-cta p {
        margin: 11px 0 17px;
    }

    .d111-footer-bottom {
        grid-template-columns: 1fr 1fr;
    }

    .d111-footer-credit {
        justify-self: end;
    }

    .d111-footer-bottom > span:last-child {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 700px) {
    .d111-header-shell {
        padding: 6px;
    }

    .d111-header {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand menu"
            "actions actions";

        gap: 8px;
        padding: 10px;
        border-radius: 0 0 22px 22px;
    }

    html[dir="rtl"] .d111-header {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "menu brand"
            "actions actions";
    }

    .d111-brand {
        padding: 0;
        border: 0;
    }

    html[dir="rtl"] .d111-brand {
        padding: 0;
        border: 0;
    }

    .d111-brand img {
        width: 50px;
        height: 42px;
        flex-basis: 50px;
    }

    .d111-brand strong {
        font-size: 14px;
    }

    .d111-actions {
        width: 100%;
        justify-content: center;
        gap: 6px;
    }

    .d111-language,
    .d111-action {
        height: 36px;
        min-height: 36px;
        border-radius: 12px;
        font-size: 10px;
    }

    .d111-language {
        padding: 4px 8px 4px 5px;
    }

    .d111-language-icon {
        width: 25px;
        height: 25px;
        min-width: 25px;
        max-width: 25px;
        border-radius: 8px;
    }

    .d111-language-icon svg {
        width: 15px;
        height: 15px;
    }

    .d111-action {
        padding-inline: 9px;
    }

    .d111-action svg {
        width: 15px;
        height: 15px;
        flex-basis: 15px;
    }

    .d111-footer {
        padding: 42px 18px 20px;
    }

    .d111-footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .d111-footer-gallery-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .d111-footer-gallery-images {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .d111-footer-gallery-images img {
        height: 82px;
    }

    .d111-footer-bottom {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .d111-footer-credit,
    .d111-footer-bottom > span:last-child {
        justify-self: start;
        grid-column: auto;
    }
}

@media (max-width: 390px) {
    .d111-book span {
        max-width: 73px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .d111-action {
        padding-inline: 8px;
    }
}
