/* ==========================================================================
   Scope Page Builder – Front-end Styles
   Minimal baseline layout; override in your theme stylesheet.
   ========================================================================== */

/* Container */
.spb-container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Section base */
.spb-section {
    padding: 0px 0;
}
.spb-section:nth-child(even) {
    background: #f8f9fa;
}

/* Headings block */
.spb-heading {
    margin-bottom: 36px;
}
.spb-heading--center {
    text-align: center;
}
.spb-heading__title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1d2327;
}
.spb-heading__sub {
    font-size: 1.1rem;
    color: #50575e;
    margin: 0;
}

/* Prose */
.spb-prose {
    line-height: 1.75;
    color: #3c434a;
    max-width: 780px;
}
.spb-prose h2, .spb-prose h3 { margin-top: 1.5em; }
.spb-prose img { max-width: 100%; height: auto; border-radius: 4px; }

/* --- Paragraph with Image --- */
.spb-paragraph-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.spb-paragraph-image__img img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
}
@media (max-width: 768px) {
    .spb-paragraph-image { grid-template-columns: 1fr; }
}

/* --- Gallery --- */
.spb-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.spb-gallery__item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* --- Logo Gallery --- */
.spb-logo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: center;
}
.spb-logo-gallery__img {
    max-height: 60px;
    width: auto;
    filter: grayscale(1);
    opacity: .7;
    transition: all .2s;
}
.spb-logo-gallery__img:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* --- Cards (Why Choose Us / Card View) --- */
.spb-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}
.spb-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}
.spb-card__icon { margin-bottom: 14px; }
.spb-card__icon img { width: 48px; height: 48px; object-fit: contain; }
.spb-card__title { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; }
.spb-card__text  { font-size: .9rem; color: #50575e; margin: 0 0 12px; }
.spb-card__link  { font-size: .85rem; color: #2271b1; }

/* --- Doctors --- */
.spb-doctors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}
.spb-doctor {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}
.spb-doctor__img { width: 100%; height: 220px; object-fit: cover; display: block; }
.spb-doctor__info { padding: 18px; }
.spb-doctor__name { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.spb-doctor__speciality { color: #2271b1; font-size: .85rem; margin: 0 0 4px; }
.spb-doctor__hospital, .spb-doctor__exp { font-size: .85rem; color: #50575e; margin: 0 0 4px; }
.spb-doctor__link { display: inline-block; margin-top: 10px; font-size: .8rem; }

/* --- Cost List --- */
.spb-cost-list { display: flex; flex-direction: column; gap: 12px; }
.spb-cost-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 20px;
    flex-wrap: wrap;
}
.spb-cost-item__name  { flex: 1; font-weight: 600; }
.spb-cost-item__price { font-size: 1.2rem; font-weight: 700; color: #2271b1; }
.spb-cost-item__note  { font-size: .8rem; color: #50575e; flex-basis: 100%; }
.spb-cost-item__link  { font-size: .85rem; color: #2271b1; }

/* --- Stories --- */
.spb-stories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.spb-story {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    gap: 16px;
}
.spb-story__img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.spb-story__stars { color: #f59e0b; font-size: 1.1rem; margin-bottom: 6px; }
.spb-story__text  { font-style: italic; color: #3c434a; margin: 0 0 10px; }
.spb-story__name  { font-weight: 700; }
.spb-story__country { font-size: .85rem; color: #50575e; margin-left: 6px; }
.spb-story__link  { font-size: .85rem; color: #2271b1; display: block; margin-top: 8px; }

/* --- Videos --- */
.spb-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.spb-video__embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    margin-bottom: 10px;
}
.spb-video__embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.spb-video__title { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.spb-video__desc  { font-size: .9rem; color: #50575e; margin: 0; }

/* --- Stats --- */
.spb-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
    text-align: center;
}
.spb-stat__icon img { width: 48px; height: 48px; object-fit: contain; margin-bottom: 8px; }
.spb-stat__number  { font-size: 2rem; font-weight: 800; color: #2271b1; }
.spb-stat__label   { font-size: .9rem; color: #50575e; }

/* --- Banner --- */
.spb-section--banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #2271b1 100%);
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    position: relative;
}
/* Dark overlay when a background image is set */
.spb-banner__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 0;
}
.spb-section--banner .spb-container {
    position: relative;
    z-index: 1;
}
.spb-banner__h1   { font-size: 2.5rem; font-weight: 800; margin: 0 0 14px; }
.spb-banner__sub  { font-size: 1.2rem; opacity: .85; margin: 0 0 20px; }
.spb-banner__usps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.spb-banner__usps li {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: .9rem;
}

/* --- Fallback --- */
.spb-fallback { padding: 60px 0; }
.spb-fallback__title { font-size: 2rem; font-weight: 700; margin-bottom: 24px; }

/* --- Tailwind .hidden safety fix ---
   On production, compiled Tailwind may order .flex after .hidden (same specificity).
   !important ensures .hidden always wins when the class is present. */
.hidden { display: none !important; }

/* --- Restore visibility for theme header elements that use hidden + breakpoint-flex.
   The rule above blocks md:flex / sm:flex from overriding hidden on the nav and
   Book Appointment button inside #site-header. Counter-rules re-show them. */
@media (min-width: 640px) {
    #site-header a.hidden,
    #site-header button.hidden { display: flex !important; }
}
@media (min-width: 768px) {
    #site-header nav.hidden,
    #site-header div.hidden { display: flex !important; }
}

/* --- SPB Header section: mobile drawer accordion --- */
.spb-mob-sub { display: none; }
.spb-mob-sub.spb-mob-open { display: block; }

/* --- SPB Header section: desktop nav & dropdown menus --- */
.spb-hdr-desktop-nav { display: none; }
@media (min-width: 768px) { .spb-hdr-desktop-nav { display: flex !important; } }

.spb-hdr-submenu {
    display: none;
    position: absolute;
    min-width: 210px;
    z-index: 999;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px -8px rgba(0,0,0,0.18), 0 4px 16px -4px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
    /* overflow:hidden removed — it clips absolutely-positioned nested submenus */
}
.spb-hdr-submenu > li:first-child > a { border-radius: 8px 8px 0 0; }
.spb-hdr-submenu > li:last-child > a  { border-radius: 0 0 8px 8px; }
.spb-nav-item.spb-open > .spb-hdr-submenu { display: block !important; }

/* --- Rich content (from TinyMCE editor fields) --- */
.spb-rich-content > p:first-child { margin-top: 0; }
.spb-rich-content > p:last-child  { margin-bottom: 0; }
.spb-rich-content ul,
.spb-rich-content ol { padding-left: 1.4em; margin: .5em 0; }
.spb-rich-content li { margin-bottom: .25em; }
.spb-rich-content strong { font-weight: 700; }
