/* The public landing page uses a dedicated photographic hospital banner. */
.site-home .home-hero {
    background: #e8f1eb;
}

.site-home .hero-background {
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: center;
    opacity: .73;
}

.site-home .home-hero::after {
    background: rgba(240, 247, 242, .34);
}

.site-home .hero-copy {
    width: min(600px, 52%);
    margin-inline-start: auto;
}

@media (max-width: 1000px) {
    .site-home .hero-background { width: 100%; opacity: .62; }
    .site-home .hero-copy { width: min(590px, 66%); }
}

@media (max-width: 650px) {
    .site-home .hero-background { width: 100%; opacity: .31; }
    .site-home .hero-copy { width: 100%; margin-inline-start: 0; }
}

.site-home .real-doctor-portrait {
    display: grid;
    min-height: 265px;
    place-items: center;
    background: #e3eee7;
}

.site-home .real-doctor-portrait img {
    width: 100%;
    height: 265px;
    object-fit: cover;
}

.site-home .doctor-photo-fallback {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border: 1px solid #b7d0c1;
    border-radius: 50%;
    background: #f8fcf9;
    color: #176f63;
}

.site-home .doctor-photo-fallback .icon {
    width: 38px;
    height: 38px;
}

.brand-logo {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #cfe1d6;
    border-radius: 10px;
    background: #fff;
}

.brand-logo img { width: 100%; height: 100%; object-fit: contain; }

.site-settings-shell { max-width: 1160px; }
.settings-heading { margin: 34px 0 22px; }
.settings-heading h1 { margin: 5px 0 8px; }
.settings-heading p:not(.eyebrow) { max-width: 680px; color: #668078; }
.settings-form { display: grid; gap: 18px; }
.settings-panel { margin: 18px 0; padding: 24px; border: 1px solid #d7e4dc; border-radius: 8px; background: #fff; }
.settings-panel__head { margin-bottom: 20px; }
.settings-panel__head h2 { margin: 0 0 5px; font-size: 22px; }
.settings-panel__head p { margin: 0; color: #668078; font-size: 13px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.settings-grid label { display: grid; gap: 7px; color: #164b43; font-size: 13px; font-weight: 700; }
.settings-grid label > span { color: #668078; font-size: 11px; font-weight: 500; }
.settings-grid input, .settings-grid textarea { width: 100%; border: 1px solid #b8d1c4; border-radius: 6px; background: #fff; color: #164b43; font: inherit; }
.settings-grid input { min-height: 44px; padding: 10px 12px; }
.settings-grid textarea { min-height: 76px; padding: 10px 12px; resize: vertical; }
.settings-grid small { color: #668078; font-size: 11px; font-weight: 400; }
.whatsapp-settings { display: grid; gap: 12px; }
.whatsapp-settings__label { color: #164b43; font-size: 13px; font-weight: 700; }
.whatsapp-settings__rows { display: grid; gap: 10px; }
.whatsapp-settings__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.whatsapp-settings__row label { display: grid; gap: 7px; }
.whatsapp-settings__remove { min-width: 44px; min-height: 44px; padding: 8px 12px; color: #a33f35; border-color: #e5b6af; font-size: 22px; line-height: 1; }
.whatsapp-settings__remove:hover { color: #fff; border-color: #b24c41; background: #b24c41; }
.field-wide { grid-column: 1 / -1; }
.settings-image-preview { display: grid; align-content: start; gap: 8px; padding: 10px; border: 1px solid #d7e4dc; border-radius: 7px; color: #668078; font-size: 12px; }
.settings-image-preview img { width: 100%; height: 108px; object-fit: contain; border-radius: 5px; background: #f1f7f3; }
.settings-image-preview--wide { grid-column: span 2; }
.settings-image-preview--wide img { height: 180px; object-fit: cover; }
.settings-advanced summary { cursor: pointer; color: #176f63; font-weight: 700; }
.settings-advanced details[open] summary { margin-bottom: 20px; }

.whatsapp-float { position: fixed; z-index: 50; right: 24px; bottom: 24px; }
.whatsapp-float summary { display: flex; align-items: center; gap: 9px; min-height: 50px; padding: 0 16px; border-radius: 25px; background: #1b8f57; color: #fff; box-shadow: 0 12px 30px rgba(18, 94, 56, .28); cursor: pointer; font-weight: 700; list-style: none; }
.whatsapp-float summary::-webkit-details-marker { display: none; }
.whatsapp-float summary .icon { width: 20px; height: 20px; }
.whatsapp-float > div { position: absolute; right: 0; bottom: 62px; display: grid; min-width: 190px; overflow: hidden; border: 1px solid #cfe1d6; border-radius: 8px; background: #fff; box-shadow: 0 14px 30px rgba(18, 74, 61, .16); }
.whatsapp-float > div a { display: grid; gap: 2px; padding: 12px 15px; border-bottom: 1px solid #e5eee8; color: #165548; text-align: start; text-decoration: none; font-size: 13px; }
.whatsapp-float > div a strong { font-size: 13px; }
.whatsapp-float > div a small { color: #668078; font-size: 11px; }
.whatsapp-float > div a:last-child { border-bottom: 0; }
.whatsapp-float > div a:hover { background: #f1f8f4; }

/* Department cards mirror the compact medical cards in the approved mockup. */
.site-home .featured-department-card {
    display: flex;
    min-height: 142px;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.site-home .featured-department-card::before {
    display: none;
}

.site-home .featured-department-icon {
    display: grid;
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    place-items: center;
    border-radius: 50%;
    background: #f1f8f4;
    color: #177366;
}

.site-home .featured-department-icon .icon {
    width: 38px;
    height: 38px;
    stroke-width: 1.45;
}

.site-home .featured-department-content {
    min-width: 0;
    flex: 1;
}

.site-home .featured-department-content h3 {
    margin-bottom: 4px;
    font-size: 16px;
}

.site-home .featured-department-description {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: #637a72;
    font-size: 11px;
    line-height: 1.85;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.site-home .featured-department-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    color: #176f63;
    font-size: 11px;
    font-weight: 700;
}

.site-home .featured-department-link .icon {
    width: 15px;
    height: 15px;
}

.live-doctor-search {
    position: relative;
}

.live-doctor-search .search-input {
    position: relative;
}

/* In Arabic, begin the appointment search with the department on the right. */
[dir="rtl"] .site-home .live-doctor-search .search-select {
    order: -1;
    border-inline-start: 0;
    border-inline-end: 1px solid var(--line);
    padding-inline-start: 0;
    padding-inline-end: 20px;
}

.live-doctor-search input:disabled {
    cursor: not-allowed;
    color: #789087;
}

.home-search-suggestions {
    position: absolute;
    z-index: 10;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    width: min(48%, 560px);
    overflow: hidden;
    border: 1px solid #cadfd3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(18, 74, 61, .15);
}

.home-search-suggestions a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    border-bottom: 1px solid #e3eee7;
    color: #164b43;
    text-decoration: none;
}

.home-search-suggestions a:last-child { border-bottom: 0; }
.home-search-suggestions a:hover,
.home-search-suggestions a:focus { background: #f1f8f4; outline: none; }
.home-search-suggestions strong { font-size: 14px; }
.home-search-suggestions small { color: #668078; font-size: 11px; }
.home-search-empty { margin: 0; padding: 14px 16px; color: #668078; font-size: 12px; }

.department-icon-picker {
    margin: 0;
    padding: 16px;
    border: 1px solid #d4e3da;
    border-radius: 8px;
}

.department-icon-picker legend { padding-inline: 6px; color: #164b43; font-weight: 700; }
.department-icon-picker p { margin: 0 0 12px; color: #668078; font-size: 12px; }
.department-icon-picker > div { display: flex; flex-wrap: wrap; gap: 10px; }
.department-icon-choice { display: inline-flex !important; align-items: center; gap: 8px; min-width: 150px; margin: 0 !important; padding: 9px 11px; border: 1px solid #d4e3da; border-radius: 7px; cursor: pointer; }
.department-icon-choice:has(input:checked) { border-color: #177366; background: #f1f8f4; }
.department-icon-choice input { width: auto !important; margin: 0; accent-color: #177366; }
.department-icon-choice span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #edf6f0; color: #177366; }
.department-icon-choice .icon { width: 18px; height: 18px; }
.department-icon-choice b { font-size: 12px; }

/* Shared featured-doctor card for the home page and doctor directory. */
.featured-doctor-card {
    display: flex;
    min-height: 184px;
    align-items: center;
    gap: 18px;
    padding: 18px;
    overflow: visible;
    border: 1px solid #d8e5de;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(18, 74, 61, .06);
}

.featured-doctor-avatar {
    display: grid;
    width: 122px;
    height: 122px;
    flex: 0 0 122px;
    place-items: center;
    overflow: hidden;
    border: 3px solid #e2f0e8;
    border-radius: 50%;
    background: #f3f7f4;
    color: #177366;
}

.featured-doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-doctor-avatar .icon {
    width: 44px;
    height: 44px;
}

.featured-doctor-content {
    min-width: 0;
    flex: 1;
}

.featured-doctor-specialty {
    margin-bottom: 3px;
    color: #32766a;
    font-size: 12px;
    font-weight: 700;
}

.featured-doctor-content h3 {
    margin-bottom: 5px;
    font-size: 18px;
}

.featured-doctor-bio {
    display: -webkit-box;
    margin-bottom: 12px;
    overflow: hidden;
    color: #657c75;
    font-size: 11px;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.featured-doctor-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.featured-doctor-actions .text-link {
    font-size: 11px;
}

.featured-doctor-actions .button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 11px;
}

.featured-doctor-actions .button .icon {
    width: 15px;
    height: 15px;
}

.doctors-directory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doctors-directory-grid .featured-doctor-card {
    margin: 0;
}

@media (max-width: 1100px) {
    .doctors-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
    .site-home .featured-department-card { min-height: 128px; padding: 17px; }
    .site-home .featured-department-icon { width: 56px; height: 56px; flex-basis: 56px; }
    .site-home .featured-department-icon .icon { width: 31px; height: 31px; }
    .featured-doctor-card { min-height: 160px; gap: 13px; padding: 14px; }
    .featured-doctor-avatar { width: 92px; height: 92px; flex-basis: 92px; }
    .featured-doctor-content h3 { font-size: 16px; }
    .featured-doctor-bio { display: none; }
    .featured-doctor-actions { align-items: flex-start; flex-direction: column; }
    .doctors-directory-grid { grid-template-columns: 1fr; }
    .home-search-suggestions { width: 100%; }
    .brand-logo { width: 40px; height: 40px; }
    .settings-panel { padding: 18px; }
    .settings-grid { grid-template-columns: 1fr; }
    .whatsapp-settings__row { grid-template-columns: 1fr; }
    .whatsapp-settings__remove { width: 100%; font-size: 14px; }
    .settings-image-preview--wide { grid-column: auto; }
    .whatsapp-float { right: 14px; bottom: 14px; }
    .whatsapp-float summary span { display: none; }
    .whatsapp-float summary { width: 52px; justify-content: center; padding: 0; }
}

/* Keep the contact panel aligned with the site's primary teal, not a washed-out variant. */
.site-home .home-visit {
    background: #104b44;
    color: #ffffff;
}

.site-home .home-visit h2,
.site-home .home-visit h3 { color: #ffffff; }

.site-home .home-visit p { color: #d7e9e2; }

.site-home .home-visit .eyebrow { color: #c8e6d8; }

.site-home .home-visit .department-icon {
    background: rgba(255, 255, 255, .14);
    color: #ffffff;
}

.site-home .home-visit .button-light {
    background: #ffffff;
    border-color: #ffffff;
    color: #104b44;
}

.site-home .home-visit .button-light:hover {
    background: #e7f1ec;
    border-color: #e7f1ec;
}
