/*
Theme Name: Medical Platform Egypt
Theme URI: https://jpg-egypt.com/
Author: Medical Platform Egypt
Description: Modern RTL medical directory theme for doctors, hospitals, labs, drugs, and articles.
Version: 2.5.2
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Text Domain: medical-platform
*/

:root {
    --mp-blue-900: #06245c;
    --mp-blue-800: #08357d;
    --mp-blue-700: #0b5fbf;
    --mp-blue-600: #0f73e8;
    --mp-blue-500: #2388ff;
    --mp-sky: #19a7ce;
    --mp-green: #10b981;
    --mp-purple: #7c3aed;
    --mp-amber: #f59e0b;
    --mp-red: #ef4444;
    --mp-ink: #08224f;
    --mp-text: #18345f;
    --mp-muted: #667895;
    --mp-soft: #f5f9ff;
    --mp-soft-2: #eef6ff;
    --mp-line: #dbe8f7;
    --mp-card: #ffffff;
    --mp-shadow: 0 18px 50px rgba(8, 34, 79, .09);
    --mp-shadow-soft: 0 10px 26px rgba(8, 34, 79, .07);
    --mp-radius: 18px;
    --mp-radius-sm: 12px;
    --mp-container: 1240px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    direction: rtl;
    color: var(--mp-text);
    background: #f8fbff;
    font-family: "Tajawal", "Cairo", Tahoma, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

a {
    color: var(--mp-blue-700);
    text-decoration: none;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

a:hover {
    color: var(--mp-blue-900);
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(var(--mp-container), calc(100% - 40px));
    margin-inline: auto;
}

.site-content,
.main-content {
    min-width: 0;
}

.no-sidebar {
    display: block;
}

/* Header */
.mp-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(219, 232, 247, .9);
    backdrop-filter: blur(14px);
}

.mp-header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.mp-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
    color: var(--mp-ink);
}

.mp-brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--mp-blue-600);
}

.mp-brand-mark svg {
    width: 46px;
    height: 46px;
}

.mp-brand-text {
    display: grid;
    gap: 1px;
}

.mp-brand-text strong {
    color: var(--mp-ink);
    font-size: 1.34rem;
    font-weight: 900;
    line-height: 1.2;
}

.mp-brand-text small {
    max-width: 260px;
    color: var(--mp-muted);
    font-size: .78rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-nav {
    flex: 1;
}

.mp-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mp-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 82px;
    padding: 0 15px;
    color: var(--mp-ink);
    font-weight: 800;
    font-size: .95rem;
}

.mp-nav a::after {
    content: "";
    position: absolute;
    right: 16px;
    left: 16px;
    bottom: 0;
    height: 4px;
    border-radius: 999px 999px 0 0;
    background: var(--mp-blue-600);
    opacity: 0;
    transform: scaleX(.5);
    transition: opacity .18s ease, transform .18s ease;
}

.mp-nav a:hover::after,
.mp-nav .current-menu-item > a::after,
.mp-nav .current_page_item > a::after {
    opacity: 1;
    transform: scaleX(1);
}

.hamburger,
.mp-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--mp-line);
    border-radius: 50%;
    background: #fff;
    color: var(--mp-ink);
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 999px;
}

/* Home */
.hero-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 74px 0 58px;
    background:
        radial-gradient(circle at 14% 20%, rgba(25, 167, 206, .12), transparent 28%),
        linear-gradient(100deg, #fff 0%, #f4faff 50%, #dff5fb 100%);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(11, 95, 191, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 95, 191, .045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
    align-items: center;
    gap: 42px;
}

.hero-content {
    min-width: 0;
}

.hero-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--mp-blue-800);
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(170, 197, 232, .75);
    font-size: .85rem;
    font-weight: 800;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--mp-green);
}

.hero-title {
    margin: 18px 0 12px;
    max-width: 760px;
    color: var(--mp-ink);
    font-size: clamp(2.05rem, 5vw, 4.6rem);
    line-height: 1.22;
    font-weight: 900;
    letter-spacing: 0;
}

.hero-title em {
    color: var(--mp-blue-700);
    font-style: normal;
}

.hero-desc {
    max-width: 680px;
    margin: 0 0 28px;
    color: var(--mp-text);
    font-size: 1.08rem;
    line-height: 1.9;
}

.hero-search-box,
.archive-search-shell {
    width: min(100%, 690px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(186, 207, 233, .9);
    box-shadow: var(--mp-shadow-soft);
}

.hero-search-box input,
.archive-search-shell input {
    min-width: 0;
    flex: 1;
    height: 52px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--mp-ink);
    padding: 0 15px;
}

.hero-search-box button,
.archive-search-shell button,
.btn,
.btn-filter,
.btn-reset,
.card-link,
.entity-action,
.section-more-link,
.card-read-more {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--mp-blue-600);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.hero-search-box button:hover,
.archive-search-shell button:hover,
.btn:hover,
.btn-filter:hover,
.card-link:hover,
.entity-action:hover,
.section-more-link:hover,
.card-read-more:hover {
    color: #fff;
    background: var(--mp-blue-800);
    transform: translateY(-1px);
}

.btn-reset,
.entity-action.secondary,
.entity-action.neutral {
    color: var(--mp-blue-700);
    background: #fff;
    border-color: var(--mp-line);
}

.btn-reset:hover,
.entity-action.secondary:hover,
.entity-action.neutral:hover {
    color: var(--mp-blue-900);
    background: var(--mp-soft);
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(186, 207, 233, .8);
    color: var(--mp-text);
    font-size: .84rem;
    font-weight: 800;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-visual-card {
    position: relative;
    width: min(100%, 390px);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    border-radius: 38px;
    background:
        radial-gradient(circle at 75% 18%, rgba(25, 167, 206, .22), transparent 30%),
        radial-gradient(circle at 25% 78%, rgba(11, 95, 191, .18), transparent 34%),
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(234,243,255,.78));
    border: 1px solid rgba(170, 197, 232, .55);
    box-shadow: 0 26px 70px rgba(8, 34, 79, .14);
    overflow: hidden;
}

.hero-visual-card::before {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    border: 28px solid rgba(11, 95, 191, .07);
}

.hero-doctor-mark {
    position: relative;
    z-index: 1;
    width: 72%;
    filter: drop-shadow(0 16px 28px rgba(11, 95, 191, .16));
}

.hero-pulse {
    position: absolute;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(11, 95, 191, .14);
}

.hero-pulse::before,
.hero-pulse::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 5px;
    border-radius: 999px;
    background: var(--mp-blue-600);
    transform: translate(-50%, -50%);
}

.hero-pulse::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.hero-pulse--one {
    top: 26px;
    right: 34px;
}

.hero-pulse--two {
    left: 34px;
    bottom: 36px;
    transform: scale(.82);
}

.stats-bar {
    margin-top: -28px;
    position: relative;
    z-index: 2;
}

.stats-inner {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--mp-line);
    border-radius: 18px;
    box-shadow: var(--mp-shadow);
    overflow: hidden;
}

.stat-item {
    padding: 22px 18px;
    text-align: center;
    border-inline-start: 1px solid var(--mp-line);
}

.stat-item:first-child {
    border-inline-start: 0;
}

.stat-num {
    color: var(--mp-blue-800);
    direction: ltr;
    font-size: 1.35rem;
    font-weight: 900;
}

.stat-label {
    color: var(--mp-muted);
    font-size: .88rem;
    font-weight: 700;
}

.section {
    padding: 64px 0;
}

.section-white {
    background: #fff;
}

.section-gray,
.directory-showcase-section:nth-of-type(even) {
    background: var(--mp-soft);
}

.section-header {
    margin-bottom: 28px;
    text-align: center;
}

.section-header-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    text-align: start;
}

.section-eyebrow {
    display: inline-flex;
    margin-bottom: 7px;
    color: var(--mp-blue-700);
    font-size: .86rem;
    font-weight: 900;
}

.section-title {
    margin: 0;
    color: var(--mp-ink);
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1.35;
    font-weight: 900;
}

.section-title span {
    color: var(--mp-blue-700);
}

.section-subtitle {
    max-width: 720px;
    margin: 10px auto 0;
    color: var(--mp-muted);
}

.section-header-row .section-subtitle {
    margin-inline: 0;
}

.cat-grid,
.trust-grid,
.cards-grid,
.directory-showcase-grid,
.hospital-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

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

.cat-card,
.trust-card,
.legal-page-card,
.card,
.directory-result-card,
.doctor-result-card,
.hospital-card,
.entity-card,
.entity-side-card {
    min-width: 0;
    background: var(--mp-card);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow-soft);
}

.cat-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    color: var(--mp-text);
    min-height: 190px;
}

.cat-icon,
.trust-icon,
.lpc-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--card-bg, #eaf3ff);
    color: var(--card-color, var(--mp-blue-700));
}

.cat-icon svg,
.trust-icon svg,
.lpc-icon svg {
    width: 25px;
    height: 25px;
}

.cat-title,
.lpc-title {
    color: var(--mp-ink);
    font-size: 1rem;
    font-weight: 900;
}

.cat-desc,
.lpc-desc,
.trust-card p {
    color: var(--mp-muted);
    font-size: .88rem;
    line-height: 1.75;
}

.cat-link {
    margin-top: auto;
    color: var(--mp-blue-700);
    font-weight: 900;
    font-size: .86rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.spec-item {
    min-height: 82px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 13px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--mp-line);
    box-shadow: var(--mp-shadow-soft);
    color: var(--mp-text);
    font-weight: 900;
    text-align: center;
}

.spec-item svg {
    width: 24px;
    height: 24px;
    color: var(--mp-blue-600);
}

/* Archive */
.archive-page-container,
.entity-page {
    padding: 36px 0 70px;
}

.mp-archive-heading,
.archive-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    margin: 22px 0 24px;
}

.post-title,
.mp-archive-heading h1,
.archive-hero h1,
.entity-title {
    margin: 0;
    color: var(--mp-ink);
    font-size: clamp(1.85rem, 4vw, 3.25rem);
    line-height: 1.28;
    font-weight: 900;
}

.mp-archive-heading p,
.archive-hero p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--mp-muted);
}

.mp-archive-count,
.results-count {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--mp-blue-800);
    background: #eaf3ff;
    border: 1px solid #cde1fb;
    font-weight: 900;
}

.archive-filters {
    margin: 0 0 24px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--mp-line);
    border-radius: 18px;
    box-shadow: var(--mp-shadow-soft);
}

.archive-filters h2 {
    margin: 0 0 14px;
    color: var(--mp-ink);
    font-size: 1.08rem;
    font-weight: 900;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto;
    gap: 12px;
    align-items: end;
}

.filter-group {
    min-width: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--mp-ink);
    font-size: .84rem;
    font-weight: 900;
}

.filter-group input,
.filter-group select,
.archive-filters input,
.archive-filters select {
    width: 100%;
    min-width: 0;
    height: 48px;
    border: 1px solid var(--mp-line);
    border-radius: 12px;
    background: #fff;
    color: var(--mp-text);
    padding: 0 12px;
    outline: 0;
}

.results-wrapper {
    position: relative;
}

.loading-overlay {
    display: none;
}

.no-results {
    padding: 36px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--mp-line);
    text-align: center;
}

.pagination,
.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.pagination a,
.pagination span,
.nav-links a,
.nav-links span {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--mp-line);
    color: var(--mp-ink);
    font-weight: 900;
}

.pagination .current,
.nav-links .current {
    background: var(--mp-blue-600);
    color: #fff;
    border-color: var(--mp-blue-600);
}

/* Cards */
.directory-result-card,
.card {
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.directory-result-card:hover,
.card:hover,
.cat-card:hover,
.spec-item:hover {
    transform: translateY(-3px);
    border-color: #b7d6ff;
    box-shadow: var(--mp-shadow);
}

.directory-result-card .card-body,
.card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.result-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.result-card-title {
    min-width: 0;
}

.result-card-title h3,
.card h3 {
    margin: 7px 0 0;
    color: var(--mp-ink);
    font-size: 1.02rem;
    line-height: 1.55;
    font-weight: 900;
}

.result-card-title h3 a,
.card h3 a {
    color: inherit;
}

.entity-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--mp-line);
    overflow: hidden;
}

.entity-avatar svg {
    width: 70%;
    height: 70%;
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.entity-avatar-initial {
    display: none;
}

.entity-avatar--doctor,
.directory-result-card--doctor .entity-avatar {
    color: var(--mp-blue-700);
    background: linear-gradient(145deg, #eaf3ff, #fff);
}

.entity-avatar--hospital,
.directory-result-card--hospital .entity-avatar {
    color: #0369a1;
    background: linear-gradient(145deg, #e0f2fe, #fff);
}

.entity-avatar--lab,
.directory-result-card--lab .entity-avatar {
    color: #0891b2;
    background: linear-gradient(145deg, #cffafe, #fff);
}

.entity-avatar--drug,
.directory-result-card--drug .entity-avatar {
    color: #7c3aed;
    background: linear-gradient(145deg, #ede9fe, #fff);
}

.card-type-badge,
.directory-card-badge,
.card-badge,
.entity-badge {
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--mp-blue-700);
    background: #eaf3ff;
    font-size: .76rem;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.directory-result-card--hospital .card-type-badge { color: #0369a1; background: #e0f2fe; }
.directory-result-card--lab .card-type-badge { color: #0891b2; background: #cffafe; }
.directory-result-card--drug .card-type-badge { color: #7c3aed; background: #ede9fe; }

.card-meta {
    display: grid;
    gap: 7px;
    color: var(--mp-muted);
    font-size: .84rem;
}

.card-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.card-link {
    margin-top: auto;
    align-self: flex-start;
    min-height: 38px;
    padding: 8px 13px;
    font-size: .84rem;
}

.card-thumb,
.card-thumbnail {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--mp-soft);
}

.card-thumb img,
.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-excerpt {
    color: var(--mp-muted);
    font-size: .9rem;
}

/* Entity single pages */
.entity-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.entity-main,
.entity-side {
    min-width: 0;
}

.entity-side {
    position: sticky;
    top: 104px;
}

.entity-hero {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 10% 16%, rgba(25, 167, 206, .16), transparent 30%),
        linear-gradient(135deg, #fff, #ecf6ff);
    border: 1px solid var(--mp-line);
    box-shadow: var(--mp-shadow);
}

.entity-hero::after {
    content: "";
    position: absolute;
    left: 28px;
    top: 28px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 18px solid rgba(11, 95, 191, .06);
}

.entity-kicker {
    color: var(--mp-blue-700);
    font-size: .86rem;
    font-weight: 900;
}

.entity-subtitle {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--mp-muted);
}

.entity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.entity-badge.green {
    color: #047857;
    background: #d1fae5;
}

.entity-badge.amber {
    color: #92400e;
    background: #fef3c7;
}

.entity-card {
    margin-top: 18px;
    padding: 22px;
}

.entity-card-title,
.entity-side-title {
    margin: 0 0 16px;
    color: var(--mp-ink);
    font-size: 1.24rem;
    font-weight: 900;
}

.entity-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.entity-field {
    min-width: 0;
    padding: 14px;
    border-radius: 14px;
    background: var(--mp-soft);
    border: 1px solid #e5eefb;
}

.entity-field-label {
    display: block;
    color: var(--mp-muted);
    font-size: .78rem;
    font-weight: 800;
}

.entity-field-value {
    display: block;
    margin-top: 4px;
    color: var(--mp-ink);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.entity-content p {
    margin: 0 0 12px;
}

.entity-faq {
    display: grid;
    gap: 12px;
}

.entity-faq-item {
    padding: 14px;
    border-radius: 14px;
    background: var(--mp-soft);
    border: 1px solid #e5eefb;
}

.entity-faq-item h3 {
    margin: 0 0 6px;
    color: var(--mp-ink);
    font-size: 1rem;
}

.entity-faq-item p {
    margin: 0;
    color: var(--mp-muted);
}

.entity-note {
    color: var(--mp-muted);
    background: #fffaf0;
    border-color: #fdecc8;
}

.entity-side-card {
    padding: 20px;
}

.entity-action {
    width: 100%;
    margin-top: 9px;
}

.entity-address {
    margin: 14px 0 0;
    color: var(--mp-muted);
}

.internal-link-group {
    margin-top: 14px;
}

.internal-link-group h3 {
    margin: 0 0 8px;
    color: var(--mp-ink);
    font-size: 1rem;
}

.internal-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.internal-link-list a {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--mp-soft);
    border: 1px solid var(--mp-line);
    color: var(--mp-text);
    font-size: .84rem;
    font-weight: 800;
}

.map-embed,
.entity-map {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--mp-line);
}

/* Footer */
.mp-footer {
    background: #fff;
    border-top: 1px solid var(--mp-line);
    padding: 46px 0 24px;
}

.mp-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.mp-footer h3 {
    margin: 0 0 12px;
    color: var(--mp-ink);
    font-size: 1rem;
    font-weight: 900;
}

.mp-footer p,
.mp-footer li {
    color: var(--mp-muted);
    font-size: .9rem;
}

.mp-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 7px;
}

.mp-footer-note {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--mp-line);
    color: var(--mp-muted);
    font-size: .84rem;
    text-align: center;
}

/* WordPress basics */
.page-hero {
    padding: 44px 0;
    background: linear-gradient(135deg, #fff, var(--mp-soft-2));
    border-bottom: 1px solid var(--mp-line);
}

.page-content,
.post-content,
.entry-content {
    max-width: 900px;
    margin: 30px auto;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--mp-line);
    border-radius: 18px;
    box-shadow: var(--mp-shadow-soft);
}

.breadcrumb,
.breadcrumbs {
    margin: 18px 0;
    color: var(--mp-muted);
    font-size: .86rem;
}

.ad-slot {
    margin: 22px 0;
}

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

    .cards-grid,
    .directory-showcase-grid,
    .hospital-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 900px) {
    .container {
        width: min(100% - 28px, var(--mp-container));
    }

    .mp-header-inner {
        min-height: 70px;
    }

    .mp-nav {
        position: absolute;
        top: 100%;
        right: 14px;
        left: 14px;
        display: none;
        padding: 12px;
        background: #fff;
        border: 1px solid var(--mp-line);
        border-radius: 16px;
        box-shadow: var(--mp-shadow);
    }

    .mp-nav.is-open,
    body.nav-open .mp-nav {
        display: block;
    }

    .mp-nav ul {
        display: grid;
        gap: 4px;
    }

    .mp-nav a {
        min-height: 44px;
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
    }

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

    .hamburger,
    .mp-menu-button {
        display: block;
    }

    .hero-layout,
    .entity-shell {
        grid-template-columns: 1fr;
    }

    .hero-visual-card {
        width: min(100%, 300px);
        border-radius: 28px;
    }

    .entity-side {
        position: static;
    }

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

    .cat-grid,
    .spec-grid,
    .cards-grid,
    .directory-showcase-grid,
    .hospital-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-header-row,
    .mp-archive-heading,
    .archive-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

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

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

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .container {
        width: min(100% - 22px, var(--mp-container));
    }

    .mp-brand {
        min-width: 0;
    }

    .mp-brand-text small {
        display: none;
    }

    .hero-section {
        padding: 42px 0 38px;
    }

    .hero-visual {
        display: none;
    }

    .hero-badge {
        max-width: 100%;
        white-space: normal;
    }

    .hero-search-box,
    .archive-search-shell {
        display: grid;
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .hero-search-box button,
    .archive-search-shell button {
        width: 100%;
    }

    .stats-inner,
    .cat-grid,
    .spec-grid,
    .cards-grid,
    .directory-showcase-grid,
    .hospital-cards-grid,
    .filters-row,
    .entity-summary,
    .mp-footer-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 42px 0;
    }

    .archive-filters,
    .entity-hero,
    .entity-card,
    .entity-side-card,
    .page-content,
    .post-content,
    .entry-content {
        padding: 18px;
        border-radius: 16px;
    }

    .result-card-head {
        gap: 11px;
    }

    .entity-avatar {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    .card-type-badge {
        white-space: normal;
    }
}

@media (max-width: 380px) {
    .container {
        width: calc(100% - 18px);
    }

    .mp-brand-text strong {
        font-size: 1rem;
    }

    .hero-title,
    .post-title,
    .entity-title {
        font-size: 1.72rem;
    }

    .directory-result-card .card-body,
    .card .card-body {
        padding: 14px;
    }
}
