/* ==========================================================================
   Laser Polyclinic: homepage sections (front-page.php)
   Shared type and blocks (.lp-page, .lp-card, .lp-section…) live in site.css.
   ========================================================================== */

/* ---------- Grids ---------- */

.lp-grid--depts {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* .lp-grid--posts and the article card (.lp-post-card) live in site.css. */

/* ---------- Hero ---------- */

.lp-home .lp-hero__title {
    font-family: var(--lp-font);
    font-size: clamp(34px, 3.4vw, 48px);
    line-height: 1.42;
    font-weight: 700;
    color: var(--lp-ink);
}

.lp-hero {
    background: var(--lp-surface);
    padding-block: clamp(40px, 5vw, 72px) clamp(48px, 6vw, 80px);
}

.lp-hero__inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.lp-hero__row {
    display: flex;
    align-items: center;
}

.lp-hero__copy {
    max-width: 640px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.lp-hero__copy .lp-lead {
    max-width: 560px;
}

/* Hero with a background image (homepage field "صورة خلفية الواجهة"). */
.lp-hero--has-bg {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: clamp(560px, 78vh, 760px);
    padding-block: clamp(56px, 7vw, 96px) clamp(28px, 3vw, 40px);
    background: var(--lp-ink-strong);
}

.lp-hero--has-bg .lp-hero__inner {
    flex: 1 1 auto;
    /* .lp-container is content-box with side padding: subtract it so it fits. */
    width: calc(100% - 2 * var(--lp-gutter));
    justify-content: space-between;
    gap: 40px;
}

.lp-hero--has-bg .lp-hero__row {
    flex: 1 1 auto;
}

.lp-hero .lp-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    display: block;
}

.lp-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to top, rgba(30, 28, 24, 0.55) 0%, rgba(30, 28, 24, 0) 40%),
        linear-gradient(to left, rgba(30, 28, 24, 0.72) 0%, rgba(30, 28, 24, 0.35) 60%, rgba(30, 28, 24, 0.15) 100%);
}

[dir="ltr"] .lp-hero__overlay {
    background:
        linear-gradient(to top, rgba(30, 28, 24, 0.55) 0%, rgba(30, 28, 24, 0) 40%),
        linear-gradient(to right, rgba(30, 28, 24, 0.72) 0%, rgba(30, 28, 24, 0.35) 60%, rgba(30, 28, 24, 0.15) 100%);
}

.lp-home .lp-hero--has-bg .lp-hero__title {
    color: var(--lp-on-dark);
    font-size: clamp(36px, 4.4vw, 60px);
    line-height: 1.3;
}

.lp-hero--has-bg .lp-lead {
    color: rgba(255, 255, 255, 0.88);
}

/* Second hero button: solid white with dark text; hover is the same as
   every other outline button (dark fill, white text). */
.lp-hero--has-bg .lp-btn--outline,
.lp-hero--has-bg .lp-btn--outline:visited {
    background: var(--lp-on-dark);
    border-color: var(--lp-on-dark);
    color: var(--lp-ink);
}

.lp-hero--has-bg .lp-btn--outline:hover {
    background: var(--lp-ink);
    border-color: var(--lp-ink);
    color: var(--lp-on-dark);
}

.lp-home .lp-hero--has-bg a:focus-visible {
    outline-color: var(--lp-on-dark);
}

.lp-hero--has-bg .lp-booking {
    background: var(--lp-surface);
    box-shadow: var(--lp-shadow-raised);
}

.lp-home .lp-hero--has-bg .lp-booking a:focus-visible,
.lp-home .lp-hero--has-bg .lp-booking select:focus-visible {
    outline-color: var(--lp-ink);
}

/* ---------- Booking bar ---------- */

.lp-booking {
    background: var(--lp-surface-sand);
    border-radius: var(--lp-radius-lg);
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 20px;
}

.lp-booking__intro {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lp-booking__title {
    font-size: 18px;
    line-height: 28px;
    font-weight: 700;
}

.lp-booking__sub {
    font-size: 14px;
    line-height: 24px;
    color: var(--lp-ink-muted);
}

.lp-field {
    flex: 1 1 200px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lp-field label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--lp-ink);
}

.lp-home .lp-field select {
    width: 100%;
    height: var(--lp-control-h);
    margin: 0;
    border-radius: var(--lp-radius-sm);
    border: 1px solid var(--lp-line-strong);
    background-color: var(--lp-surface);
    color: var(--lp-ink);
    padding: 0 14px;
    font-family: var(--lp-font);
    font-size: 16px;
    line-height: 24px;
    box-sizing: border-box;
}

.lp-booking__submit {
    flex: 0 0 auto;
    padding: 0 28px;
}

/* ---------- Departments ---------- */

.lp-dept-card {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.lp-dept-card:hover {
    background: var(--lp-gold-100);
}

/* Booking button: same green pill as the other WhatsApp buttons. Long
   department names wrap instead of overflowing. */
.lp-dept-card__cta {
    margin-top: 4px;
    height: auto;
    min-height: var(--lp-control-h);
    padding-block: 10px;
    white-space: normal;
    text-align: center;
}

/* ---------- About strip ---------- */

.lp-about {
    background: var(--lp-surface-sand);
    border-radius: var(--lp-radius-xl);
    padding: clamp(16px, 2.5vw, 32px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px 56px;
}

.lp-about__media {
    flex: 1 1 400px;
    min-width: 0;
    height: clamp(280px, 30vw, 440px);
    border-radius: var(--lp-radius-xl);
    border: 1px solid var(--lp-line);
    overflow: hidden;
}

.lp-about__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lp-about__copy {
    flex: 1 1 420px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-block: 8px;
    padding-inline-end: clamp(0px, 2vw, 24px);
}

.lp-about__copy .lp-btn {
    margin-top: 8px;
}

/* ---------- Doctors ---------- */

/* Horizontal scroll row: 4 cards visible on desktop, the rest scroll. */
.lp-doctors__track {
    --lp-doc-gap: 24px;
    display: flex;
    gap: var(--lp-doc-gap);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-block: 4px 16px;
    margin-block-end: -12px;
}

.lp-doctors__track::-webkit-scrollbar {
    display: none;
}

.lp-doctors__track:focus-visible {
    outline: 2px solid var(--lp-ink);
    outline-offset: 4px;
}

.lp-doctors__track .lp-doc-card {
    flex: 0 0 calc((100% - 3 * var(--lp-doc-gap)) / 4);
    scroll-snap-align: start;
}

@media (max-width: 1100px) {
    .lp-doctors__track .lp-doc-card {
        flex-basis: calc((100% - 2 * var(--lp-doc-gap)) / 2.3);
    }
}

.lp-doctors__controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lp-scroll-nav {
    display: flex;
    gap: 8px;
}

.lp-scroll-nav[hidden] {
    display: none;
}

.lp-scroll-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: var(--lp-radius-pill);
    background: var(--lp-ink-strong);
    color: var(--lp-gold-300);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 200ms, opacity 200ms;
}

.lp-scroll-btn:hover:not(:disabled) {
    background: var(--lp-ink);
}

.lp-scroll-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

/* The arrow icon points left; "previous" points the other way. */
.lp-scroll-btn--prev .lp-icon {
    transform: scaleX(-1);
}

/* ---------- Contact ---------- */

.lp-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.lp-contact__card {
    flex: 1 1 360px;
    min-width: 0;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lp-contact__card .lp-btn {
    margin-top: 4px;
}

.lp-contact__row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.lp-contact__text {
    display: flex;
    flex-direction: column;
}

.lp-contact__value,
a.lp-contact__value:visited {
    font-size: 18px;
    line-height: 28px;
    font-weight: 600;
    color: var(--lp-ink);
    text-decoration: none;
}

a.lp-contact__value:hover {
    color: var(--lp-gold-700);
}

.lp-contact__map {
    flex: 2 1 480px;
    min-width: 0;
    min-height: 380px;
    border-radius: var(--lp-radius-lg);
    border: 1px solid var(--lp-line);
    background: var(--lp-surface);
    overflow: hidden;
}

.lp-contact__map iframe {
    width: 100%;
    height: 100%;
    min-height: 380px;
    border: 0;
    display: block;
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
    .lp-home .lp-hero__title {
        font-size: 34px;
        line-height: 50px;
    }

    .lp-hero {
        padding-block: 24px 48px;
    }

    .lp-hero--has-bg {
        min-height: 0;
        padding-block: 48px 24px;
    }

    .lp-hero--has-bg .lp-hero__inner {
        gap: 32px;
    }

    .lp-home .lp-hero--has-bg .lp-hero__title {
        font-size: 34px;
        line-height: 50px;
    }

    .lp-hero__overlay,
    [dir="ltr"] .lp-hero__overlay {
        background: linear-gradient(to top, rgba(30, 28, 24, 0.7) 0%, rgba(30, 28, 24, 0.55) 100%);
    }

    .lp-booking {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .lp-booking__intro,
    .lp-field {
        flex-basis: auto;
    }

    .lp-grid--depts {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .lp-dept-card,
    .lp-contact__card {
        padding: 20px;
    }

    .lp-about {
        border-radius: var(--lp-radius-lg);
        padding: 16px 16px 24px;
    }

    .lp-about__media {
        flex-basis: 100%;
        height: 220px;
        border-radius: var(--lp-radius-lg);
    }

    .lp-about__copy {
        flex-basis: 100%;
        padding: 0;
    }

    /* Doctors become a horizontal swipe row. */
    .lp-doctors .lp-container {
        padding-inline: 0;
    }

    .lp-doctors .lp-section-head,
    .lp-doctors .lp-show-mobile {
        margin-inline: 16px;
        width: auto;
    }

    .lp-doctors .lp-stack {
        gap: 20px;
    }

    .lp-doctors__track {
        --lp-doc-gap: 16px;
        padding: 4px 16px 12px;
        scroll-padding-inline: 16px;
        margin-block-end: 0;
    }

    .lp-doctors__track .lp-doc-card {
        flex: 0 0 264px;
    }

    /* Swipe on phones; no arrow buttons. */
    .lp-doctors .lp-scroll-nav {
        display: none;
    }

    .lp-contact__map,
    .lp-contact__map iframe {
        min-height: 280px;
    }
}
