/* =====================================================================
   THE PINE HOSPITAL — MAIN STYLESHEET
   Design language: trust, compassion, cleanliness, modern healthcare.
   ===================================================================== */

:root {
    --ph-navy: #0b3d66;
    --ph-navy-dark: #082a48;
    --ph-blue: #1c6fa8;
    --ph-teal: #2aa9a0;
    --ph-teal-light: #e6f6f5;
    --ph-coral: #e8603c;
    --ph-coral-dark: #c94d2d;
    --ph-amber: #f2a900;
    --ph-ink: #1e2a33;
    --ph-slate: #5c6b73;
    --ph-fog: #f4f8f9;
    --ph-white: #ffffff;
    --ph-border: #e1e8ea;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-soft: 0 10px 30px rgba(11, 61, 102, 0.08);
    --shadow-card: 0 6px 20px rgba(11, 61, 102, 0.10);
    --font-heading: 'Poppins', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ph-ink);
    background-color: var(--ph-white);
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--ph-navy);
}

a { color: var(--ph-teal); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ph-coral); }

.text-coral { color: var(--ph-coral); }
.text-teal { color: var(--ph-teal); }
.bg-navy { background-color: var(--ph-navy); }
.bg-fog { background-color: var(--ph-fog); }
.bg-teal-light { background-color: var(--ph-teal-light); }

/* ---------- Buttons ---------- */
.btn-ph-primary {
    background: linear-gradient(135deg, var(--ph-coral), var(--ph-coral-dark));
    color: #fff;
    border: none;
    padding: .75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: .2px;
    box-shadow: 0 8px 20px rgba(232, 96, 60, .30);
    transition: transform .2s ease, box-shadow .2s ease;
}
.btn-ph-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(232, 96, 60, .38);
}
.btn-ph-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: .7rem 1.7rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all .2s ease;
}
.btn-ph-outline:hover { background: #fff; color: var(--ph-navy); }
.btn-ph-teal {
    background: var(--ph-teal);
    color: #fff;
    border: none;
    padding: .7rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all .2s ease;
}
.btn-ph-teal:hover { background: var(--ph-navy); color: #fff; transform: translateY(-2px); }

/* ---------- Top contact bar ---------- */
.top-bar {
    background: var(--ph-navy-dark);
    color: #cfe3ee;
    font-size: .85rem;
    padding: .45rem 0;
}
.top-bar a { color: #cfe3ee; }
.top-bar a:hover { color: var(--ph-amber); }
.top-bar .badge-open {
    background: var(--ph-teal);
    color: #fff;
    border-radius: 50px;
    padding: .15rem .7rem;
    font-weight: 600;
    font-size: .75rem;
}

/* ---------- Navigation ---------- */
.ph-navbar {
    background: #fff;
    box-shadow: 0 4px 18px rgba(11,61,102,.06);
    padding: .6rem 0;
}
/* Full-bleed nav row (not Bootstrap's stepped .container) so nav items
   always have enough real width to fit without wrapping/overflowing —
   capped on very wide monitors so it doesn't stretch edge-to-edge. */
.ph-nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
.ph-navbar .navbar-brand { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.ph-navbar .brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ph-navy);
    font-size: 1.15rem;
    line-height: 1.1;
    white-space: nowrap;
}
.ph-navbar .brand-name small {
    display: block;
    font-size: .62rem;
    font-weight: 500;
    color: var(--ph-teal);
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
}
.ph-navbar .nav-link {
    color: var(--ph-ink);
    font-weight: 500;
    padding: .5rem .7rem !important;
    position: relative;
    white-space: nowrap;
}
.ph-navbar .nav-link.active,
.ph-navbar .nav-link:hover { color: var(--ph-coral); }
.ph-navbar .btn-book {
    background: var(--ph-coral);
    color: #fff;
    border-radius: 50px;
    padding: .55rem 1.3rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
}
.ph-navbar .btn-book:hover { background: var(--ph-navy); color: #fff; }

/* Below the xl collapse breakpoint, the menu becomes a vertical stack —
   give links generous tap targets and make the CTA a full-width block
   so it's easy to hit on a phone. */
@media (max-width: 1199.98px) {
    .ph-navbar .navbar-collapse {
        border-top: 1px solid var(--ph-border);
        margin-top: .6rem;
        padding-top: .4rem;
    }
    .ph-navbar .nav-link { padding: .75rem .5rem !important; font-size: 1rem; }
    .ph-navbar .btn-book { padding: .8rem 1.3rem; margin-top: .4rem; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    background: linear-gradient(120deg, rgba(8,42,72,.88), rgba(11,61,102,.72)), var(--hero-img, none);
    background-size: cover;
    background-position: center;
    color: #fff;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(42,169,160,.25), transparent 55%);
    pointer-events: none;
}
.hero .eyebrow {
    display: inline-block;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50px;
    padding: .35rem 1rem;
    font-size: .8rem;
    letter-spacing: .5px;
    margin-bottom: 1.2rem;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 700; line-height: 1.15; }
.hero p.lead { color: #dceaf1; font-size: 1.15rem; max-width: 560px; }
.hero-stats {
    display: flex;
    gap: 2.2rem;
    margin-top: 2.4rem;
    flex-wrap: wrap;
}
.hero-stats .stat-num { font-family: var(--font-heading); font-weight: 700; font-size: 1.9rem; color: #fff; }
.hero-stats .stat-label { font-size: .8rem; color: #b9d3e0; text-transform: uppercase; letter-spacing: .5px; }

/* ---------- Section headings ---------- */
.section-pad { padding: 5rem 0; }
.section-eyebrow {
    display: inline-block;
    color: var(--ph-teal);
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-size: .8rem;
    margin-bottom: .6rem;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 1rem; }
.section-sub { color: var(--ph-slate); max-width: 640px; }

/* ---------- Cards ---------- */
.ph-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--ph-border);
    transition: transform .25s ease, box-shadow .25s ease;
    height: 100%;
}
.ph-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }

.service-card { padding: 2rem 1.6rem; text-align: left; }
.service-card .icon-wrap {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--ph-teal-light);
    color: var(--ph-teal);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.1rem;
}
.service-card h5 { font-size: 1.05rem; margin-bottom: .5rem; }
.service-card p { color: var(--ph-slate); font-size: .92rem; margin-bottom: 0; }

.doctor-card { overflow: hidden; text-align: center; }
.doctor-card .doctor-photo {
    width: 100%; aspect-ratio: 4/3.4; object-fit: cover;
    background: var(--ph-teal-light);
}
.doctor-card .doctor-body { padding: 1.4rem 1.2rem; }
.doctor-card h5 { margin-bottom: .1rem; font-size: 1.05rem; }
.doctor-card .specialty { color: var(--ph-coral); font-size: .85rem; font-weight: 600; }

.facility-card img { width: 100%; height: 210px; object-fit: cover; border-radius: var(--radius-md) var(--radius-md) 0 0; }
.facility-card .facility-body { padding: 1.3rem 1.3rem 1.6rem; }

/* ---------- Why choose us ---------- */
.why-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.why-item .why-icon {
    flex: 0 0 auto;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--ph-coral);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.why-item h6 { margin-bottom: .25rem; }
.why-item p { color: var(--ph-slate); font-size: .92rem; margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(120deg, var(--ph-navy), var(--ph-teal));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* ---------- Testimonials placeholder ---------- */
.testimonial-placeholder {
    border: 2px dashed var(--ph-border);
    border-radius: var(--radius-md);
    padding: 3rem;
    text-align: center;
    color: var(--ph-slate);
}

/* ---------- Footer ---------- */
.ph-footer { background: var(--ph-navy-dark); color: #cfe3ee; }
.ph-footer h6 { color: #fff; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; font-size: .85rem; }
.ph-footer a { color: #b9d3e0; }
.ph-footer a:hover { color: var(--ph-amber); }
.ph-footer .social-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    margin-right: .5rem;
    transition: background .2s ease;
}
.ph-footer .social-icon:hover { background: var(--ph-teal); }
.ph-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: #9fb9c7; }

/* ---------- Breadcrumb / page header (interior pages) ---------- */
.page-header {
    background: linear-gradient(120deg, var(--ph-navy-dark), var(--ph-blue));
    color: #fff;
    padding: 3.4rem 0 2.6rem;
}
.page-header h1 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: .4rem; }
.page-header .breadcrumb a { color: #cfe3ee; }
.page-header .breadcrumb .active { color: var(--ph-amber); }

/* ---------- Gallery ---------- */
.gallery-item { border-radius: var(--radius-md); overflow: hidden; position: relative; cursor: pointer; }
.gallery-item img { width: 100%; height: 230px; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .caption {
    position: absolute; inset: auto 0 0 0;
    background: linear-gradient(0deg, rgba(8,42,72,.85), transparent);
    color: #fff; padding: 1rem .9rem .6rem;
    font-size: .85rem;
    opacity: 0; transition: opacity .25s ease;
}
.gallery-item:hover .caption { opacity: 1; }

/* ---------- Forms ---------- */
.ph-form .form-control, .ph-form .form-select {
    border-radius: var(--radius-sm);
    padding: .7rem .9rem;
    border: 1px solid var(--ph-border);
}
.ph-form .form-control:focus, .ph-form .form-select:focus {
    border-color: var(--ph-teal);
    box-shadow: 0 0 0 .2rem rgba(42,169,160,.15);
}
.ph-form label { font-weight: 600; font-size: .88rem; color: var(--ph-navy); margin-bottom: .35rem; }

/* ---------- Misc ---------- */
.map-frame { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); border: 0; width: 100%; min-height: 340px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 767.98px) {
    .hero { min-height: auto; padding: 6.5rem 0 3.5rem; }
    .section-pad { padding: 3.2rem 0; }
    .cta-band { padding: 2rem 1.4rem; text-align: center; }
}

/* =====================================================================
   PATIENT PORTAL / DASHBOARD LAYOUT (Stage 3)
   ===================================================================== */
.dash-wrap { min-height: 70vh; background: var(--ph-fog); }
.dash-sidebar {
    background: var(--ph-navy-dark);
    color: #cfe3ee;
    min-height: 100%;
    padding: 1.6rem 0;
}
.dash-sidebar .dash-user {
    padding: 0 1.4rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 1rem;
}
.dash-sidebar .dash-user .avatar {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--ph-teal);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem;
}
.dash-sidebar .nav-link {
    color: #cfe3ee;
    padding: .7rem 1.4rem;
    border-left: 3px solid transparent;
    font-weight: 500;
    display: flex; align-items: center; gap: .6rem;
}
.dash-sidebar .nav-link i { font-size: 1.05rem; }
.dash-sidebar .nav-link.active,
.dash-sidebar .nav-link:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
    border-left-color: var(--ph-coral);
}
.dash-main { padding: 2rem 1.5rem; }
.dash-stat-card {
    background: #fff; border-radius: var(--radius-md);
    padding: 1.4rem; box-shadow: var(--shadow-card);
    border: 1px solid var(--ph-border);
}
.dash-stat-card .stat-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: .8rem;
}
.dash-stat-card .stat-value { font-family: var(--font-heading); font-weight: 700; font-size: 1.6rem; color: var(--ph-navy); }
.dash-stat-card .stat-label { color: var(--ph-slate); font-size: .82rem; }

.status-badge { padding: .3rem .75rem; border-radius: 50px; font-size: .78rem; font-weight: 600; display: inline-block; }
.status-pending { background: #fff3cd; color: #8a6300; }
.status-confirmed { background: #d1f2eb; color: #0e6655; }
.status-cancelled { background: #fde2e1; color: #a5291f; }
.status-completed { background: #d6e9ff; color: #0b4a8f; }
.status-rescheduled { background: #eadcf9; color: #5a2d82; }

.auth-wrap { min-height: 80vh; display: flex; align-items: center; background: var(--ph-fog); padding: 2rem 0; }
.auth-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 2.6rem; max-width: 480px; margin: 0 auto; }
@media (max-width: 575.98px) {
    .auth-card { padding: 1.75rem 1.4rem; border-radius: var(--radius-md); }
}

/* =====================================================================
   ADMIN DASHBOARD (Stage 4)
   ===================================================================== */
.admin-sidebar { background: var(--ph-navy-dark); color: #cfe3ee; min-height: 100%; padding: 1.4rem 0; }
.admin-sidebar .nav-link { color: #cfe3ee; padding: .58rem 1.3rem; border-left: 3px solid transparent; font-weight: 500; font-size: .92rem; display: flex; align-items: center; gap: .6rem; }
.admin-sidebar .nav-link i { font-size: 1rem; width: 18px; }
.admin-sidebar .nav-link.active, .admin-sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; border-left-color: var(--ph-coral); }
.admin-sidebar .nav-section-label { text-transform: uppercase; font-size: .68rem; letter-spacing: .8px; color: #7fa0b3; padding: 1rem 1.3rem .3rem; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--ph-border); padding: .8rem 1.5rem; }
.admin-main { padding: 1.6rem; }
.admin-card { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-card); border: 1px solid var(--ph-border); }
.admin-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; color: var(--ph-slate); border-bottom-width: 1px !important; white-space: nowrap; }
.admin-table td { font-size: .9rem; vertical-align: middle; }
/* Keep multi-button action cells (Edit/Deactivate/etc.) from wrapping
   text mid-word or squashing into each other on narrow screens — the
   surrounding .table-responsive still allows horizontal scroll if the
   whole table is wider than the viewport. */
.admin-table td form { display: inline-block; }
.admin-table td .btn { white-space: nowrap; }

@media (max-width: 991.98px) {
    .admin-main { padding: 1rem; }
    .admin-card.p-4 { padding: 1.25rem !important; }
    /* Mobile top bar sits above the content; give the page a touch more
       breathing room so headings/buttons don't crowd the toggler row. */
    .navbar.navbar-dark .container-fluid { padding: .25rem .5rem; }
}
@media (max-width: 575.98px) {
    /* Stat cards, filter bars and card headers with a title + button on
       one row wrap to two lines cleanly instead of squeezing. */
    .admin-main h3, .admin-main h5 { font-size: 1.15rem; }
    .dash-stat-card .stat-value { font-size: 1.35rem; }
}
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ph-coral); position: absolute; top: 6px; right: 6px; }
.thumb-sm { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.stat-icon-admin { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }


