:root {
    --home-ink: #102a43;
    --home-muted: #627d98;
    --home-primary: #087f8c;
    --home-primary-dark: #05606a;
    --home-accent: #13a8cf;
    --home-green: #18a66a;
    --home-surface: #ffffff;
    --home-soft: #f3f9fb;
    --home-line: #dbe8ed;
    --home-shadow: 0 18px 50px rgba(16, 42, 67, 0.10);
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f7fafb;
    color: var(--home-ink);
}

body .container {
    width: calc(100% - 48px);
    max-width: 1540px;
    padding-inline: 0;
}

/* Header */
.main-header {
    border-bottom: 1px solid rgba(8, 127, 140, 0.10);
    box-shadow: 0 8px 30px rgba(16, 42, 67, 0.06);
    backdrop-filter: blur(16px);
}

.nav-container {
    min-height: 78px;
    height: auto;
}

.logo-img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}

.logo-title {
    color: var(--home-primary);
    font-size: 19px;
}

.logo-subtitle {
    color: var(--home-muted);
}

.main-nav ul {
    gap: clamp(12px, 1.4vw, 26px);
}

.main-nav a {
    color: #334e68;
    font-weight: 600;
    border: 0;
    padding: 27px 0 24px;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 17px;
    width: 0;
    height: 3px;
    border-radius: 99px;
    background: var(--home-accent);
    transition: width .2s ease, right .2s ease;
}

.main-nav a:hover::after {
    right: 0;
    width: 100%;
}

.auth-buttons .btn {
    min-height: 44px;
    padding-inline: 22px;
    border-radius: 12px;
}

/* Hero */
.page-content {
    overflow: hidden;
}

.home-hero {
    position: relative;
    isolation: isolate;
    min-height: 500px;
    padding: clamp(50px, 6vw, 92px) 0 62px;
    background-color: #eaf7fa;
    background-image: url("../img/hero-medical-multispecialty-v2.webp");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-bottom: 1px solid #cfe6eb;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            90deg,
            rgba(229, 246, 250, .10) 0%,
            rgba(235, 249, 251, .58) 24%,
            rgba(244, 252, 253, .94) 38%,
            rgba(246, 252, 253, .97) 50%,
            rgba(243, 251, 252, .94) 62%,
            rgba(232, 247, 250, .58) 76%,
            rgba(220, 242, 247, .10) 100%
        ),
        linear-gradient(180deg, rgba(255,255,255,.05), rgba(220,242,247,.18));
}

.home-hero-orb {
    display: none;
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(8, 127, 140, .12);
    border-radius: 50%;
}

.home-hero-orb-one {
    width: 280px;
    height: 280px;
    left: -90px;
    top: -75px;
}

.home-hero-orb-two {
    width: 190px;
    height: 190px;
    right: -55px;
    bottom: -65px;
}

.home-hero-content {
    display: grid;
    gap: 34px;
}

.home-hero .hero-content {
    max-width: 920px;
    margin-inline: auto;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 15px;
    margin-bottom: 16px;
    border: 1px solid rgba(8,127,140,.18);
    border-radius: 999px;
    color: var(--home-primary);
    background: rgba(255,255,255,.72);
    font-size: 13px;
    font-weight: 700;
}

.home-hero h1 {
    max-width: none;
    margin: 0 0 14px;
    color: var(--home-ink);
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1.25;
    letter-spacing: -.7px;
}

.home-hero h1 span {
    color: var(--home-primary);
}

.home-hero .hero-content > p {
    max-width: 760px;
    margin: 0 auto;
    color: var(--home-muted);
    font-size: clamp(14px, 1.25vw, 18px);
    line-height: 1.9;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
    margin-top: 19px;
    color: #486581;
    font-size: 13px;
    font-weight: 600;
}

.hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.hero-trust b {
    display: inline-grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    color: #fff;
    background: var(--home-green);
    font-size: 12px;
}

.home-search-card {
    width: min(100%, 1420px);
    margin-inline: auto;
    padding: 12px;
    border: 1px solid rgba(8, 127, 140, .13);
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 24px 70px rgba(16,42,67,.14);
}

.search-type-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.search-type-tabs::-webkit-scrollbar {
    display: none;
}

.search-type-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 11px;
    color: #486581;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: .2s ease;
}

.search-type-tab:hover {
    color: var(--home-primary);
    background: #eef9fa;
}

.search-type-tab.is-active {
    color: #fff;
    background: var(--home-primary);
    box-shadow: 0 8px 20px rgba(8,127,140,.22);
}

.home-search-card .doctor-search-form {
    grid-template-columns: minmax(210px, 1.8fr) repeat(3, minmax(150px, 1fr)) auto;
    gap: 0;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
}

.home-search-card .search-field {
    min-width: 0;
    gap: 3px;
    padding: 9px 15px 10px;
    border-left: 1px solid var(--home-line);
    background: #fff;
}

.home-search-card .search-field:focus-within {
    background: #f2fbfc;
    box-shadow: inset 0 0 0 1px rgba(8,127,140,.18);
}

.home-search-card .search-field label {
    color: #627d98;
    padding: 0;
    font-size: 10px;
    font-weight: 700;
}

.home-search-card .search-field input,
.home-search-card .search-field select {
    min-height: 27px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--home-ink);
    background: transparent;
    font-size: 13px;
    font-weight: 600;
}

.home-search-card .search-field select {
    cursor: pointer;
}

.home-search-card .search-submit {
    min-width: 150px;
    padding: 6px;
    border: 0;
}

.home-search-card .btn-search {
    width: 100%;
    min-height: 52px;
    gap: 7px;
    padding: 10px 21px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--home-primary), #0b9dad);
    box-shadow: 0 9px 22px rgba(8,127,140,.24);
    font-size: 14px;
}

.home-search-card .btn-search:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--home-primary-dark), var(--home-primary));
}

.quick-specialties {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    padding: 11px 6px 1px;
    color: var(--home-muted);
    font-size: 11px;
}

.quick-label {
    font-weight: 700;
}

.quick-specialties a {
    padding: 5px 10px;
    border: 1px solid #d9eaee;
    border-radius: 999px;
    color: #486581;
    background: #f7fbfc;
    text-decoration: none;
    transition: .18s ease;
}

.quick-specialties a:hover {
    color: var(--home-primary);
    border-color: rgba(8,127,140,.35);
    background: #eef9fa;
}

/* Shared sections */
.featured-doctors-section,
.specialties-grid-section,
.articles-section,
.cta-doctor-banner {
    padding: clamp(54px, 5.5vw, 84px) 0;
}

.featured-doctors-section {
    background: #fff;
}

.specialties-grid-section,
.articles-section {
    background: var(--home-soft);
    border-block: 1px solid rgba(8,127,140,.07);
}

.articles-section + .articles-section {
    border-top: 0;
}

.section-title {
    margin-bottom: 8px;
    color: var(--home-ink);
    font-size: clamp(24px, 2.2vw, 34px);
    letter-spacing: -.3px;
}

.section-subtitle {
    margin-bottom: 28px;
    color: var(--home-muted);
    font-size: 14px;
}

/* Doctor cards */
.featured-doctors-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.doctor-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid #e1ebef;
    border-radius: 20px;
    box-shadow: 0 10px 34px rgba(16,42,67,.075);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.doctor-card::before {
    height: 3px;
    background: linear-gradient(90deg, var(--home-primary), var(--home-green));
}

.doctor-card:hover {
    transform: translateY(-5px);
    border-color: rgba(8,127,140,.25);
    box-shadow: 0 22px 48px rgba(16,42,67,.13);
}

.doctor-photo {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    border: 1px solid #c9e8ed;
}

.doctor-name {
    color: var(--home-ink);
    font-size: 17px;
}

.doctor-verified {
    background: var(--home-accent);
}

.doctor-specialty {
    color: var(--home-primary);
}

.doctor-location {
    min-height: 42px;
    align-items: flex-start;
    color: var(--home-muted);
    line-height: 1.7;
}

.doctor-tags {
    flex-wrap: wrap;
}

.doctor-price {
    padding-block: 11px;
    border-top: 1px solid #edf2f4;
    color: var(--home-ink);
}

.doctor-summary {
    display: -webkit-box;
    min-height: 78px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    border-color: #e1edef;
    background: #f8fbfb;
    color: #486581;
    line-height: 1.75;
}

.doctor-actions {
    margin-top: auto;
    padding-top: 15px;
}

.doctor-actions .btn {
    width: 100%;
    min-height: 43px;
    border-radius: 11px;
    background: var(--home-primary);
    box-shadow: none;
}

/* Specialties and facilities */
.specialties-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.specialty-card {
    min-width: 0;
    min-height: 170px;
    justify-content: center;
    padding: 20px 12px;
    border: 1px solid #dce9ed;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(16,42,67,.06);
}

.specialty-card:hover {
    background: #fff;
    border-color: rgba(8,127,140,.32);
    box-shadow: 0 17px 35px rgba(16,42,67,.11);
}

.specialty-icon {
    width: 54px;
    height: 54px;
    background: #e9f8fa;
}

.specialty-name {
    color: var(--home-ink);
    font-size: 15px;
}

.specialty-count {
    color: var(--home-muted);
    text-align: center;
    line-height: 1.6;
}

.facility-section-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

.facility-card {
    padding: 20px !important;
    border: 1px solid #e0ebee;
    border-radius: 20px !important;
    box-shadow: 0 10px 32px rgba(16,42,67,.07) !important;
}

.facility-card-title {
    color: var(--home-ink);
    font-size: 16px !important;
}

.facility-card-logo {
    width: 58px !important;
    height: 58px !important;
    border: 1px solid #d8e8ec;
}

.facility-card-desc {
    color: #486581 !important;
    line-height: 1.8;
}

.article-link {
    color: var(--home-primary);
    font-weight: 700;
}

.articles-grid {
    gap: 18px;
}

.article-card {
    border: 1px solid #e0eaed;
    border-radius: 20px;
    box-shadow: 0 10px 32px rgba(16,42,67,.07);
}

.cta-doctor-banner {
    margin: 0;
    border-radius: 0;
    background: linear-gradient(125deg, #083e49, #087f8c);
}

.cta-doctor-inner {
    min-height: 220px;
}

.site-footer .container {
    width: calc(100% - 48px);
    max-width: 1540px;
}

/* Responsive */
@media (max-width: 1320px) {
    .featured-doctors-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .specialties-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .home-search-card .doctor-search-form {
        grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(130px, 1fr)) 140px;
    }
}

@media (max-width: 1050px) {
    .main-nav ul {
        gap: 12px;
    }

    .main-nav a {
        font-size: 12px;
    }

    .logo-text {
        display: none;
    }

    .home-search-card .doctor-search-form {
        grid-template-columns: 1fr 1fr;
        gap: 1px;
        overflow: visible;
        background: var(--home-line);
    }

    .home-search-card .search-field {
        border: 0;
    }

    .home-search-card .search-submit {
        grid-column: 1 / -1;
        background: #fff;
    }

    .facility-section-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    body .container,
    .site-footer .container {
        width: calc(100% - 32px);
    }

    .nav-container {
        min-height: 68px;
    }

    .logo-img {
        width: 48px;
        height: 48px;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
        order: 3;
        border-radius: 11px;
        background: var(--home-primary);
    }

    .main-nav {
        top: 68px;
        border-top: 1px solid var(--home-line);
        box-shadow: 0 18px 36px rgba(16,42,67,.12);
    }

    .main-nav a {
        padding: 11px 5px;
    }

    .main-nav a::after {
        display: none;
    }

    .auth-buttons {
        display: none;
    }

    .home-hero {
        min-height: auto;
        padding: 42px 0 45px;
        background-position: 20% center;
    }

    .home-hero::before {
        background:
            linear-gradient(180deg, rgba(240,250,252,.86), rgba(240,250,252,.94)),
            linear-gradient(90deg, rgba(230,247,250,.45), rgba(246,252,253,.84));
    }

    .home-hero-content {
        gap: 26px;
    }

    .home-hero h1 {
        font-size: clamp(31px, 8vw, 44px);
    }

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

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

@media (max-width: 640px) {
    body .container,
    .site-footer .container {
        width: calc(100% - 24px);
    }

    .home-hero {
        padding-top: 34px;
        background-position: 16% center;
    }

    .home-hero::before {
        background: linear-gradient(180deg, rgba(242,251,252,.88), rgba(242,251,252,.96));
    }

    .hero-eyebrow {
        margin-bottom: 12px;
    }

    .home-hero h1 {
        font-size: 32px;
    }

    .home-hero .hero-content > p {
        font-size: 14px;
        line-height: 1.75;
    }

    .hero-trust {
        gap: 9px 15px;
    }

    .home-search-card {
        padding: 9px;
        border-radius: 18px;
    }

    .search-type-tabs {
        padding-bottom: 9px;
    }

    .search-type-tab {
        padding-inline: 12px;
        font-size: 12px;
    }

    .home-search-card .doctor-search-form {
        grid-template-columns: 1fr;
        border-radius: 13px;
    }

    .home-search-card .search-field,
    .home-search-card .search-submit {
        grid-column: auto;
    }

    .home-search-card .search-field {
        padding: 10px 13px;
        border-bottom: 1px solid var(--home-line);
    }

    .quick-specialties {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-top: 10px;
        scrollbar-width: none;
    }

    .quick-specialties::-webkit-scrollbar {
        display: none;
    }

    .quick-specialties > * {
        flex: 0 0 auto;
    }

    .featured-doctors-section,
    .specialties-grid-section,
    .articles-section,
    .cta-doctor-banner {
        padding: 46px 0;
    }

    .featured-doctors-grid,
    .facility-section-cards,
    .articles-grid {
        grid-template-columns: 1fr !important;
    }

    .specialties-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .specialty-card {
        min-height: 150px;
        padding-inline: 8px;
    }

    .doctor-card {
        padding: 17px;
    }

    .doctor-summary {
        min-height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

