/*
Theme Name: Tiba Care
Theme URI: https://example.com/tiba-care
Author: Custom WordPress Development
Description: Arabic RTL custom medical center theme for Tiba Care.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: tiba-care
*/

:root {
    --orange: #f58220;
    --orange-dark: #d96610;
    --green: #16a36a;
    --green-dark: #0d7a4f;
    --white: #ffffff;
    --gray-50: #f7faf9;
    --gray-100: #edf3f1;
    --gray-200: #dbe6e3;
    --gray-600: #5b6d68;
    --gray-800: #21312d;
    --shadow: 0 18px 42px rgba(21, 54, 45, .12);
    --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Cairo", "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.8;
    text-align: right;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.25rem, 6vw, 4.8rem); line-height: 1.15; margin-bottom: 1rem; }
h2 { font-size: clamp(1.7rem, 3vw, 2.7rem); line-height: 1.25; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; line-height: 1.35; }
p { color: var(--gray-600); }

.container {
    width: min(100% - 32px, 1180px);
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 8px;
    right: 8px;
    transform: translateY(-140%);
    background: var(--green-dark);
    color: white;
    padding: 8px 12px;
    z-index: 200;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(219,230,227,.75);
}
.header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.site-brand img { width: 168px; max-height: 62px; object-fit: contain; }
.brand-fallback { display: inline-flex; align-items: center; }
.primary-nav { margin-inline-start: auto; }
.menu,
.footer-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 18px;
}
.menu a {
    display: inline-flex;
    padding: 10px 0;
    color: var(--gray-800);
    font-weight: 700;
}
.menu a:hover { color: var(--green); }
.header-call {
    display: grid;
    gap: 0;
    min-width: 142px;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--green-dark);
    background: #eaf8f2;
    font-weight: 800;
    line-height: 1.35;
}
.header-call span { font-size: .78rem; color: var(--gray-600); }
.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    padding: 8px;
    color: var(--gray-800);
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    margin: 5px 0;
}
.menu-toggle strong { position: absolute; opacity: 0; pointer-events: none; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer;
    transition: .2s ease;
}
.btn-primary {
    background: var(--orange);
    color: white;
    box-shadow: 0 12px 24px rgba(245,130,32,.24);
}
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-secondary {
    background: white;
    color: var(--green-dark);
    border-color: var(--gray-200);
}

.hero-section {
    background:
        radial-gradient(circle at 15% 20%, rgba(245,130,32,.13), transparent 28%),
        linear-gradient(135deg, #f8fffc 0%, #eef8f4 54%, #fff8f0 100%);
    padding: 76px 0 44px;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 48px;
}
.section-kicker {
    display: inline-flex;
    color: var(--green);
    font-weight: 800;
    margin-bottom: 10px;
}
.hero-copy p {
    font-size: 1.2rem;
    max-width: 620px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-panel {
    min-height: 420px;
    position: relative;
    display: grid;
    place-items: center;
}
.doctor-visual {
    width: min(100%, 430px);
    aspect-ratio: 1;
    border-radius: 42px;
    background:
        linear-gradient(145deg, rgba(22,163,106,.92), rgba(13,122,79,.92)),
        url("assets/images/medical-pattern.svg");
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.visual-circle {
    position: absolute;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    left: 38px;
    top: 42px;
}
.visual-badge,
.medical-card {
    position: absolute;
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 16px 20px;
    font-weight: 800;
}
.visual-badge { left: 0; bottom: 48px; color: var(--orange-dark); }
.medical-card { right: 0; top: 48px; z-index: 2; display: grid; }
.medical-card span { color: var(--gray-600); font-size: .9rem; }
.medical-card strong { color: var(--green-dark); }

.stats-section { margin-top: -24px; position: relative; z-index: 4; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}
.stats-grid div {
    padding: 18px;
    background: var(--gray-50);
    border-radius: 16px;
    display: grid;
}
.stats-grid strong { color: var(--green-dark); font-size: 1.7rem; line-height: 1.2; }
.stats-grid span { color: var(--gray-600); font-weight: 700; }

.section { padding: 76px 0; }
.muted { background: var(--gray-50); }
.two-col,
.booking-layout,
.contact-grid,
.single-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 42px;
    align-items: start;
}
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.section-head a,
.read-more,
.clinic-link {
    color: var(--green-dark);
    font-weight: 800;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(21,54,45,.07);
    transition: .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-link { display: block; height: 100%; padding: 22px; }
.icon-badge {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border-radius: 16px;
    background: #fff3e7;
    color: var(--orange-dark);
    font-size: 1.55rem;
    margin-bottom: 14px;
}
.clinic-card p,
.doctor-card p,
.partner-card p { min-height: 58px; }
.doctor-photo,
.doctor-photo-large {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f7f1, #fff3e7);
    color: var(--green-dark);
    font-weight: 900;
}
.doctor-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin-bottom: 16px;
}
.doctor-photo span { font-size: 2.2rem; }
.doctor-card small,
.partner-card small {
    color: var(--orange-dark);
    font-weight: 800;
}
.partner-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.partner-card { padding: 26px; }
.partner-logo {
    min-height: 74px;
    display: flex;
    align-items: center;
    color: var(--green-dark);
    font-weight: 900;
    font-size: 1.4rem;
}

.booking-section {
    background: linear-gradient(135deg, var(--green-dark), var(--green));
    color: white;
}
.booking-section p,
.booking-section .section-kicker { color: rgba(255,255,255,.82); }
.booking-card {
    background: white;
    color: var(--gray-800);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.booking-card.narrow { max-width: 880px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
label {
    display: grid;
    gap: 7px;
    color: var(--gray-800);
    font-weight: 800;
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    color: var(--gray-800);
    background: white;
}
input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(22,163,106,.16);
    border-color: var(--green);
}
.form-wide { grid-column: 1 / -1; }
.booking-form .btn { margin-top: 18px; width: 100%; border: 0; }
.success-message {
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.28);
    padding: 14px 18px;
    border-radius: 14px;
    color: white;
    font-weight: 800;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    gap: 10px;
}
.check-list li {
    position: relative;
    padding-inline-start: 30px;
    color: var(--gray-600);
    font-weight: 700;
}
.check-list li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: .55em;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: inset 0 0 0 5px #dff5ec;
}
.feature-grid,
.doctor-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.feature-grid div,
.soft-panel {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: 0 12px 28px rgba(21,54,45,.06);
}
.feature-grid strong,
.feature-grid span { display: block; }
.feature-grid strong { font-size: 1.2rem; margin-bottom: 8px; }
.feature-grid span { color: var(--gray-600); }

.map-box {
    min-height: 280px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--gray-100);
    display: grid;
    place-items: center;
    color: var(--gray-600);
}
.map-box iframe { width: 100%; height: 100%; border: 0; }
.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.contact-list.large { font-size: 1.1rem; font-weight: 800; }

.page-hero,
.single-hero {
    background: linear-gradient(135deg, #f8fffc, #fff7ef);
    padding: 64px 0;
}
.page-hero p { max-width: 640px; }
.breadcrumbs {
    width: min(100% - 32px, 1180px);
    margin: 18px auto 0;
    color: var(--gray-600);
    font-size: .92rem;
}
.breadcrumbs a { color: var(--green-dark); font-weight: 800; }
.breadcrumbs span { margin-inline: 6px; }
.archive-filter { margin-bottom: 24px; }
.archive-filter input { max-width: 420px; }
.single-image,
.image-placeholder {
    min-height: 330px;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, #eaf8f2, #fff3e7);
}
.single-image img { width: 100%; height: 100%; object-fit: cover; }
.image-placeholder { display: grid; place-items: center; color: var(--green-dark); font-weight: 900; font-size: 2rem; }
.doctor-profile {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: center;
}
.doctor-photo-large {
    width: 240px;
    height: 240px;
    border-radius: 34px;
}
.doctor-photo-large span { font-size: 4rem; }
.doctor-specialty { font-size: 1.2rem; font-weight: 800; color: var(--gray-800); }
.mini-stat {
    margin-top: 18px;
    display: inline-grid;
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--gray-50);
}
.mini-stat strong { color: var(--orange-dark); font-size: 1.8rem; }

.site-footer {
    background: #10231e;
    color: white;
    padding-top: 56px;
}
.site-footer p,
.site-footer a,
.site-footer li { color: rgba(255,255,255,.76); }
.site-footer h2 { font-size: 1.1rem; color: white; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr .8fr 1fr;
    gap: 34px;
}
.footer-menu { display: grid; gap: 8px; }
.footer-bottom {
    margin-top: 42px;
    padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.7);
}
.whatsapp-float {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 90;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #25d366;
    color: white;
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(37,211,102,.35);
    font-size: .85rem;
}

.pagination-wrap { margin-top: 28px; }
.nav-links { display: flex; gap: 8px; justify-content: center; }
.page-numbers {
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: white;
    border: 1px solid var(--gray-200);
    font-weight: 800;
}
.page-numbers.current { background: var(--green); color: white; }

@media (max-width: 980px) {
    .header-inner { min-height: 72px; }
    .menu-toggle { display: block; margin-inline-start: auto; }
    .primary-nav {
        position: fixed;
        top: 72px;
        right: 0;
        left: 0;
        background: white;
        border-bottom: 1px solid var(--gray-200);
        padding: 18px;
        transform: translateY(-130%);
        opacity: 0;
        pointer-events: none;
        transition: .2s ease;
    }
    .primary-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .menu { display: grid; gap: 4px; }
    .header-call { display: none; }
    .hero-grid,
    .two-col,
    .booking-layout,
    .contact-grid,
    .single-grid { grid-template-columns: 1fr; }
    .hero-panel { min-height: 320px; }
    .stats-grid,
    .cards-grid,
    .feature-grid,
    .doctor-details-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 24px, 1180px); }
    .section { padding: 54px 0; }
    .hero-section { padding: 52px 0 34px; }
    .hero-actions .btn { width: 100%; }
    .stats-grid,
    .cards-grid,
    .partner-grid,
    .feature-grid,
    .doctor-details-grid,
    .form-grid,
    .doctor-profile { grid-template-columns: 1fr; }
    .section-head { display: grid; align-items: start; }
    .booking-card { padding: 20px; }
    .doctor-photo-large { width: 180px; height: 180px; }
    .whatsapp-float { width: 58px; height: 58px; font-size: .78rem; }
}

