@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --accent: #06b6d4;
    --accent2: #10b981;
    --dark: #0f172a;
    --dark2: #1e293b;
    --light: #f8fafc;
    --gray: #e2e8f0;
    --text: #475569;
    --text-light: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 40px -8px rgba(0,0,0,0.15), 0 8px 16px -4px rgba(0,0,0,0.08);
    --shadow-hover: 0 25px 50px -10px rgba(79,70,229,0.25);
    --radius: 20px;
    --radius-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    background: #f1f5f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animated BG */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(79,70,229,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 70% at 80% 80%, rgba(6,182,212,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(16,185,129,0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

h1, h2, h3, h4, h5 { color: var(--dark); font-weight: 700; line-height: 1.2; }

a { color: var(--primary); text-decoration: none; transition: all 0.25s ease; }
a:hover { color: var(--primary-dark); }

/* ─── GLOBAL ANIMATIONS ─── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ─── HEADER ─── */
header {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.9);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 20px rgba(0,0,0,0.07);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-icon { font-size: 1.8rem; -webkit-text-fill-color: initial; }

.nav-links { display: flex; gap: 0.5rem; align-items: center; }
.nav-links a {
    font-weight: 600;
    color: var(--text);
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-links a:hover {
    background: rgba(79,70,229,0.08);
    color: var(--primary);
}
.nav-links a.active {
    background: var(--primary);
    color: white;
}
.nav-links i { font-size: 1.1rem; }

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark);
}

/* ─── MAIN ─── */
main {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* ─── HERO ─── */
.hero {
    position: relative;
    border-radius: 28px;
    overflow: visible;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 40%, #06b6d4 100%);
    padding: 4.5rem 3rem 5rem;
    margin-bottom: 3.5rem;
    text-align: center;
}
/* Inner clip mask so the dotted background stays inside */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    overflow: hidden;
    pointer-events: none;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='g' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='50' cy='50' r='1' fill='white' opacity='0.15'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23g)'/%3E%3C/svg%3E");
    opacity: 0.5;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
    color: white;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.hero p {
    color: rgba(255,255,255,0.85);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* ─── SEARCH BOXES ─── */
.search-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}
@media (max-width: 640px) { .search-panels { grid-template-columns: 1fr; } }

.search-panel {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: left;
}
.search-panel h3 { color: white; font-size: 1.1rem; margin-bottom: 1rem; font-weight: 700; }
.search-panel .form-control {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 10px;
    padding: 0.85rem 1.2rem;
    font-size: 0.95rem;
    width: 100%;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}
.search-panel .form-control::placeholder { color: rgba(255,255,255,0.65); }
.search-panel .form-control:focus {
    outline: none;
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.25);
}
.search-panel .form-control option { color: var(--dark); background: white; }

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    border: none;
    text-align: center;
}
.btn-white {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.18); color: var(--primary-dark); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(79,70,229,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(79,70,229,0.45); color: white; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--gray);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(79,70,229,0.04); }
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }

/* ─── SECTION TITLE ─── */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}
.section-head h2 { font-size: 1.8rem; }
.section-head h2 span { color: var(--primary); }

/* ─── DOCTOR CARD (PORTRAIT STYLE) ─── */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}

.doctor-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(226,232,240,0.8);
}
.doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(79,70,229,0.15);
}

.doctor-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0fdf4 100%);
}
.doctor-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.4s ease;
}
.doctor-card:hover .doctor-card-image img { transform: scale(1.05); }
.doctor-card-image .img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.5) 0%, transparent 50%);
}
.doctor-card-image .doc-avatar {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    opacity: 0.3;
}
.doctor-card-image .specialty-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(79,70,229,0.9);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}
.location-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.9);
    color: var(--dark);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    backdrop-filter: blur(4px);
}

.doctor-card-body {
    padding: 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.doctor-card-body h3,
.doctor-card-name {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
    color: var(--dark);
    line-height: 1.3;
    font-weight: 700;
}
.doctor-card-body .degrees,
.doctor-card-deg {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doctor-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--gray);
    font-size: 0.82rem;
    color: var(--text-light);
}
.doctor-card-footer .chambers { display: flex; align-items: center; gap: 0.3rem; }
.doc-arrow {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.doctor-card:hover .doc-arrow { background: var(--primary-dark); transform: translateX(3px); }

/* ─── MEDICINE CARD ─── */
.medicines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.75rem;
}

.med-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid rgba(226,232,240,0.8);
    display: flex;
    flex-direction: column;
}
.med-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -10px rgba(6,182,212,0.2);
    border-color: rgba(6,182,212,0.2);
}

.med-card-image {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 50%, #e0f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.med-card-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.4s ease;
}
.med-card:hover .med-card-image img { transform: scale(1.08); }
.med-card-image .med-icon {
    font-size: 4rem;
    opacity: 0.25;
}
.med-card-image .antibiotic-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
}

.med-card-body { padding: 1.4rem; flex: 1; }
.med-card-body h3 { font-size: 1.05rem; margin-bottom: 0.25rem; color: var(--dark); }
.med-card-body .dosage { font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.75rem; }
.med-card-body .generic-name {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
}

.med-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--gray);
}
.med-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent2);
}
.med-company { font-size: 0.78rem; color: var(--text-light); max-width: 120px; text-align: right; line-height: 1.3; }

/* ─── FILTERS BAR ─── */
.filters-bar {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    border: 1px solid var(--gray);
}
.filter-group { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; min-width: 180px; }
.filter-group label { font-size: 0.78rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; }
.form-control {
    padding: 0.8rem 1.2rem;
    border: 1.5px solid var(--gray);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--dark);
    background: #fafafa;
    transition: all 0.2s;
    width: 100%;
}
.form-control:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

/* ─── MEDICINE TABLE ─── */
.med-table-wrap {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray);
}
.med-table { width: 100%; border-collapse: collapse; }
.med-table thead tr { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.med-table thead th { padding: 1rem 1.5rem; text-align: left; color: white; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.med-table tbody tr { border-bottom: 1px solid var(--gray); transition: background 0.15s; }
.med-table tbody tr:last-child { border-bottom: none; }
.med-table tbody tr:hover { background: #f8faff; }
.med-table td { padding: 1.1rem 1.5rem; vertical-align: middle; font-size: 0.93rem; }
.med-table td a { font-weight: 700; color: var(--dark); }
.med-table td a:hover { color: var(--primary); }

/* ─── DETAIL PAGE ─── */
.profile-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 2.5rem;
    color: white;
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.profile-img {
    width: 160px;
    height: 160px;
    border-radius: 20px;
    object-fit: cover;
    object-position: top;
    border: 4px solid rgba(255,255,255,0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 260px; }
.profile-info h1 { color: white; font-size: 2rem; margin-bottom: 0.5rem; }
.profile-info .pdesig { color: rgba(255,255,255,0.8); font-size: 1.05rem; margin-bottom: 1.5rem; }
.profile-pills { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.profile-pill {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.info-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray);
    margin-bottom: 2rem;
}
.info-card h2 { font-size: 1.3rem; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--gray); color: var(--dark); }
.info-row { display: flex; gap: 0.75rem; margin-bottom: 1rem; align-items: flex-start; }
.info-icon { font-size: 1.1rem; margin-top: 0.1rem; flex-shrink: 0; }
.info-row strong { display: block; font-size: 0.78rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.15rem; }

.chamber-card {
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s;
}
.chamber-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.chamber-header {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid #bae6fd;
}
.chamber-header h3 { font-size: 0.95rem; color: #0369a1; margin: 0; }
.chamber-body { padding: 1.2rem 1.4rem; }
.chamber-row { display: flex; gap: 0.6rem; margin-bottom: 0.7rem; font-size: 0.88rem; align-items: flex-start; }
.chamber-row:last-child { margin-bottom: 0; }
.call-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent2), #059669);
    color: white;
    padding: 0.7rem 1.3rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 1rem;
    justify-content: center;
    transition: all 0.2s;
}
.call-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.4); color: white; }

/* ─── TAG PILLS ─── */
.tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag { background: #f1f5f9; color: var(--text); padding: 0.3rem 0.85rem; border-radius: 50px; font-size: 0.8rem; font-weight: 600; border: 1.5px solid var(--gray); }
.tag.specialty { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.tag.location  { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.tag.exp       { background: #fefce8; color: #854d0e; border-color: #fde68a; }

/* ─── PAGINATION ─── */
nav.pagination-wrapper { margin-top: 2rem; }
.pagination { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.page-item { list-style: none; }
.page-link { padding: 0.5rem 1rem; border-radius: 8px; border: 1.5px solid var(--gray); color: var(--text); font-weight: 600; font-size: 0.9rem; transition: all 0.2s; background: white; display: inline-block; }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-item.active .page-link, .page-item.active span { background: var(--primary); border-color: var(--primary); color: white; }
.page-item.disabled .page-link, .page-item.disabled span { opacity: 0.5; pointer-events: none; background: #f1f5f9; color: var(--text-light); }

/* Bootstrap Utilities needed for Paginator */
.d-none { display: none !important; }
@media (min-width: 640px) {
    .d-sm-none { display: none !important; }
    .d-sm-flex { display: flex !important; }
    .justify-content-sm-between { justify-content: space-between !important; }
    .align-items-sm-center { align-items: center !important; }
}
.d-flex { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.flex-fill { flex: 1 1 auto !important; }
.text-muted { color: var(--text-light); }
.small { font-size: 0.85rem; }

/* ─── MEDICINE DETAIL ─── */
.med-hero {
    display: flex;
    gap: 2.5rem;
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray);
    flex-wrap: wrap;
}
.med-hero-img-wrap {
    width: 160px;
    height: 160px;
    background: linear-gradient(135deg, #f0fdf4, #e0f2fe);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--gray);
}
.med-hero-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 1.5rem; }
.med-hero-img-wrap .no-img { font-size: 5rem; opacity: 0.3; }
.med-hero-info { flex: 1; min-width: 260px; }
.med-hero-info h1 { font-size: 2rem; margin-bottom: 0.4rem; }
.med-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.med-meta-item { background: #f8fafc; border-radius: 12px; padding: 1rem 1.2rem; border: 1px solid var(--gray); }
.med-meta-item .label { font-size: 0.75rem; color: var(--text-light); font-weight: 700; text-transform: uppercase; margin-bottom: 0.3rem; }
.med-meta-item .val { font-size: 1.05rem; font-weight: 700; color: var(--dark); }
.price-big { font-size: 1.5rem !important; color: var(--accent2) !important; }

/* ─── STATS ROW ─── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.stat-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--gray);
    box-shadow: var(--shadow-sm);
}
.stat-card .stat-num { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.25rem; }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-light); font-weight: 600; }
.stat-card.blue .stat-num { color: var(--primary); }
.stat-card.teal .stat-num { color: var(--accent); }
.stat-card.green .stat-num { color: var(--accent2); }
.stat-card.purple .stat-num { color: #7c3aed; }

/* ─── PREMIUM MODERN FOOTER ─── */
.premium-footer {
    background: linear-gradient(to bottom, #1e293b, var(--dark));
    color: #cbd5e1;
    padding: 5rem 1.5rem 2rem;
    margin-top: 5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-col h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}
.footer-about p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: white !important;
    margin-bottom: 1rem;
    text-decoration: none !important;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}
.footer-links a:hover { color: var(--accent); transform: translateX(5px); display: inline-block; }
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
}
.footer-bottom strong { color: white; }

/* ─── BREADCRUMB ─── */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; font-size: 0.88rem; color: var(--text-light); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); font-weight: 600; }

/* ─── GENERIC UTILITIES (grid-3, card, etc) ─── */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius);
    padding: 1.8rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
a .card {
    height: 100%;
}
a:hover .card {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(79, 70, 229, 0.3);
}
.card-title {
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 0.3rem;
    font-weight: 700;
}
.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.doc-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    margin: 0 auto 1.2rem auto;
    border: 4px solid white;
    box-shadow: var(--shadow-sm);
    display: block;
}
.card.clearfix {
    text-align: center;
    align-items: center;
}
.card.clearfix .tags {
    justify-content: center;
    margin-bottom: 1rem;
}

/* ─── DOCTOR PROFILE HERO ─── */
.profile-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    border-radius: 24px;
    padding: 2.5rem 3rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    color: white;
    box-shadow: 0 20px 60px rgba(79,70,229,0.3);
    flex-wrap: wrap;
}
.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 5px solid rgba(255,255,255,0.4);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    flex-shrink: 0;
    background: rgba(255,255,255,0.1);
}
.profile-info { flex: 1; min-width: 260px; }
.profile-info h1 {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.4rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.pdesig {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1.2rem;
    font-style: italic;
}
.profile-pills { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.profile-pill {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
}

/* ─── INFO CARD (About section) ─── */
.info-card {
    background: white;
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray);
}
.info-card h2 { margin-top: 0; color: var(--primary-dark); font-size: 1.3rem; }

/* ─── CHAMBER CARDS ─── */
.chamber-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray);
    transition: all 0.25s;
}
.chamber-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.chamber-header {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    padding: 1.2rem 1.5rem;
    color: white;
}
.chamber-header h3 { margin: 0 0 0.3rem; font-size: 1.05rem; color: white; }
.chamber-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.chamber-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.5;
}
.chamber-row span:first-child { flex-shrink: 0; font-size: 1.1rem; margin-top: 1px; }
.call-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white !important;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.9rem;
    border-radius: 12px;
    text-decoration: none !important;
    margin-top: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}
.call-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.4); }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .nav-container { padding: 0.8rem 1rem; position: relative; }
    .mobile-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--gray);
    }
    .nav-links.active { display: flex; }
    .nav-links a { width: 100%; justify-content: flex-start; padding: 1rem; border-radius: 8px; }

    main { padding: 0 1rem; }
    .hero { padding: 3rem 1.5rem; }
    .profile-hero { padding: 1.75rem; gap: 1.5rem; }
    .profile-img { width: 100px; height: 100px; }
    .profile-info h1 { font-size: 1.4rem; }
    .med-meta-grid { grid-template-columns: 1fr; }
    .doctors-grid, .medicines-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .footer-links a:hover { transform: translateX(0); }
    .med-profile-hero { padding: 1.75rem; flex-direction: column; gap: 1.5rem; }
    .med-img-panel { width: 120px; height: 120px; }
    .med-hero-stats { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════
   PREMIUM MEDICINE HERO (teal gradient)
═══════════════════════════════════════ */
.med-profile-hero {
    position: relative;
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #4f46e5 100%);
    border-radius: 24px;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    color: white;
    box-shadow: 0 20px 60px rgba(9,145,178,0.35);
    flex-wrap: wrap;
    overflow: hidden;
}
.med-profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='white' opacity='0.08'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23p)'/%3E%3C/svg%3E");
    pointer-events: none;
}
.med-img-panel {
    flex: 0 0 160px;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
    cursor: zoom-in;
    transition: transform 0.3s ease, border-color 0.2s;
}
.med-img-panel:hover { transform: scale(1.04); border-color: rgba(255,255,255,0.7); }
.med-img-panel img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 0.75rem;
}
.med-hero-info-panel { flex: 1; min-width: 260px; position: relative; z-index: 1; }
.med-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}
.med-stat-box {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    backdrop-filter: blur(8px);
    transition: background 0.2s;
}
.med-stat-box:hover { background: rgba(255,255,255,0.2); }
.med-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.65);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}
.med-stat-val {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}
.med-stat-val.price {
    font-size: 1.3rem;
    color: #86efac;
}

/* ═══════════════════════════════════════
   PREMIUM STAT CARDS (home page)
═══════════════════════════════════════ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.stat-card {
    border-radius: 20px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1' fill='white' opacity='1'/%3E%3C/svg%3E");
}
.stat-card:hover { transform: translateY(-6px); }
.stat-card .stat-icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}
.stat-card .stat-num {
    font-size: 2.4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.stat-card .stat-label {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.stat-card.blue {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 10px 40px rgba(79,70,229,0.35);
}
.stat-card.teal {
    background: linear-gradient(135deg, #0891b2 0%, #0d9488 100%);
    box-shadow: 0 10px 40px rgba(8,145,178,0.35);
}
.stat-card.green {
    background: linear-gradient(135deg, #059669 0%, #16a34a 100%);
    box-shadow: 0 10px 40px rgba(5,150,105,0.35);
}
.stat-card.purple {
    background: linear-gradient(135deg, #7c3aed 0%, #c026d3 100%);
    box-shadow: 0 10px 40px rgba(124,58,237,0.35);
}

/* ═══════════════════════════════════════
   PREMIUM SPECIALTY / CITY PILLS
═══════════════════════════════════════ */
.spec-pill, .city-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    text-decoration: none;
    border: 1.5px solid transparent;
}
.spec-pill {
    background: white;
    color: var(--primary-dark);
    border-color: rgba(79,70,229,0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.spec-pill:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79,70,229,0.3);
}
.city-pill {
    background: white;
    color: #0369a1;
    border-color: rgba(8,145,178,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.city-pill:hover {
    background: #0891b2;
    color: white;
    border-color: #0891b2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8,145,178,0.3);
}

/* ═══════════════════════════════════════
   SECTION HEADER UPGRADE
═══════════════════════════════════════ */
.section-head h2 {
    font-size: 1.75rem;
    position: relative;
    padding-bottom: 0.5rem;
}
.section-head h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 48px; height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.section-head h2 span { color: var(--primary); }

/* ═══════════════════════════════════════
   PREMIUM HOME FEATURED DOCTOR CARD
═══════════════════════════════════════ */
.feat-doc-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(226,232,240,0.8);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    text-align: center;
    display: flex;
    flex-direction: column;
}
.feat-doc-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(79,70,229,0.18);
    border-color: rgba(79,70,229,0.2);
}
.feat-doc-card .doc-banner {
    height: 80px;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    position: relative;
}
.feat-doc-card .doc-avatar-wrap {
    width: 88px; height: 88px;
    border-radius: 50%;
    border: 4px solid white;
    overflow: hidden;
    position: absolute;
    bottom: -44px; left: 50%; transform: translateX(-50%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    background: #e0e7ff;
}
.feat-doc-card .doc-avatar-wrap img {
    width: 100%; height: 100%; object-fit: cover; object-position: top;
}
.feat-doc-card .doc-body {
    padding: 3.5rem 1.5rem 1.5rem;
    flex: 1;
}
.feat-doc-card .doc-name {
    font-size: 1.05rem; font-weight: 700;
    color: var(--dark); margin-bottom: 0.2rem;
}
.feat-doc-card .doc-deg {
    font-size: 0.8rem; color: var(--text-light);
    margin-bottom: 1rem;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* ═══════════════════════════════════════
   PREMIUM MEDICINE CARD (home featured)
═══════════════════════════════════════ */
.feat-med-card {
    background: white;
    border-radius: 18px;
    padding: 1.5rem;
    border: 1px solid var(--gray);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    border-left: 4px solid var(--accent);
}
.feat-med-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(8,145,178,0.18);
    border-left-color: var(--primary);
}
.feat-med-name {
    font-size: 1.05rem; font-weight: 700;
    color: var(--primary-dark);
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.feat-med-form {
    font-size: 0.78rem; background: var(--gray);
    color: var(--text-light); padding: 2px 8px;
    border-radius: 10px; font-weight: 600;
}
.feat-med-company { font-size: 0.88rem; color: var(--text); }
.feat-med-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: auto; padding-top: 0.5rem;
    border-top: 1px solid var(--gray);
}
.feat-med-price { font-size: 1.2rem; font-weight: 800; color: var(--accent2); }
.feat-med-generic { font-size: 0.82rem; color: var(--primary); font-weight: 600; }

/* ─── SMART SEARCH RESPONSIVE ─── */
#smart-search-wrap {
    position: relative;
    max-width: 700px;
    margin: 2rem auto 1.5rem;
}
.smart-search-bar {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: visible;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    position: relative;
    min-width: 0;
    clip-path: none;
}
.smart-search-icon {
    padding: 0 1.2rem;
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.smart-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 1rem 0.5rem;
    font-family: inherit;
    color: #1e293b;
    background: transparent;
}
.smart-search-btn {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    padding: 0 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.smart-search-btn:hover { opacity: 0.9; }

@media (max-width: 480px) {
    .smart-search-icon { padding: 0 0.8rem; font-size: 1.1rem; }
    .smart-search-input { font-size: 0.9rem; padding: 0.9rem 0.3rem; }
    .smart-search-btn { padding: 0 1rem; font-size: 0.85rem; }
    #smart-search-wrap { margin: 1.5rem auto 1rem; }
    .hero { padding: 3rem 1.2rem 2rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 0.95rem; margin-bottom: 1.5rem; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .med-hero-stats { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════
   QUICK LINKS PILLS
═══════════════════════════════════════ */
.ql-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: white;
    border: 1.5px solid rgba(79,70,229,0.12);
    border-radius: 50px;
    padding: 0.45rem 0.9rem 0.45rem 0.65rem;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--dark);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
    text-decoration: none;
    white-space: nowrap;
}
.ql-pill:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(79,70,229,0.28);
}
.ql-pill:hover .ql-count { background: rgba(255,255,255,0.2); color: white; }
.ql-icon { font-size: 0.85rem; opacity: 0.6; }
.ql-pill:hover .ql-icon { opacity: 1; }
.ql-count {
    background: #f1f5f9;
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    margin-left: 0.1rem;
    transition: all 0.2s;
}
.ql-pill-more {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white !important;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(79,70,229,0.3);
}
.ql-pill-more:hover {
    box-shadow: 0 8px 24px rgba(79,70,229,0.4);
    transform: translateY(-3px);
}
