:root {
    --primary: #12867f;
    --primary-dark: #0f6d67;
    --secondary: #103b44;
    --accent: #e8f6f4;
    --surface: #ffffff;
    --surface-soft: #f7fbfa;
    --surface-deep: #edf6f5;
    --border-soft: rgba(16, 78, 72, 0.1);
    --border-strong: rgba(16, 78, 72, 0.18);
    --text-dark: #17313b;
    --text-muted: #6b7f86;
    --gold: #c8912e;
    --shadow-soft: 0 10px 32px rgba(11, 49, 63, 0.06);
    --shadow-card: 0 18px 42px rgba(11, 49, 63, 0.08);
    --shadow-button: 0 12px 26px rgba(18, 134, 127, 0.18);
    --radius-xl: 26px;
    --radius-lg: 20px;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-dark);
    background:
        radial-gradient(circle at top left, rgba(18, 134, 127, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(200, 145, 46, 0.08), transparent 18%),
        linear-gradient(180deg, #fbfdfd 0%, #ffffff 42%, #f7fbfb 100%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: -0.02em;
}

p,
a,
button,
input,
select,
textarea,
label,
span,
li {
    font-family: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.text-primary,
.navbar-brand,
.footer-link:hover {
    color: var(--primary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.96rem;
    padding: 0.72rem 1.32rem;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, #1d978f 100%);
    border: 0;
    box-shadow: var(--shadow-button);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-outline-primary {
    color: var(--primary);
    border: 1px solid rgba(18, 134, 127, 0.22);
    background: rgba(255, 255, 255, 0.88);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.btn-outline-secondary {
    color: var(--secondary);
    border-color: rgba(16, 59, 68, 0.14);
    background: rgba(255, 255, 255, 0.9);
}

.form-control,
.form-select {
    min-height: 50px;
    border-radius: 16px;
    border: 1px solid rgba(16, 78, 72, 0.12);
    background: rgba(255, 255, 255, 0.97);
    color: var(--text-dark);
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(18, 134, 127, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(18, 134, 127, 0.1);
}

.topbar {
    background: linear-gradient(90deg, var(--secondary) 0%, #144752 100%);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    padding: 0.62rem 0;
}

.topbar-links a {
    color: #fff;
    opacity: 0.9;
}

.main-navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(18, 134, 127, 0.08);
    box-shadow: 0 10px 26px rgba(12, 38, 53, 0.04);
}

.navbar {
    padding: 0.9rem 0;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-lockup strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1;
}

.brand-lockup small {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary) 0%, #2bb5a3 100%);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(18, 134, 127, 0.14);
}

.nav-link {
    color: var(--secondary);
    font-weight: 700;
}

.nav-link:hover,
.nav-link:focus,
.navbar .nav-link.active {
    color: var(--primary);
}

.hero-section {
    position: relative;
    padding: 3.7rem 0 2.2rem;
}

.hero-panel,
.content-panel,
.doctor-card,
.specialty-card,
.search-panel,
.stats-card,
.admin-card,
.info-chip,
.cta-panel,
.directory-panel,
.footer-shell {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 1.8rem;
    background:
        radial-gradient(circle at top right, rgba(200, 145, 46, 0.13), transparent 22%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, rgba(243, 250, 248, 0.98) 100%);
}

.hero-panel::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(18, 134, 127, 0.08), transparent 68%);
    top: -50px;
    right: -30px;
}

.hero-copy,
.hero-aside {
    position: relative;
    z-index: 1;
}

.eyebrow,
.hero-pill,
.badge-soft,
.badge-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.46rem 0.82rem;
}

.eyebrow,
.hero-pill,
.badge-soft {
    color: var(--primary);
    background: rgba(18, 134, 127, 0.08);
}

.badge-gold {
    color: #9a6711;
    background: rgba(200, 145, 46, 0.14);
}

.hero-title {
    font-size: clamp(2.45rem, 4.2vw, 4.2rem);
    line-height: 0.92;
    margin: 0.8rem 0 0.8rem;
}

.hero-lead {
    max-width: 620px;
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.metric-chip {
    padding: 0.88rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(16, 78, 72, 0.08);
}

.metric-chip strong {
    display: block;
    font-size: 1.2rem;
    color: var(--secondary);
}

.metric-chip span {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.search-panel {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(8px);
}

.hero-aside .directory-panel,
.hero-aside .content-panel {
    height: 100%;
}

.directory-panel {
    padding: 1.35rem;
    background: linear-gradient(180deg, rgba(16, 59, 68, 0.98) 0%, rgba(18, 134, 127, 0.96) 100%);
    color: #fff;
}

.directory-panel h3,
.directory-panel h4,
.directory-panel p,
.directory-panel li,
.directory-panel span {
    color: inherit;
}

.directory-highlights {
    display: grid;
    gap: 0.72rem;
    margin-top: 1.05rem;
}

.directory-highlights div {
    padding: 0.85rem 0.92rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.directory-highlights strong {
    display: block;
    font-size: 0.96rem;
    margin-bottom: 0.12rem;
}

.section-block {
    padding: 0.8rem 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.section-heading h2,
.section-heading h1 {
    margin: 0;
    font-size: clamp(1.95rem, 3.2vw, 2.8rem);
    line-height: 0.96;
}

.section-heading p,
.section-heading span {
    margin: 0;
    color: var(--text-muted);
}

.specialty-card {
    display: block;
    height: 100%;
    padding: 1.15rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(246, 251, 250, 0.96) 100%);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.specialty-card:hover {
    transform: translateY(-4px);
    border-color: rgba(18, 134, 127, 0.18);
    box-shadow: var(--shadow-card);
}

.specialty-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin-bottom: 0.85rem;
    background: linear-gradient(135deg, rgba(18, 134, 127, 0.1), rgba(200, 145, 46, 0.14));
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 800;
}

.specialty-card h5 {
    font-size: 1.45rem;
    margin-bottom: 0.35rem;
}

.doctor-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(250, 253, 252, 0.98));
    border: 1px solid rgba(16, 78, 72, 0.1);
    box-shadow: 0 8px 24px rgba(11, 49, 63, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.doctor-card:hover {
    transform: translateY(-4px);
    border-color: rgba(18, 134, 127, 0.18);
    box-shadow: var(--shadow-card);
}

.doctor-card img,
.doctor-profile-image {
    width: 100%;
    object-fit: cover;
}

.doctor-card img {
    height: 210px;
    background: #edf7f5;
}

.card-body-soft {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.15rem 1.15rem 1.05rem;
}

.card-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 0.5rem;
}

.card-topline > div {
    flex: 1;
    min-width: 0;
}

.doctor-name {
    font-size: clamp(1.45rem, 2vw, 1.95rem);
    line-height: 0.94;
    margin: 0.15rem 0 0;
}

.doctor-name a {
    color: var(--secondary);
}

.doctor-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.doctor-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.9rem 0 1rem;
}

.doctor-meta-pill,
.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    color: var(--secondary);
    background: var(--surface-deep);
    font-size: 0.84rem;
    font-weight: 700;
}

.card-actions,
.profile-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-top: auto;
}

.doctor-card .btn,
.search-panel .btn {
    padding: 0.74rem 1.28rem;
}

.fee-tag {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--secondary);
}

.content-panel {
    padding: 1.45rem;
}

.page-hero {
    padding: 2.2rem 0 0.7rem;
}

.page-hero .content-panel {
    background:
        radial-gradient(circle at top right, rgba(200, 145, 46, 0.12), transparent 22%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.99) 0%, rgba(245, 251, 249, 0.98) 100%);
}

.doctor-profile-image {
    min-height: 420px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16, 78, 72, 0.08);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 1.1rem 0 1.3rem;
}

.profile-grid .info-chip {
    border-radius: 18px;
    padding: 0.85rem 0.95rem;
}

.map-embed iframe {
    width: 100%;
    height: 340px;
    border: 0;
    border-radius: 18px;
}

.cta-panel {
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 250, 248, 0.97));
}

.ad-banner {
    display: block;
}

.ad-banner img {
    width: 100%;
    object-fit: cover;
    border-radius: 22px;
}

.site-footer {
    position: relative;
    padding-top: 0.6rem;
}

.footer-shell {
    padding: 1.6rem;
    background:
        radial-gradient(circle at top right, rgba(200, 145, 46, 0.1), transparent 22%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 251, 249, 0.98) 100%);
}

.footer-copy,
.footer-note {
    color: var(--text-muted);
}

.footer-title {
    font-family: 'Manrope', sans-serif;
    color: var(--secondary);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.footer-link {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.footer-badges span {
    padding: 0.48rem 0.8rem;
    border-radius: 999px;
    background: rgba(18, 134, 127, 0.08);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.footer-year {
    color: var(--secondary);
    font-weight: 800;
}

.alert {
    border-radius: 18px;
}

.admin-body {
    background: linear-gradient(180deg, #f3fbfb 0%, #f9fdfd 100%);
}

.admin-nav {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.stats-card,
.admin-card {
    padding: 1.35rem;
}

.login-card {
    max-width: 460px;
    margin: 5rem auto;
    padding: 2rem;
}

.table th {
    white-space: nowrap;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.object-fit-cover {
    object-fit: cover;
}

@media (max-width: 991.98px) {
    .topbar {
        display: none;
    }

    .hero-section {
        padding-top: 1.8rem;
    }

    .hero-metrics,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .doctor-profile-image {
        min-height: 300px;
    }
}

@media (max-width: 767.98px) {
    .hero-panel,
    .content-panel,
    .doctor-card,
    .specialty-card,
    .search-panel,
    .stats-card,
    .admin-card,
    .footer-shell {
        border-radius: 22px;
    }

    .hero-title {
        font-size: 2.35rem;
    }

    .doctor-name,
    .section-heading h2,
    .section-heading h1 {
        font-size: 1.85rem;
    }

    .card-actions,
    .profile-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
