/* =========================================================
   Inner pages (articles, videos) + home "latest" section.
   Builds on styles.css variables: --brand, --brand-dark, --ink, --soft
   ========================================================= */

/* ---------- Menu: current page ---------- */
.link-white.is-active {
    opacity: 1;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* ---------- Inner page header ---------- */
.page-hero {
    background:
        radial-gradient(circle at 12% 20%, rgba(0, 175, 188, .12) 0, transparent 45%),
        radial-gradient(circle at 90% 90%, rgba(0, 175, 188, .10) 0, transparent 40%),
        var(--soft);
    padding-top: 130px;
    padding-bottom: 3rem;
}

.page-hero-inner {
    position: relative;
}

.page-hero-title {
    color: var(--brand);
    font-weight: 800;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.35;
    max-width: 900px;
    margin: 0;
}

.page-hero-sub {
    color: #6c757d;
    font-size: 1.1rem;
    margin-top: .5rem;
}

.page-breadcrumb {
    font-size: .95rem;
    --bs-breadcrumb-divider: '‹';
}

.page-breadcrumb a {
    color: var(--brand-dark);
    text-decoration: none;
}

.page-breadcrumb a:hover {
    text-decoration: underline;
}

@media (max-width: 992px) {
    .page-hero {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }
}

/* ---------- Section titles ---------- */
.section-title {
    color: var(--brand);
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

/* ---------- Category filter + search ---------- */
.cat-pill {
    display: inline-block;
    padding: .45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid #cfe9ec;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
}

.cat-pill:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.cat-pill.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.post-search .form-control {
    border-radius: 999px;
    padding: .5rem 1.2rem;
    min-width: 260px;
    border-color: #cfe9ec;
}

.post-search .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(0, 175, 188, .15);
}

/* ---------- Cards ---------- */
.post-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 175, 188, .16);
}

.post-card-media {
    display: block;
    background: var(--soft);
    overflow: hidden;
}

.post-card-media img {
    width: 100%;
    height: 100%;
    transition: transform .4s ease;
}

.post-card:hover .post-card-media img {
    transform: scale(1.04);
}

.post-card-body {
    padding: 1.1rem 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 0 0 .5rem;
}

.post-card-title a {
    color: var(--ink);
    text-decoration: none;
}

.post-card:hover .post-card-title a {
    color: var(--brand);
}

.post-card-text {
    color: #6c757d;
    font-size: .98rem;
    line-height: 1.8;
    margin-bottom: .75rem;
}

.post-card-more {
    margin-top: auto;
    color: var(--brand);
    font-weight: 700;
    font-size: .95rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    color: #8a949c;
    font-size: .9rem;
    margin-bottom: .6rem;
}

.post-meta-lg {
    font-size: 1rem;
}

.post-chip {
    background: rgba(0, 175, 188, .1);
    color: var(--brand-dark);
    border-radius: 999px;
    padding: .15rem .75rem;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

/* Video thumbnails */
.video-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(0, 175, 188, .92);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .35);
    transition: transform .25s ease;
}

.video-play svg {
    margin-left: 4px; /* optical centring of the triangle */
}

.post-card:hover .video-play {
    transform: scale(1.08);
}

.video-duration {
    position: absolute;
    /* .ratio > * forces full size, so undo that for this badge */
    inset: auto auto 10px 10px;
    width: auto;
    height: auto;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: .8rem;
    padding: .1rem .5rem;
    border-radius: 6px;
}

/* ---------- Article page ---------- */
.post-cover {
    border-radius: 24px;
    overflow: hidden;
    margin: 0;
}

.post-cover img {
    width: 100%;
    height: 100%;
}

.post-lead {
    font-size: 1.25rem;
    line-height: 2;
    color: #4a5560;
    border-inline-start: 4px solid var(--brand);
    padding-inline-start: 1rem;
    margin-bottom: 2rem;
}

.post-content {
    font-size: 1.15rem;
    line-height: 2.1;
    color: #333;
    overflow-wrap: anywhere;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--brand);
    font-weight: 800;
    margin: 2rem 0 1rem;
    line-height: 1.5;
}

.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.35rem; }

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content a {
    color: var(--brand-dark);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 1rem 0;
}

.post-content ul,
.post-content ol {
    padding-inline-start: 1.5rem;
    margin-bottom: 1.25rem;
}

.post-content blockquote {
    background: var(--soft);
    border-inline-start: 4px solid var(--brand);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.post-content th,
.post-content td {
    border: 1px solid #dfe8ea;
    padding: .5rem .75rem;
}

.post-content th {
    background: var(--soft);
}

.post-share {
    border-top: 1px solid #e6eef0;
}

.share-btn {
    border: 1px solid #cfe9ec;
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-size: .95rem;
    text-decoration: none;
}

.share-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.cta-box {
    background: var(--brand);
    color: #fff;
    border-radius: 24px;
    padding: 1.75rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    justify-content: space-between;
}

/* ---------- Video page ---------- */
.video-player {
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.video-player iframe,
.video-player video {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Empty state + pagination ---------- */
.empty-state {
    text-align: center;
    background: var(--soft);
    border-radius: 24px;
    padding: 3rem 1rem;
    color: #6c757d;
    font-size: 1.1rem;
}

.pagination {
    --bs-pagination-color: var(--brand-dark);
    --bs-pagination-hover-color: var(--brand-dark);
    --bs-pagination-active-bg: var(--brand);
    --bs-pagination-active-border-color: var(--brand);
    --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(0, 175, 188, .2);
    gap: .35rem;
}

.pagination .page-link {
    border-radius: 999px !important;
    min-width: 42px;
    text-align: center;
}

/* ---------- Home: latest articles & videos ---------- */
.latest-sec {
    background: #f7fbfc;
}

.latest-head {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.latest-all {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--brand);
    border-radius: 999px;
    padding: .4rem 1.2rem;
}

.latest-all:hover {
    background: var(--brand);
    color: #fff;
}

/* Six menu links: keep them on one line on small laptops (992–1199px). */
@media (min-width: 992px) {
    #primaryNav .nav {
        flex-wrap: nowrap;
    }

    #primaryNav .nav-link {
        white-space: nowrap;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    #primaryNav .nav {
        gap: 1rem !important;
    }

    #primaryNav .nav-link {
        font-size: 16px;
    }

    .menu-pill .btn-white-pill {
        padding: .5rem .9rem;
    }
}

/* ---------- Booking form ---------- */
.booking-form-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(0, 175, 188, .12);
    border: 1px solid #e3f2f4;
    padding: 1.75rem;
    position: relative;
    z-index: 3;
}

.booking-form .form-label {
    font-weight: 600;
    margin-bottom: .35rem;
}

.booking-form .form-control {
    border-radius: 14px;
    border-color: #d6e9ec;
    padding: .65rem 1rem;
}

.booking-form .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(0, 175, 188, .15);
}

.booking-form .form-control.is-invalid {
    border-color: #dc3545;
}

.booking-form [dir="ltr"]::placeholder {
    text-align: right;
}

.booking-form .btn-hero2:disabled {
    opacity: .7;
}

/* Honeypot: clipped, not display:none (some bots skip hidden fields).
   Never push it off-screen with left:-9999px: in RTL that widens the page. */
.bf-hp {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.booking-success {
    text-align: center;
    padding: 1.5rem .5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
}

.booking-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 2rem;
    line-height: 64px;
}

@media (max-width: 576px) {
    .booking-form-card {
        padding: 1.25rem;
    }
}

/* =========================================================
   Mobile fixes: hero, booking, footer (< 992px)
   ========================================================= */

/* Round call button used in the mobile menu bar */
.btn-call-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.btn-call-icon:hover,
.btn-call-icon:focus-visible {
    background: #e8f7f9;
    color: var(--brand-dark);
}

.hero2-sub-mobile {
    line-height: 1.9;
}

@media (max-width: 991.98px) {
    /* ---- Menu bar: call icon | logo | menu, always on one row ---- */
    .mobile-nav-header {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        gap: .75rem;
    }

    .mobile-logo-link {
        min-width: 0;
        display: flex;
        justify-content: center;
        flex: 1 1 auto;
    }

    .mobile-logo {
        height: 42px;
        width: auto;
        max-width: 100%;
        object-fit: contain !important; /* styles.css uses cover, which crops the logo on narrow phones */
    }

    .menu-pill {
        padding: .6rem .85rem;
        min-height: 0;
    }

    .btn-menu {
        width: 44px;
        height: 44px;
        padding: 0;
    }

    /* ---- Hero: content height instead of a full screen with empty space ---- */
    .hero2 {
        min-height: 0;
        padding-bottom: 0;
    }

    .hero2 > .container {
        display: block;
    }

    .hero2-inner {
        height: auto !important;
        padding-top: .5rem;
    }

    .hero2-sub {
        margin-bottom: 1.25rem;
    }

    .hero2-photo {
        margin-top: 1rem;
    }

    /* ---- Booking: photo above the contact details, no overlap with the form ---- */
    .booking-form-row {
        margin-bottom: 7.5rem !important; /* room for the photo that sits over the band edge */
    }

    .booking-band {
        padding: 0 0 2.5rem;
    }

    .bk-avatar-wrap {
        position: relative;
        inset: auto;
        width: 220px;
        margin: -110px auto 1.5rem;
    }

    .bk-avatar {
        width: 100%;
    }

    .bk-dot {
        width: 64px;
        height: 64px;
    }

    .booking-band .gap-4 {
        gap: 1rem !important;
    }

    .bk-pill {
        font-size: .95rem;
        padding: .5rem 1rem;
    }

    .bk-phone {
        letter-spacing: .12rem;
        font-size: 22px;
    }

    .bk-plus {
        width: 90px;
        height: 90px;
    }

    /* ---- Map ---- */
    .map-embed {
        height: 300px;
    }

    /* ---- Footer: brand on top, links in two columns ---- */
    .site-footer > .container {
        padding-top: 2.5rem !important;
        padding-bottom: 2rem !important;
    }

    .ft-brand {
        text-align: center;
        padding-bottom: 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, .25);
    }

    .footer-logo {
        width: auto;
        max-width: 220px;
    }

    .ft-title {
        font-size: 20px;
    }

    .ft-links-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .45rem 1rem;
    }

    .ft-links-grid li + li {
        margin-top: 0;
    }

    .ft-contact li {
        gap: .75rem;
        margin-bottom: .5rem;
        overflow-wrap: anywhere;
    }

    .ft-contact li span {
        flex: 0 0 auto;
        width: 56px;
        white-space: nowrap;
        overflow-wrap: normal;
        opacity: .8;
    }
}

@media (max-width: 380px) {
    .mobile-logo {
        height: 36px;
    }

    .bk-dot {
        width: 56px;
        height: 56px;
    }
}

/* Testimonials row is a few px wider than the screen on phones (template gutter); clip sideways only so the avatars can still overflow upwards. */
.testi-sec {
    overflow-x: clip;
}

/* ---------- Article sources ---------- */
.post-sources {
    background: var(--soft);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
}

.post-sources-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: .75rem;
}

.post-sources li + li {
    border-top: 1px solid #d8e9ec;
}

.post-sources a {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    padding: .55rem 0;
    color: var(--ink);
    text-decoration: none;
}

.post-sources a:hover .post-source-name {
    color: var(--brand);
    text-decoration: underline;
}

.post-source-name {
    font-weight: 700;
}

.post-source-name::after {
    content: " ↗";
    color: var(--brand);
    font-weight: 400;
}

.post-source-host {
    color: #8a949c;
    font-size: .85rem;
}

/* ---------- YouTube channel button (videos page) ---------- */
.yt-subscribe {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #ff0000;
    color: #fff;
    border-radius: 999px;
    padding: .5rem 1.15rem;
    font-weight: 700;
    text-decoration: none;
}

.yt-subscribe:hover {
    background: #d90000;
    color: #fff;
}


/* ---------- Footer social icons ---------- */
.ft-socials .social-badge {
    display: inline-flex;
    opacity: .9;
    transition: opacity .2s ease, transform .2s ease;
}

.ft-socials .social-badge:hover {
    opacity: 1;
    transform: translateY(-2px);
    text-decoration: none;
}

/* =========================================================
   About the doctor page
   ========================================================= */
.about-photo {
    position: relative;
    max-width: 320px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 60%, #ff8f8f 0, #ff7f7f 60%, #ffb3b3 100%);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 175, 188, .18);
}

.about-photo img {
    position: absolute;
    inset: auto 0 0 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.about-role {
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 1.15rem;
}

.about-text {
    font-size: 1.08rem;
    line-height: 2;
    color: #4a5560;
}

.about-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.25rem;
}

.about-stats > div {
    background: var(--soft);
    border-radius: 18px;
    padding: .75rem 1.25rem;
    min-width: 150px;
}

.about-stats strong {
    display: block;
    color: var(--brand);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.about-stats span {
    color: #6c757d;
    font-size: .95rem;
}

.about-h {
    color: var(--brand);
    font-weight: 800;
    font-size: 1.45rem;
    margin-bottom: 1.25rem;
}

/* Timeline */
.about-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    border-inline-start: 3px solid #cfe9ec;
}

.about-timeline li {
    position: relative;
    padding: 0 1.5rem 1.75rem;
}

.about-timeline li::before {
    content: "";
    position: absolute;
    inset-inline-start: -10px;
    top: .35rem;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px #e3f6f8;
}

.about-timeline h3,
.about-edu h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: .25rem 0;
    line-height: 1.6;
}

.about-period {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    border-radius: 999px;
    padding: .1rem .75rem;
    font-size: .85rem;
    font-weight: 700;
}

.about-place {
    color: var(--brand-dark);
    font-weight: 600;
    margin-bottom: .35rem;
}

.about-timeline p,
.about-edu p {
    color: #5b6670;
    line-height: 1.9;
}

/* Education */
.about-edu li {
    display: flex;
    gap: .9rem;
    background: #fff;
    border: 1px solid #e3f2f4;
    border-radius: 18px;
    padding: 1rem 1.1rem;
    margin-bottom: .9rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
}

.about-edu-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.about-year {
    display: inline-block;
    margin-inline-start: .35rem;
    color: var(--brand);
    font-weight: 700;
}

/* Lists */
.about-card {
    background: var(--soft);
    border-radius: 22px;
    padding: 1.4rem 1.5rem;
}

.about-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.about-list li {
    position: relative;
    padding-inline-start: 1.4rem;
    margin-bottom: .6rem;
    line-height: 1.8;
    color: #3d4852;
}

.about-list li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: 0;
    color: var(--brand);
    font-weight: 800;
}

/* Certificates */
.about-cert {
    margin: 0;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .07);
    display: flex;
    flex-direction: column;
}

.about-cert-img {
    display: block;
    aspect-ratio: 4 / 3;
    background: #f3f6f7;
    overflow: hidden;
}

.about-cert-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .3s ease;
}

.about-cert-img:hover img {
    transform: scale(1.04);
}

.about-cert figcaption {
    padding: .8rem 1rem 1rem;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.7;
}

/* Home: link to the full page under the "من نحن" points */
.about-more {
    display: inline-block;
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 5px;
    margin-inline-start: 1rem;
}

.about-more:hover {
    color: #eaffff;
}

/* ---------- Home certificates carousel: same frame for every certificate ----------
   Portrait (e.g. syndicate) and landscape certificates fit inside a 4:3 box,
   so one tall certificate no longer stretches every slide. */
.research-media {
    aspect-ratio: 4 / 3;
    background: #f3f6f7;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.research-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
