/*
Theme Name: Dr. Munawar Islam Pediatric Clinic
Theme URI: https://drmunawarislam.com
Author: Zohaib Ahmad
Description: Custom pediatric clinic theme for Dr. Ahmed Munawar Islam at Sehat Medical Complex, Lake City, Lahore. Built on the Pediatric Healthcare Warmth design system with Tailwind CSS.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: drmunawarislam
Tags: medical, clinic, pediatric, custom
*/

/* ── Scrollbar ─────────────────────────────────────────────── */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

/* ── Mobile menu (off-canvas drawer, slides left → right) ─────── */
#mobile-menu {
    position: fixed;
    top: 76px;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 340px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 60;
}
#mobile-menu.open { transform: translateX(0); }

@media screen and (min-width: 768px) {
    #mobile-menu { top: 122px; }
}

#mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    top: 76px;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 55;
}
#mobile-menu-backdrop.open { opacity: 1; pointer-events: auto; }

@media screen and (min-width: 768px) {
    #mobile-menu-backdrop { top: 122px; }
}

/* ── WordPress admin bar offset ─────────────────────────────── */
.admin-bar #site-header { top: 32px !important; }
@media screen and (max-width: 782px) {
    .admin-bar #site-header { top: 46px !important; }
}

/* ── FAQ accordion (CSS max-height approach — no display:none) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    transition:
        max-height    0.38s cubic-bezier(0.4, 0, 0.2, 1),
        opacity       0.28s ease,
        padding-bottom 0.28s ease,
        margin-top    0.28s ease;
}
.faq-answer.open {
    max-height: 600px;
    opacity: 1;
    padding-bottom: 1.25rem !important;
    margin-top: 0 !important;
}

/* ── Service card hover lift ──────────────────────────────── */
.service-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 95, 89, 0.13);
}
.service-card img {
    will-change: transform;
}

/* ── Testimonial card hover ──────────────────────────────── */
.testimonial-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 95, 89, 0.11);
}

/* ── Pillar card hover ──────────────────────────────────── */
.pillar-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.pillar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 95, 89, 0.1);
}

/* ── Review filter chips (hover must not fight the active/colored state) ── */
#reviewFilterChips .filter-btn:hover {
    color: #101e1f; /* on-surface */
}
#reviewFilterChips .filter-btn.active,
#reviewFilterChips .filter-btn.active:hover {
    color: #ffffff; /* on-primary — stays readable on the teal active background */
}

/* ── Focus styles ──────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #005f59;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Smooth scrolling ──────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* ── PageSpeed: content-visibility for below-fold sections ── */
main section:not(:first-child) {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* ── PageSpeed: image rendering optimisation ─────────────── */
img {
    image-rendering: auto;
    max-width: 100%;
    height: auto;
}

/* ── Review / star rating ─────────────────────────────── */
#ratingStars .star-select { cursor: pointer; }

/* ── Section badge helper ─────────────────────────────── */
.section-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* ── Hero stat card borders ───────────────────────────── */
.stat-divider {
    width: 1px;
    height: 2.5rem;
    background: rgba(62, 73, 71, 0.2);
    flex-shrink: 0;
}

/* ── Desktop nav underline animation ─────────────────── */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 14px;
    font-weight: 500;
    color: #3e4947;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: #005f59;
    border-radius: 9999px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover {
    color: #005f59;
}
.nav-link:hover::after {
    transform: scaleX(1);
}
.nav-link.is-active {
    color: #005f59;
    font-weight: 600;
}
.nav-link.is-active::after {
    transform: scaleX(1);
}
