/* ============================================
   DYNAMIC BALANCE PHYSIOTHERAPY
   Design System & Core Styles
   ============================================ */

:root {
    /* Colors */
    --primary: #0B2E4F;
    --primary-dark: #081F36;
    --primary-light: #E5F5F0;
    --secondary: #0E80C9;
    --secondary-light: #EAF1F6;
    --accent: #FC7A00;
    --accent-dark: #E1600A;
    --text: #2D3748;
    --text-light: #4A5568;
    --white: #FFFFFF;
    --gray-50: #F5F7FA;
    --gray-100: #EDF2F7;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E0;
    --success: #059669;
    --warning: #D97706;
    --danger: #DC2626;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50px;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { text-decoration: none; color: var(--secondary); transition: var(--transition); }
a:hover { color: var(--accent); }

ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

p { margin-bottom: var(--spacing-sm); }

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition);
    text-align: center;
    line-height: 1.2;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(252, 122, 0, 0.3);
}

.btn-primary:hover {
    background: var(--accent-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 122, 0, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(14, 128, 201, 0.3);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: var(--white);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
}

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--primary);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar p { margin: 0; }

.top-bar a { color: var(--white); }
.top-bar a:hover { color: var(--accent); }

.top-bar-close {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
}

/* ===== HEADER ===== */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    padding: 15px 0;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo img {
    max-height: 60px;
    width: auto;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-links .call-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.header-links .call-link:hover { color: var(--accent); }

/* ===== NAVIGATION ===== */
.main-nav {
    background: var(--white);
    border-top: 1px solid var(--gray-100);
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 5px;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 15px 18px;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-menu > li > a:hover {
    color: var(--accent);
}

.nav-menu > li.has-dropdown > a::after {
    content: '▾';
    margin-left: 5px;
    font-size: 0.8rem;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    min-width: 250px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.nav-menu > li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    font-size: 0.9rem;
}

.dropdown li a:hover {
    background: var(--gray-50);
    color: var(--accent);
}

.dropdown.wide {
    min-width: 600px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 15px;
}

.dropdown.wide li a {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #0E5A8A 100%);
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 128, 201, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-ctas {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ===== SECTIONS ===== */
.section {
    padding: var(--spacing-xl) 0;
}

.section-alt {
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===== BODY MAP ===== */
.body-map-section {
    background: var(--primary-light);
    padding: var(--spacing-xl) 0;
}

.body-map-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.body-map-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.body-map-container svg {
    width: 100%;
    height: auto;
}

.body-part {
    cursor: pointer;
    transition: filter 0.25s ease, transform 0.25s ease;
    transform-box: fill-box;
    transform-origin: center;
}

/* Clinical blue highlight on hover/active (WebMD style, keeps depth) */
.body-part:hover,
.body-part.hovered {
    fill: url(#bmBodyActive);
    filter: brightness(1.08) drop-shadow(0 0 5px rgba(74, 144, 217, 0.6));
}

.body-part.active {
    fill: url(#bmBodyActive);
    filter: brightness(1.05) drop-shadow(0 0 8px rgba(74, 144, 217, 0.7));
}

/* Pulsing hotspot markers (clinical blue, WebMD style) */
.hotspot-core {
    fill: #FFFFFF;
    stroke: #4A90D9;
    stroke-width: 2;
}

.hotspot-halo {
    fill: #4A90D9;
    opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
    .hotspot-halo { display: none; }
}

/* Hover tooltip showing body part name */
.bm-tooltip {
    position: absolute;
    display: none;
    background: var(--primary);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    white-space: nowrap;
    z-index: 50;
}

.bm-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 18px;
    border: 5px solid transparent;
    border-top-color: var(--primary);
}

.body-map-info {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    /* Offset for sticky header when scrolled into view on mobile */
    scroll-margin-top: 90px;
}

.body-map-info h3 {
    margin-bottom: 15px;
}

.body-map-info .condition-list {
    margin-bottom: 20px;
}

.body-map-info .condition-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
}

.body-map-info .condition-list li:last-child {
    border-bottom: none;
}

.body-map-info .condition-list li::before {
    content: '→';
    color: var(--accent);
    font-weight: bold;
}

/* ===== SERVICES GRID ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.service-card .service-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.service-card .service-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== NICHES ===== */
.niches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.niche-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.niche-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.niche-card .niche-header {
    padding: 25px 25px 15px;
    background: var(--primary-light);
}

.niche-card .niche-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.niche-card .niche-body {
    padding: 20px 25px 25px;
}

.niche-card .niche-body p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== WHY CHOOSE US ===== */
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.why-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.why-card .why-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.why-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.why-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== TESTIMONIALS ===== */
.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slide {
    display: none;
    text-align: center;
    padding: 30px;
}

.testimonial-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.testimonial-slide .testimonial-stars {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.testimonial-slide blockquote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.6;
}

.testimonial-slide .testimonial-author {
    font-weight: 600;
    color: var(--primary);
}

.testimonial-slide .testimonial-location {
    color: var(--text-light);
    font-size: 0.9rem;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
    cursor: pointer;
    transition: var(--transition);
}

.testimonial-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== FAQ ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent);
    transition: var(--transition);
}

.faq-item.open .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 25px 20px;
}

/* ===== CTA BANNER ===== */
.cta-banner {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.cta-banner h2 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 15px;
}

.cta-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.cta-banner .btn-white {
    margin: 0 10px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}

.footer h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    padding: 5px 0;
    font-size: 0.9rem;
}

.footer a:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
}

.footer-social a:hover {
    background: var(--accent);
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    display: inline;
    padding: 0 5px;
}

.team-card h3 a { color: inherit; text-decoration: none; transition: color 0.25s ease; }
.team-card h3 a:hover { color: var(--accent); }

/* ===== STICKY MOBILE BAR ===== */
.mobile-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 10px 15px;
}

.mobile-sticky-bar .container {
    display: flex;
    gap: 10px;
}

.mobile-sticky-bar .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.9rem;
}

/* ===== CHAT WIDGET ===== */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle:hover {
    transform: scale(1.1);
    background: var(--accent-dark);
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-window.open {
    display: flex;
}

.chat-header {
    background: var(--primary);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    color: var(--white);
    font-size: 1rem;
    margin: 0;
}

.chat-header .chat-minimize {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 350px;
}

.chat-message {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    max-width: 85%;
    font-size: 0.9rem;
}

.chat-message.bot {
    background: var(--gray-50);
    color: var(--text);
    align-self: flex-start;
}

.chat-message.user {
    background: var(--secondary);
    color: var(--white);
    margin-left: auto;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--secondary);
}

.chat-input-area button {
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .niches-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .body-map-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    
    .hamburger { display: flex; }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        padding: 20px;
    }
    
    .nav-menu.open { display: flex; }
    
    .nav-menu > li > a { padding: 12px 0; }
    
    .dropdown, .dropdown.wide {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        min-width: auto;
        display: block;
        padding: 0 0 0 15px;
    }
    
    .header-links .btn { display: none; }
    
    .services-grid { grid-template-columns: 1fr; }
    .niches-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    
    .mobile-sticky-bar { display: block; }
    
    .hero { padding: 50px 0; }
    .hero h1 { font-size: 1.8rem; }
    
    .chat-window {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
    
    .section { padding: var(--spacing-lg) 0; }
}

@media (max-width: 480px) {
    .hero-ctas { flex-direction: column; }
    .hero-ctas .btn { width: 100%; }
    .cta-banner .btn { display: block; margin: 10px auto; width: 80%; }
}

/* ============================================
   UX & RESPONSIVENESS ENHANCEMENTS v2
   Fluid type · Touch targets · A11y · Motion
   ============================================ */

/* --- Fluid Typography (scales smoothly 360px → 1400px) --- */
:root {
    --fs-h1: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
    --fs-h2: clamp(1.4rem, 1.1rem + 1.5vw, 2.2rem);
    --fs-h3: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
    --fs-body: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
    --fs-small: clamp(0.84rem, 0.82rem + 0.14vw, 0.92rem);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
body { font-size: var(--fs-body); }

.hero h1 { font-size: var(--fs-h1); }
.hero p { font-size: clamp(1rem, 0.95rem + 0.5vw, 1.2rem); }
.section-header h2 { font-size: var(--fs-h2); }
.cta-banner h2 { font-size: var(--fs-h2); }

/* --- Fluid Section Spacing --- */
.section { padding: clamp(3rem, 2rem + 4vw, 5rem) 0; }
.body-map-section { padding: clamp(3rem, 2rem + 4vw, 5rem) 0; }
.hero { padding: clamp(3rem, 2rem + 4vw, 5rem) 0; }
.cta-banner { padding: clamp(2.5rem, 2rem + 3vw, 4rem) 0; }
.footer { padding: clamp(2.5rem, 2rem + 3vw, 4rem) 0 0; }

/* --- Touch-Friendly Tap Targets (min 44×44px per WCAG/Apple HIG) --- */
.btn {
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.btn-sm { min-height: 40px; }

.nav-menu > li > a {
    min-height: 48px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.dropdown li a { min-height: 44px; display: flex; align-items: center; }

.faq-question {
    min-height: 56px;
    -webkit-tap-highlight-color: transparent;
}

.testimonial-dot {
    width: 14px;
    height: 14px;
    min-width: 14px;
}

.chat-toggle {
    width: 56px;
    height: 56px;
    -webkit-tap-highlight-color: transparent;
}

.footer-social a { min-width: 44px; min-height: 44px; }

/* Remove tap highlight globally on interactive elements */
a, button, input, select, textarea, [role="button"] {
    -webkit-tap-highlight-color: transparent;
}

/* --- Keyboard Accessibility: Visible Focus States --- */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.btn-primary:focus-visible,
.chat-toggle:focus-visible {
    outline-color: var(--primary);
}

.btn-white:focus-visible,
.btn-outline:focus-visible {
    outline-color: var(--accent);
}

.nav-menu > li > a:focus-visible,
.dropdown li a:focus-visible,
.footer a:focus-visible {
    outline-offset: -2px;
    border-radius: 6px;
}

/* Skip link for screen readers / keyboard users */
.skip-link {
    position: absolute;
    top: -60px;
    left: 12px;
    z-index: 2000;
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    color: var(--white);
}

/* --- Anchor scroll offset for sticky header --- */
html {
    scroll-padding-top: 90px;
}

/* --- Reduced Motion Support (accessibility) --- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .btn:hover, .service-card:hover, .niche-card:hover {
        transform: none;
    }
}

/* --- Fluid Grids (auto-fit for graceful wrapping) --- */
@media (min-width: 769px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .niches-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .why-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* --- Improved Mobile Navigation --- */
.hamburger {
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
}

.hamburger:active { background: var(--gray-100); }

/* Animated hamburger → X */
.hamburger span { transform-origin: center; }
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile nav slide-down animation */
.nav-menu {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        opacity: 0;
        transform: translateY(-10px);
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nav-menu.open {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }
    /* Larger touch targets in mobile menu */
    .nav-menu > li > a {
        padding: 14px 8px;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--gray-100);
    }
    .nav-menu > li:last-child > a { border-bottom: none; }
    .dropdown li a { padding: 12px 16px; }
}

/* --- Mobile Sticky Bar: safe-area + better ergonomics --- */
.mobile-sticky-bar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

.mobile-sticky-bar .btn {
    min-height: 52px;
    font-size: 0.95rem;
}

/* --- Chat Widget: mobile positioning above sticky bar --- */
@media (max-width: 768px) {
    .chat-widget {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        right: 16px;
    }
    .chat-window {
        width: calc(100vw - 32px);
        max-width: 350px;
        right: 16px;
        left: auto;
        bottom: calc(150px + env(safe-area-inset-bottom, 0px));
        max-height: min(60vh, 480px);
    }
    .chat-messages { max-height: calc(min(60vh, 480px) - 130px); }
}

/* --- iOS input zoom prevention (16px min font) --- */
input, select, textarea {
    font-size: 16px;
}

.chat-input-area input { font-size: 16px; }

/* ============================================
   TYPOGRAPHY & READABILITY v3 (SEO + UX audit)
   16px body floor · balanced headings ·
   underlined content links (WCAG 1.4.1) ·
   scalable CTA/TOC blocks (moved from inline)
   ============================================ */

/* Modern text-wrapping — progressive enhancement, zero cost if unsupported */
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
.page-content p { line-height: 1.75; margin-bottom: 1.1em; }

/* In-content links must not rely on color alone (WCAG 1.4.1) — NHS pattern */
.page-content a:not(.btn) {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.page-content a:not(.btn):hover { color: var(--accent); text-decoration-thickness: 2px; }

/* --- TOC / CTA / Related blocks (styles moved out of per-page inline HTML) --- */
.dbp-toc {
    background: #f6f9fc;
    border: 1px solid #dbe7f0;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 24px 0;
}
.dbp-toc strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
    font-family: var(--font-heading);
    color: var(--primary);
}
.dbp-toc ul { margin: 0; padding-left: 18px; }
.dbp-toc li { margin: 3px 0; line-height: 1.5; }
.dbp-toc a { color: var(--secondary); }
.dbp-toc a:hover { color: var(--accent); }

.dbp-cta {
    background: linear-gradient(135deg, #1a6fb5, #2a9d8f);
    border-radius: 10px;
    padding: clamp(18px, 2rem + 1vw, 26px);
    margin: 28px 0;
    text-align: center;
    color: #fff;
}
.dbp-cta strong {
    display: block;
    font-size: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
    margin-bottom: 12px;
}
.dbp-cta .btn { margin: 4px 8px; min-height: 48px; }
.dbp-cta .btn-white {
    background: #fff;
    color: var(--primary);
}
.dbp-cta .btn-white:hover { background: #eef4fa; color: var(--primary-dark, #134a77); transform: translateY(-2px); }
.dbp-cta .btn-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}
.dbp-cta .btn-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* =========================================================
   CTA MANAGER v2 — type-aware conversion modules
   (.dbp-cta-card = mid-content, .dbp-cta-panel = end)
   Server-side rendered; zero JS; zero extra requests.
   ========================================================= */
:root { --cta-grad-a:#0f6db4; --cta-grad-b:#12a5a0; --cta-ink:#0c3d63; }

/* --- end-of-content panel --- */
.dbp-cta-panel {
    margin: 2.5rem 0 1rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cta-grad-a) 0%, var(--cta-grad-b) 100%);
    color: #fff;
    box-shadow: 0 10px 30px rgba(15,109,180,.25);
}
.dbp-cta-icon { font-size: 2rem; line-height: 1; margin-bottom: .35rem; }
.dbp-cta-head {
    margin: 0 0 .5rem; color: #fff;
    font-size: clamp(1.25rem, 1rem + 1.5vw, 1.6rem);
    text-wrap: balance;
}
.dbp-cta-copy { margin: 0 0 1rem; color: rgba(255,255,255,.92); max-width: 60ch; }
.dbp-cta-trust {
    list-style: none; margin: 0 0 1.25rem; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .4rem .9rem; font-size: .95rem; color: rgba(255,255,255,.95);
}
.dbp-cta-trust li::before { content: "✔"; margin-right: .45em; font-weight: 700; }

/* --- buttons --- */
.dbp-cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.dbp-btn-primary, .dbp-btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: .45em;
    min-height: 48px; padding: .8em 1.5em;
    border-radius: 999px; font-weight: 700; text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.dbp-btn-primary {
    background: #fff; color: var(--cta-ink);
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.dbp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.dbp-btn-ghost {
    background: rgba(255,255,255,.14); color: #fff;
    border: 2px solid rgba(255,255,255,.65);
}
.dbp-btn-ghost:hover { background: rgba(255,255,255,.24); transform: translateY(-2px); }
.dbp-btn-primary:focus-visible, .dbp-btn-ghost:focus-visible {
    outline: 3px solid #ffd166; outline-offset: 3px;
}

/* --- compact mid-content card --- */
.dbp-cta-card {
    margin: 2rem 0; padding: 1rem 1.25rem;
    border-left: 5px solid var(--cta-grad-b);
    border-radius: 12px;
    background: #f0f7ff;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .75rem 1.25rem;
}
.dbp-cta-card-line { margin: 0; flex: 1 1 240px; font-size: 1.05rem; font-weight: 600; color: var(--cta-ink); }
.dbp-cta-card .dbp-cta-actions { flex: 0 0 auto; }
.dbp-cta-card .dbp-btn-primary { background: linear-gradient(135deg, var(--cta-grad-a), var(--cta-grad-b)); color: #fff; }
.dbp-cta-card .dbp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,109,180,.35); }
.dbp-cta-card .dbp-btn-ghost { background: transparent; color: var(--cta-ink); border-color: var(--cta-grad-a); }
.dbp-cta-card .dbp-btn-ghost:hover { background: #e2eefc; }

@media (prefers-reduced-motion: reduce) {
    .dbp-btn-primary, .dbp-btn-ghost { transition: none; }
    .dbp-btn-primary:hover, .dbp-btn-ghost:hover { transform: none; }
}

@media (max-width: 520px) {
    .dbp-cta-actions { flex-direction: column; }
    .dbp-cta-actions .dbp-btn-primary, .dbp-cta-actions .dbp-btn-ghost { width: 100%; }
    .dbp-cta-trust { grid-template-columns: 1fr; }
}
@media print {
    .dbp-cta-panel, .dbp-cta-card { display: none !important; }
}

/* =========================================================
   CTA HIGHLIGHT BANNER — mid-content conversion band for
   high-intent page types (service / condition).
   Pure CSS shine: no JS, no images, GPU-composited only.
   ========================================================= */
.dbp-cta-banner {
    position: relative;
    overflow: hidden;
    margin: 2.5rem 0;
    padding: clamp(1.4rem, 3vw, 2.2rem) clamp(1.25rem, 3vw, 2.5rem);
    border-radius: 18px;
    background: linear-gradient(120deg, #0f6db4 0%, #0d87b8 55%, #12a5a0 100%);
    color: #fff;
    box-shadow:
        0 12px 34px rgba(13,109,180,.30),
        inset 0 1px 0 rgba(255,255,255,.22);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem 2rem;
}
/* static diagonal sheen — zero animation cost */
.dbp-cta-banner::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.16) 50%, transparent 58%);
    pointer-events: none;
}
.dbp-cta-banner::after { /* soft corner glow */
    content: "";
    position: absolute; top: -40%; right: -10%;
    width: 45%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
    pointer-events: none;
}
.dbp-cta-banner-kicker {
    display: inline-flex; align-items: center; gap: .4em;
    font-size: .8rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: #c9f3ef;
    margin-bottom: .45rem;
}
.dbp-cta-banner-head {
    margin: 0 0 .35rem; color: #fff;
    font-size: clamp(1.3rem, 1.05rem + 1.6vw, 1.75rem);
    line-height: 1.25; text-wrap: balance;
    position: relative; z-index: 1;
}
.dbp-cta-banner-sub {
    margin: 0; max-width: 52ch;
    color: rgba(255,255,255,.93); font-size: 1rem;
    position: relative; z-index: 1;
}
.dbp-cta-banner-actions {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; gap: .6rem;
    min-width: 230px;
}
.dbp-cta-banner .dbp-btn-primary { justify-content: center; background: #ffd166; color: #33301d; border: 0; }
.dbp-cta-banner .dbp-btn-primary:hover { background: #ffdf85; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
.dbp-cta-banner .dbp-btn-ghost { justify-content: center; background: rgba(255,255,255,.12); }
/* keep legacy stacked buttons working inside banner grids */
.dbp-cta-banner .dbp-cta-actions { flex-direction: column; }

@media (max-width: 720px) {
    .dbp-cta-banner { grid-template-columns: 1fr; }
    .dbp-cta-banner-actions { min-width: 0; flex-direction: column; }
}

@media (max-width: 480px) {
    /* Stack CTA buttons full-width on small phones — thumb friendly */
    .dbp-cta .btn {
        display: flex;
        width: 100%;
        max-width: 340px;
        margin: 6px auto;
    }
}

.dbp-related {
    background: #f8f9fa;
    border-left: 4px solid var(--secondary);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 26px 0;
}
.dbp-related strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    font-family: var(--font-heading);
    color: var(--primary);
}
.dbp-related ul { margin: 0; padding-left: 18px; }
.dbp-related li { margin: 4px 0; line-height: 1.55; }
.dbp-related a { color: var(--secondary); }
.dbp-related a:hover { color: var(--accent); }

/* Reading-privacy: keep printouts clean of conversion chrome */
@media print {
    .dbp-cta, .mobile-sticky-bar, .chat-widget, .header-links { display: none !important; }
}

/* --- Better Body Map on Mobile --- */
@media (max-width: 768px) {
    .body-map-wrapper { gap: 24px; }
    .body-map-container { max-width: 300px; }
    .body-map-info { padding: 20px; }
    .body-map-view-toggle .view-btn {
        min-width: 80px;
        min-height: 44px;
    }
}

/* --- Hero badges wrap nicely on small screens --- */
@media (max-width: 480px) {
    .hero-badges { gap: 8px; }
    .hero-badge { font-size: 0.78rem; padding: 6px 12px; }
    .hero-ctas { gap: 10px; }
}

/* --- Cards: consistent min-height & better mobile padding --- */
.service-card, .niche-card, .why-card {
    height: 100%;
}

@media (max-width: 768px) {
    .service-card { padding: 22px; }
    .niche-card .niche-header { padding: 20px 20px 12px; }
    .niche-card .niche-body { padding: 16px 20px 20px; }
}

/* --- Tables & wide content: horizontal scroll on mobile --- */
.table-responsive-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --- Smooth image rendering --- */
img {
    image-rendering: auto;
}

/* --- Better link contrast on dark backgrounds --- */
.footer a:focus-visible {
    outline-color: var(--accent);
}

/* --- Print styles (bonus UX) --- */
@media print {
    .header, .top-bar, .mobile-sticky-bar, .chat-widget,
    .cta-banner, .footer, .breadcrumb { display: none !important; }
    body { font-size: 12pt; color: #000; }
    .page-content, .content { padding: 0; }
    a { color: #000; text-decoration: underline; }
}

/* --- Landscape phone optimization --- */
@media (max-width: 900px) and (orientation: landscape) {
    .hero { padding: 40px 0; }
    .hero h1 { font-size: 1.6rem; }
    .chat-window { max-height: 70vh; }
}

/* --- Very large screens: cap content width --- */
@media (min-width: 1600px) {
    .container { max-width: 1320px; }
}

/* ============================================
   UX v3 — Performance · Contrast · Conversion
   ============================================ */

/* --- Back-to-Top Button --- */
.back-to-top {
    position: fixed;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 998;
    -webkit-tap-highlight-color: transparent;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .back-to-top { display: none; } /* sticky bar already provides quick actions */
}

/* --- Wait Time Indicator (conversion booster) --- */
.wait-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    font-size: 0.95rem;
    backdrop-filter: blur(4px);
}

.wait-time .pulse-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    background: #34D399;
    animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .wait-time .pulse-dot { animation: none; }
}

/* --- Trust Badges Section --- */
.trust-section {
    padding: clamp(2rem, 1.5rem + 2vw, 3rem) 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
}

.trust-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(16px, 2vw, 40px);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.trust-item .trust-icon {
    font-size: 1.6rem;
    display: inline-flex;
}

/* SVG icons inside trust badges */
.trust-item .trust-icon svg {
    width: 30px;
    height: 30px;
    fill: var(--secondary);
    display: block;
}

/* Hero decorative physiotherapy scene */
.hero-scene {
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    width: min(720px, 92%);
    height: auto;
    color: #FFFFFF;
    opacity: 0.28;
    pointer-events: none;
}

@media (max-width: 768px) {
    .hero-scene { opacity: 0.18; width: min(560px, 96%); }
}

/* Testimonial avatar with initials */
.t-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--white);
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    box-shadow: var(--shadow-sm);
}

.testimonial-slide:nth-child(2) .t-avatar {
    background: linear-gradient(135deg, var(--accent), #D95F00);
}

.testimonial-slide:nth-child(3) .t-avatar {
    background: linear-gradient(135deg, #0E9F8A, var(--primary));
}

/* --- Floating Google Rating Badge --- */
.g-rating-float {
    position: fixed;
    left: 20px;
    bottom: calc(150px + env(safe-area-inset-bottom, 0px));
    z-index: 997;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border-radius: var(--radius-full);
    padding: 8px 18px 8px 10px;
    box-shadow: 0 6px 24px rgba(11, 46, 79, 0.18);
    text-decoration: none;
    animation: gFloat 3.5s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
}

.g-rating-float:hover {
    box-shadow: 0 10px 32px rgba(11, 46, 79, 0.28);
}

.g-rating-float:hover .g-score {
    color: var(--secondary);
}

@keyframes gFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
    .g-rating-float { animation: none; }
}

.g-logo svg {
    width: 36px;
    height: 36px;
    display: block;
}

.g-rating-body {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.g-score {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--primary);
    transition: color 0.25s ease;
}

.g-stars {
    position: relative;
    display: inline-block;
    color: #FBBC05;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
}

/* Fractional star fill: grey base under gold overlay clipped to the rating % */
.g-stars .g-stars-bg {
    color: #d9dde3;
}
.g-stars .g-stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #FBBC05;
}

.g-rating-body small {
    color: var(--text-light);
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Mobile: compact badge on the left, above the sticky call bar (chat lives on the right) */
@media (max-width: 768px) {
    .g-rating-float {
        display: flex;
        left: 12px;
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        padding: 6px 12px 6px 8px;
        gap: 8px;
    }
    .g-logo svg {
        width: 28px;
        height: 28px;
    }
    .g-score {
        font-size: 1rem;
    }
    .g-rating-body small {
        display: none;   /* keep the pill tight on small screens */
    }
}

/* --- Mobile Progressive Rendering: sections render as user scrolls ---
   content-visibility:auto lets the browser skip layout/paint of
   off-screen sections — massive render savings on mobile. */
@media (max-width: 768px) {
    .section,
    .trust-section,
    .body-map-section,
    .cta-banner,
    .footer {
        content-visibility: auto;
        contain-intrinsic-size: auto 600px;
    }
}

/* --- Scroll Reveal Animations (added via JS only — no-JS safe) --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: none;
    will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- Active button press feedback (haptic-like) --- */
.btn:active {
    transform: scale(0.97);
}

/* --- Swipe hint on mobile slider --- */
.swipe-hint {
    display: none;
    text-align: center;
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .swipe-hint { display: block; }
}

/* ===== SUB-PAGE NAV STRIP ===== */
.sub-nav { background: var(--white); border-top: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); position: sticky; top: 0; z-index: 900; }
.sub-nav ul { display: flex; flex-wrap: wrap; }
.sub-nav li a { display: flex; align-items: center; min-height: 44px; padding: 10px 16px; color: var(--primary); font-weight: 500; font-size: 0.92rem; -webkit-tap-highlight-color: transparent; }
.sub-nav li a:hover, .sub-nav li a[aria-current="page"] { color: var(--accent); }

/* ============================================
   UX v4 — Responsive Fixes · Hero Split · Rich Cards
   ============================================ */

/* --- PHASE 1: Mega-dropdown overflow fix --- */
.dropdown.wide {
    min-width: 600px;
    max-width: calc(100vw - 40px);
}

@media (max-width: 1024px) {
    .dropdown.wide {
        grid-template-columns: repeat(2, 1fr);
        min-width: 460px;
        max-width: calc(100vw - 32px);
    }
}

/* --- PHASE 1: Top bar — short message on mobile --- */
.top-bar .msg-short { display: none; }

@media (max-width: 768px) {
    .top-bar { font-size: 0.78rem; }
    .top-bar .msg-full { display: none; }
    .top-bar .msg-short { display: inline; }
}

/* --- PHASE 1: Compact header on small screens --- */
@media (max-width: 480px) {
    .header-main { padding: 10px 0; }
    .header-logo a span:first-child { font-size: 1.1rem !important; }
    .header-logo a span:last-child { font-size: 0.62rem !important; }
    .header-links { gap: 8px; }
    .header-links .call-link { font-size: 0.95rem; }
    .call-number { display: none; } /* icon-only call button on tiny screens */
}

/* --- PHASE 2: Split hero with info card --- */
.hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(14, 128, 201, 0.35) 0%, transparent 45%),
        linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #0E5A8A 100%);
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
}

.hero-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(30px, 4vw, 60px);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-split .hero-content { max-width: none; }

.hero-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 2.5vw, 30px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.hero-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 18px;
}

.hero-card-logo {
    width: 52px;
    height: 52px;
    min-width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
}

.hero-card-title strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--white);
}

.hero-card-title small {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.78rem;
}

.rating-pill {
    margin-left: auto;
    background: rgba(252, 122, 0, 0.9);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.hero-card-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.hero-card-list li:last-child { border-bottom: none; }

.hero-card .btn { width: 100%; margin-top: 16px; }

.hero-card-note {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 12px 0 0;
}

@media (max-width: 900px) {
    .hero-split { grid-template-columns: 1fr; }
    .hero-card { max-width: 440px; margin: 0 auto; width: 100%; }
}

/* --- PHASE 3: Gradient icon tiles for cards --- */
.service-icon,
.why-icon,
.niche-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--primary-light) 100%);
    box-shadow: inset 0 0 0 1px rgba(14, 128, 201, 0.12);
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon,
.why-card:hover .why-icon,
.niche-card:hover .niche-icon {
    transform: scale(1.08) rotate(-3deg);
}

/* SVG glyphs inside icon tiles */
.why-icon svg,
.niche-icon svg,
.service-icon svg {
    width: 34px;
    height: 34px;
    fill: var(--secondary);
    display: block;
}

.niche-card .niche-icon { margin-bottom: 0; }

/* --- PHASE 3: Softer layered shadows + breathing room --- */
.service-card, .niche-card, .why-card {
    border-radius: 20px;
}

.service-card { padding: 32px 28px; }

/* --- PHASE 4: Header shrink-on-scroll --- */
.header {
    transition: box-shadow 0.25s ease;
}

.header.scrolled {
    box-shadow: 0 4px 24px rgba(11, 46, 79, 0.12);
}

.header.scrolled .header-main {
    padding: 8px 0;
}

.header-main {
    transition: padding 0.25s ease;
}

/* --- PHASE 4: Directions button in footer --- */
.footer-directions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: var(--white) !important;
    font-size: 0.88rem;
    font-weight: 600;
}

.footer-directions:hover {
    background: var(--accent);
    border-color: var(--accent);
}
@media (max-width: 768px) {
    .sub-nav ul { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; scrollbar-width: none; }
    .sub-nav ul::-webkit-scrollbar { display: none; }
    .sub-nav li a { padding: 12px 14px; white-space: nowrap; }
}
/* ============================================
   NEW SECTIONS: Team, Map CTA, BalanceBot
   Ported from static redesign → WordPress
   ============================================ */

/* ===== MEET OUR PHYSIOTHERAPISTS ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.team-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.team-img {
    aspect-ratio: 4 / 5;            /* portrait headshot box, uniform cards */
    overflow: hidden;
    background: #eef2f6;
}

.team-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 22%;      /* keep faces in frame, not cropped at chin */
    display: block;
}

.team-card h3 {
    padding: 20px 24px 6px;
    font-size: 1.25rem;
}

.team-role {
    padding: 0 24px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.team-desc {
    padding: 0 24px 24px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.team-cta {
    text-align: center;
    margin-top: var(--spacing-sm);
}

/* ===== MAP + CONTACT CTA ===== */
.map-cta-section {
    background: var(--gray-50);
}

.section-header.centered {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--spacing-md);
}

.map-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-md);
}

.map-wrapper iframe {
    display: block;
    width: 100%;
    border: 0;
}

.map-cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-sm);
}

.map-cta-item {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    color: var(--text);
    text-align: center;
}

.map-cta-item strong { color: var(--primary); }

/* ===== BALANCEBOT CHAT WIDGET ===== */
.balancebot-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9998;
    cursor: pointer;
}

@media (min-width: 768px) {
    .balancebot-widget { bottom: 28px; }
}

.balancebot-bounce {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(14, 128, 201, 0.45);
    animation: bbPulse 2.4s ease-in-out infinite;
}

.balancebot-icon { font-size: 1.7rem; }

@keyframes bbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.balancebot-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 31, 54, 0.55);
    z-index: 9999;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px;
}

.balancebot-modal.open { display: flex; }

.balancebot-modal-content {
    width: min(400px, 100%);
    max-height: min(560px, 80vh);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.balancebot-header {
    background: var(--primary);
    color: var(--white);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.balancebot-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
}

.balancebot-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.balancebot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--gray-50);
}

.balancebot-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    line-height: 1.5;
}

.balancebot-msg.bot {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--gray-200);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.balancebot-msg.user {
    background: var(--secondary);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.balancebot-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
}

.balancebot-form input {
    flex: 1;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
}

.balancebot-form input:focus { border-color: var(--secondary); }

.balancebot-form button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.balancebot-form button:hover { background: var(--accent-dark); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .team-grid { grid-template-columns: 1fr; }
    /* keep the 4/5 box on mobile: same framing as desktop so faces are
       never cropped out by the cover fit (fixed-height cap made the box
       near-square and sliced heads off portrait headshots) */
    .team-img { aspect-ratio: 4 / 5; height: auto; }
    .map-cta-grid { grid-template-columns: 1fr; }
    .balancebot-widget { right: 14px; }
}/* ============================================
   NEW SECTIONS: Team, Map CTA, BalanceBot
   Ported from static redesign → WordPress
   ============================================ */

/* ===== MEET OUR PHYSIOTHERAPISTS ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.team-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.team-img {
    aspect-ratio: 4 / 5;            /* portrait headshot box, uniform cards */
    overflow: hidden;
    background: #eef2f6;
}

.team-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 22%;      /* keep faces in frame, not cropped at chin */
    display: block;
}

.team-card h3 {
    padding: 20px 24px 6px;
    font-size: 1.25rem;
}

.team-role {
    padding: 0 24px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.team-desc {
    padding: 0 24px 24px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.team-cta {
    text-align: center;
    margin-top: var(--spacing-sm);
}

/* ===== MAP + CONTACT CTA ===== */
.map-cta-section {
    background: var(--gray-50);
}

.section-header.centered {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--spacing-md);
}

.map-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-md);
}

.map-wrapper iframe {
    display: block;
    width: 100%;
    border: 0;
}

.map-cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-sm);
}

.map-cta-item {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    color: var(--text);
    text-align: center;
}

.map-cta-item strong { color: var(--primary); }

/* ===== BALANCEBOT CHAT WIDGET ===== */
.balancebot-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9998;
    cursor: pointer;
}

@media (min-width: 768px) {
    .balancebot-widget { bottom: 28px; }
}

.balancebot-bounce {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(14, 128, 201, 0.45);
    animation: bbPulse 2.4s ease-in-out infinite;
}

.balancebot-icon { font-size: 1.7rem; }

@keyframes bbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.balancebot-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 31, 54, 0.55);
    z-index: 9999;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px;
}

.balancebot-modal.open { display: flex; }

.balancebot-modal-content {
    width: min(400px, 100%);
    max-height: min(560px, 80vh);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.balancebot-header {
    background: var(--primary);
    color: var(--white);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.balancebot-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
}

.balancebot-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.balancebot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--gray-50);
}

.balancebot-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    line-height: 1.5;
}

.balancebot-msg.bot {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--gray-200);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.balancebot-msg.user {
    background: var(--secondary);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.balancebot-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
}

.balancebot-form input {
    flex: 1;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
}

.balancebot-form input:focus { border-color: var(--secondary); }

.balancebot-form button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.balancebot-form button:hover { background: var(--accent-dark); }

/* ===== HEADER DROPDOWN MENUS ===== */
.nav-menu .menu-item-has-children { position: relative; }
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1200;
    min-width: 240px;
    max-height: min(72vh, 560px);   /* long lists scroll inside the dropdown */
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--white);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    list-style: none;
    margin: 0;
}
.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .menu-item-has-children:focus-within > .sub-menu { display: block; }
.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 18px;
    font-size: 0.92rem;
    color: var(--text);
    font-weight: 500;
}
.nav-menu .sub-menu li a:hover {
    background: var(--gray-50);
    color: var(--secondary);
}

/* ===== CONDITIONS MEGA PANEL (desktop: 3 themed columns) ===== */
@media (min-width: 901px) {
    .nav-menu .dbp-mega {
        min-width: 700px;
        padding: 18px 20px 12px;
    }
    .nav-menu .menu-item-has-children:hover > .dbp-mega,
    .nav-menu .menu-item-has-children:focus-within > .dbp-mega {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px 28px;
    }
    .nav-menu .dbp-mega ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .nav-menu .dbp-mega-col h4 {
        margin: 0 0 8px;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--secondary);
    }
    .nav-menu .dbp-mega-foot {
        grid-column: 1 / -1;
        display: flex;
        gap: 22px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--gray-100);
    }
    .nav-menu .dbp-mega-foot a {
        font-weight: 700;
        color: var(--secondary);
    }
}

/* Mobile: render submenus inline when the hamburger menu is open */
@media (max-width: 900px) {
    .nav-menu .sub-menu {
        display: block;
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0 0 6px 14px;
        min-width: 0;
        max-height: none;   /* inline list scrolls with the page, not clipped */
        overflow: visible;
    }
    /* Mega panel collapses to a plain stacked list on mobile */
    .nav-menu .dbp-mega {
        display: block;
        min-width: 0;
        padding: 0 0 6px 14px;
    }
    .nav-menu .dbp-mega-col h4 {
        margin: 10px 0 2px;
    }
    .nav-menu .dbp-mega-foot {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 16px;
        margin: 6px 0 0;
        padding: 0;
        border-top: 0;
    }
}

/* Landing page card thumbnails */
.niche-thumb { display: block; overflow: hidden; border-radius: var(--radius-sm); }
.niche-thumb img { width: 100%; height: 150px; object-fit: cover; transition: transform .3s ease; }
.niche-card:hover .niche-thumb img { transform: scale(1.05); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .team-grid { grid-template-columns: 1fr; }
    /* keep the 4/5 box on mobile: same framing as desktop so faces are
       never cropped out by the cover fit */
    .team-img { aspect-ratio: 4 / 5; height: auto; }
    .map-cta-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   LEGACY CONTENT NORMALIZATION - desktop alignment fixes
   ========================================================= */
.page-content { display: flow-root; }

.page-content .alignleft  { float: left;  margin: .4em 1.75em 1em 0; max-width: 50%; }
.page-content .alignright { float: right; margin: .4em 0 1em 1.75em; max-width: 50%; }
.page-content .aligncenter{ display: block; margin-inline: auto; float: none; }
.page-content .alignnone,
.page-content img.alignnone { display: block; margin: 1.5rem auto; }
.page-content figure { margin: 1.5rem 0; }
.page-content figcaption { font-size: var(--fs-small); color: var(--text-light); text-align: center; margin-top: .5rem; }

.page-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.page-content th, .page-content td { border: 1px solid var(--gray-200); padding: .6em .85em; text-align: left; vertical-align: top; }
.page-content thead th { background: var(--primary); color: var(--white); font-family: var(--font-heading); font-weight: 600; }
.page-content tbody tr:nth-child(even) { background: var(--gray-50); }
@media (max-width: 720px) {
    .page-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

.page-content hr { border: 0; height: 2px; margin: 2.25rem auto; width: min(240px, 60%); border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gray-300), transparent); }
.page-content blockquote { margin: 1.75rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--secondary); border-radius: 0 12px 12px 0; background: var(--secondary-light); color: var(--text-light); font-style: italic; }
.page-content blockquote p:last-child { margin-bottom: 0; }

.page-content iframe, .page-content video, .page-content embed, .page-content object { max-width: 100%; }
.page-content iframe[src*="youtube"], .page-content iframe[src*="youtu.be"], .page-content iframe[src*="vimeo"] { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 12px; }

.page-content [style*="width"] img, .page-content div[style*="max-width"] > * { max-width: 100%; }
.page-content h2, .page-content h3 { overflow-wrap: break-word; }
