/* ============================================================
   DENTAL CMS — Frontend Stylesheet
   Modern, mobile-first, performance-optimized
   ============================================================ */

:root {
    --color-primary: #1F4F7F;
    --color-primary-dark: #163b60;
    --color-primary-light: #e7eef5;
    --color-accent: #F5A623;
    --color-accent-dark: #d18a16;
    --color-accent-light: #fef3df;
    --color-text: #1a2332;
    --color-text-muted: #5a6b7d;
    --color-bg: #ffffff;
    --color-bg-alt: #f7f9fc;
    --color-border: #e5eaf0;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --container: 1200px;
    --radius: 12px;
    --radius-sm: 6px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 20px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.06);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, video { max-width: 100%; height: auto; display: block; }
/* SVG: never blow up. Inline SVGs MUST set explicit width/height to override. */
svg { max-width: 100%; vertical-align: middle; }
svg:not([width]):not([height]) { width: 24px; height: 24px; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    text-align: center;
}
.btn-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.btn-accent {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}
.btn-accent:hover {
    background: var(--color-accent-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}
.btn-white {
    background: white;
    color: var(--color-primary);
}
.btn-white:hover { background: var(--color-bg-alt); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    z-index: 100;
    transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 24px;
}
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo img { max-height: 44px; width: auto; }
.site-logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Main Nav */
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav ul { display: flex; align-items: center; gap: 2px; }
.main-nav a {
    display: block;
    padding: 10px 16px;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.main-nav a:hover,
.main-nav a.active { color: var(--color-primary); background: var(--color-primary-light); }

.header-cta { display: flex; align-items: center; gap: 12px; }
.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
}
.header-phone svg { width: 18px; height: 18px; }

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--color-text);
}
.menu-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 70px 0 90px;
    background: linear-gradient(135deg, #e8f1f8 0%, #f7f9fc 100%);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(27,108,168,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-content h1 {
    margin-bottom: 20px;
    color: var(--color-primary);
}
.hero-content h1 span { color: var(--color-accent); display: block; }
.hero-content p { font-size: 1.1rem; color: var(--color-text-muted); margin-bottom: 30px; max-width: 540px; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-rating {
    display: flex; align-items: center; gap: 12px;
    margin-top: 28px; padding: 14px 20px;
    background: white; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); width: fit-content;
}
.hero-rating-stars { display: flex; gap: 2px; color: var(--color-accent); }
.hero-rating-text strong { display: block; color: var(--color-text); }
.hero-rating-text small { color: var(--color-text-muted); font-size: 0.85rem; }

.hero-media {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/3;
    background: var(--color-bg-alt);
}
.hero-media img, .hero-media video {
    width: 100%; height: 100%; object-fit: cover;
}

/* ---------- Section ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-dark { background: var(--color-primary); color: white; }
.section-dark h1,.section-dark h2,.section-dark h3 { color: white; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-eyebrow {
    display: inline-block;
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.section-header h2 { margin-bottom: 14px; }
.section-header p { color: var(--color-text-muted); max-width: 700px; margin: 0 auto; font-size: 1.05rem; }

/* ---------- Cards Grid ---------- */
.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 1px solid var(--color-border);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-image {
    width: 100%; aspect-ratio: 16/10; overflow: hidden; background: var(--color-bg-alt);
}
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card-image img { transform: scale(1.05); }
.card-body { padding: 24px; }
.card-body h3 { font-size: 1.25rem; margin-bottom: 10px; color: var(--color-primary); }
.card-body p { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 16px; }
.card-link {
    color: var(--color-accent); font-weight: 600; font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 6px;
}
.card-link:hover { gap: 12px; color: var(--color-accent-dark); }

/* Service card icon variant */
.service-card .card-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--color-primary-light);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
    color: var(--color-primary);
}
.service-card .card-icon svg { width: 32px; height: 32px; }

/* ---------- Features (about block) ---------- */
.features { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 40px; }
.feature {
    text-align: center; padding: 28px 20px;
    background: white; border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.feature-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    border-radius: 50%; background: var(--color-primary-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary);
}
.feature-icon svg { width: 32px; height: 32px; }
.feature h4 { margin-bottom: 8px; font-size: 1.05rem; }
.feature p { color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.5; }

/* ---------- Testimonials ---------- */
.testimonial {
    background: white; border-radius: var(--radius);
    padding: 30px; box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    height: 100%; display: flex; flex-direction: column;
}
.testimonial-stars { display: flex; gap: 2px; margin-bottom: 16px; color: var(--color-accent); }
.testimonial-content { font-size: 1rem; color: var(--color-text); margin-bottom: 20px; flex: 1; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 14px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.testimonial-author-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--color-primary-light); color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem;
}
.testimonial-author-info strong { display: block; }
.testimonial-author-info small { color: var(--color-text-muted); font-size: 0.85rem; }

/* ---------- CTA section ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white; text-align: center; padding: 70px 0;
}
.cta-section h2 { color: white; margin-bottom: 14px; }
.cta-section p { color: rgba(255,255,255,0.85); margin-bottom: 28px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ---------- Page banner ---------- */
.page-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white; padding: 70px 0 60px; text-align: center;
}
.page-banner h1 { color: white; margin-bottom: 10px; }
.page-banner p { color: rgba(255,255,255,0.85); font-size: 1.05rem; }
.breadcrumbs {
    display: flex; justify-content: center; align-items: center; gap: 8px;
    margin-top: 16px; font-size: 0.9rem; color: rgba(255,255,255,0.8);
}
.breadcrumbs a { color: rgba(255,255,255,0.95); }
.breadcrumbs a:hover { color: white; text-decoration: underline; }

/* ---------- Content (blog / page) ---------- */
.content-area {
    max-width: 800px; margin: 0 auto;
    font-size: 1.05rem; line-height: 1.75;
}
.content-area h2 { margin: 36px 0 16px; color: var(--color-primary); }
.content-area h3 { margin: 28px 0 12px; }
.content-area p { margin-bottom: 18px; color: var(--color-text); }
.content-area ul, .content-area ol { margin: 0 0 18px 24px; }
.content-area ul li, .content-area ol li { margin-bottom: 8px; }
.content-area ul { list-style: disc; }
.content-area ol { list-style: decimal; }
.content-area a { color: var(--color-primary); text-decoration: underline; }
.content-area img { border-radius: var(--radius); margin: 24px 0; }
.content-area blockquote {
    border-left: 4px solid var(--color-accent);
    background: var(--color-bg-alt);
    padding: 20px 28px; margin: 24px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; color: var(--color-text); }
.form-label .req { color: var(--color-danger); }
.form-control {
    width: 100%; padding: 12px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: white;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27,108,168,0.1);
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-message { padding: 14px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.form-message.success { background: #d1fae5; color: #065f46; }
.form-message.error { background: #fee2e2; color: #991b1b; }

/* Honeypot field */
.hp-field { position: absolute; left: -10000px; visibility: hidden; }

/* ---------- Appointment form section ---------- */
.appointment-section {
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, white 100%);
    padding: 80px 0;
}
.appointment-card {
    max-width: 700px; margin: 0 auto;
    background: white; border-radius: var(--radius-lg);
    padding: 40px; box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}
.appointment-card h3 { text-align: center; margin-bottom: 8px; color: var(--color-primary); }
.appointment-card > p { text-align: center; color: var(--color-text-muted); margin-bottom: 28px; }

/* ---------- Contact info grid ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info { background: white; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-item-icon {
    flex-shrink: 0; width: 44px; height: 44px;
    border-radius: 50%; background: var(--color-primary-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary);
}
.contact-item h4 { font-size: 1rem; margin-bottom: 4px; }
.contact-item p, .contact-item a { color: var(--color-text-muted); font-size: 0.95rem; font-family: var(--font-body); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: white; border-radius: var(--radius);
    margin-bottom: 12px; border: 1px solid var(--color-border);
    overflow: hidden; transition: all var(--transition);
}
.faq-item:hover { border-color: var(--color-primary); }
.faq-question {
    width: 100%; padding: 20px 24px;
    display: flex; align-items: center; justify-content: space-between;
    text-align: left; font-weight: 600; font-size: 1.05rem;
    background: white; color: var(--color-text);
}
.faq-question::after {
    content: '+'; font-size: 1.5rem; color: var(--color-primary);
    transition: transform var(--transition);
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 24px;
}
.faq-item.open .faq-answer { max-height: 500px; padding-bottom: 20px; }
.faq-answer p { color: var(--color-text-muted); }

/* ---------- Footer ---------- */
.site-footer {
    background: #0d1b2a;
    color: #b5c4d6;
    padding: 70px 0 0;
    margin-top: 80px;
}
/* No white gap when a full-width coloured band (CTA / banner) sits
   directly above the footer — they should meet edge to edge. */
.cta-section + .site-footer,
.page-banner + .site-footer {
    margin-top: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}
.footer-col h4 {
    color: white; font-size: 1.05rem; margin-bottom: 18px;
    font-family: var(--font-body); font-weight: 600;
    letter-spacing: 0.5px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
    color: #b5c4d6; font-size: 0.9rem;
    transition: color var(--transition);
}
.footer-col ul a:hover { color: white; }
.footer-about-text { font-size: 0.9rem; margin-bottom: 20px; line-height: 1.6; }
.footer-logo {
    font-family: var(--font-heading); font-size: 1.5rem;
    color: white; margin-bottom: 16px; display: block; font-weight: 700;
}
.footer-contact-item { display: flex; gap: 10px; margin-bottom: 12px; font-size: 0.9rem; }
/* Phone / email are <a> tags — stop them inheriting the dark navy global
   link colour, which is unreadable on the near-black footer. */
.footer-contact-item a { color: #b5c4d6; }
.footer-contact-item a:hover,
.footer-contact-item a:focus { color: var(--color-accent); text-decoration: underline; }
.footer-contact-item svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--color-accent); margin-top: 2px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    color: #b5c4d6; transition: all var(--transition);
}
.footer-social a:hover { background: var(--color-accent); color: white; transform: translateY(-3px); }
.footer-social svg { width: 18px; height: 18px; }

.footer-bottom {
    padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center; font-size: 0.85rem; color: #8a98a8;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex; justify-content: center; gap: 6px;
    margin-top: 50px; flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 10px 16px; border-radius: var(--radius-sm);
    background: white; border: 1px solid var(--color-border);
    color: var(--color-text); font-weight: 500; font-size: 0.9rem;
}
.pagination a:hover { background: var(--color-primary-light); border-color: var(--color-primary); }
.pagination .current { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* ---------- Blog post ---------- */
.blog-meta { display: flex; align-items: center; gap: 16px; color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 16px; flex-wrap: wrap; }
.blog-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.blog-tag {
    display: inline-block; padding: 4px 12px; background: var(--color-primary-light);
    color: var(--color-primary); border-radius: 999px; font-size: 0.8rem; font-weight: 600;
}

/* ---------- Team grid ---------- */
.team-card { text-align: center; }
.team-card .card-image {
    aspect-ratio: 3/4;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--color-bg-alt);
}
.team-card .card-image img {
    object-position: top center;  /* keep faces in frame */
}
.team-card h3 { color: var(--color-primary); margin-bottom: 4px; }
.team-card .team-position { color: var(--color-accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 12px; }
.team-card .team-quals { display: block; color: var(--color-text-muted); font-size: 0.85rem; margin-bottom: 12px; }

/* ---------- Off-canvas / mobile menu ---------- */
.mobile-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 200;
    opacity: 0; visibility: hidden;
    transition: all var(--transition);
}
.mobile-overlay.open { opacity: 1; visibility: visible; }

.mobile-menu {
    position: fixed; top: 0; right: -340px;
    width: 320px; max-width: 90vw; height: 100vh;
    background: white; z-index: 201;
    transition: right var(--transition);
    padding: 24px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.mobile-menu.open { right: 0; }
.mobile-menu-close {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--color-bg-alt);
    display: flex; align-items: center; justify-content: center;
    margin-left: auto;
}
.mobile-menu nav { margin-top: 24px; }
.mobile-menu nav a {
    display: block; padding: 14px 12px;
    color: var(--color-text); font-weight: 500;
    border-bottom: 1px solid var(--color-border);
}
.mobile-menu nav a:hover, .mobile-menu nav a.active { color: var(--color-primary); }
.mobile-menu-cta { margin-top: 24px; display: grid; gap: 10px; }

/* ---------- Modal ---------- */
.modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 300;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; visibility: hidden; transition: all var(--transition);
}
.modal.open { opacity: 1; visibility: visible; }
.modal-content {
    background: white; border-radius: var(--radius-lg);
    max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto;
    padding: 36px;
    transform: scale(0.95); transition: transform var(--transition);
}
.modal.open .modal-content { transform: scale(1); }
.modal-close {
    float: right; width: 36px; height: 36px;
    background: var(--color-bg-alt); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: -12px -12px 0 0;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}.mt-5{margin-top:48px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:32px}.mb-5{margin-bottom:48px}
.d-none { display: none; }
.d-flex { display: flex; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-media { aspect-ratio: 16/10; }
}

@media (max-width: 768px) {
    .section { padding: 56px 0; }
    .hero { padding: 50px 0 70px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .main-nav, .header-phone, .header-cta .btn:not(.menu-toggle) { display: none; }
    .menu-toggle { display: flex; }
    .appointment-card { padding: 28px 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .section-header { margin-bottom: 36px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .features { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
    .btn { padding: 12px 22px; font-size: 0.9rem; }
}

/* ---------- Print ---------- */
@media print {
    .site-header, .site-footer, .menu-toggle, .cta-section { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Loading / animations ---------- */
.fade-in { animation: fadeIn 0.6s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Contact additions ---------- */
.contact-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(27,108,168,0.08);
    color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-form-wrap { width: 100%; }
.map-wrap { line-height: 0; }
.map-wrap iframe { width: 100%; height: 420px; border: 0; display: block; }
@media (max-width: 768px) {
    .map-wrap iframe { height: 320px; }
}

/* =============================================================
   MY TEETH BRAND ADDITIONS
   ============================================================= */

/* ---------- Floating action buttons (WhatsApp + Call) ---------- */
.floating-whatsapp, .floating-call {
    position: fixed;
    z-index: 999;
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    color: #fff;
}
.floating-whatsapp { background: #25D366; bottom: 24px; right: 24px; }
.floating-call     { background: var(--color-primary); bottom: 92px; right: 24px; }
.floating-whatsapp svg, .floating-call svg { width: 28px; height: 28px; }
.floating-whatsapp:hover, .floating-call:hover { transform: scale(1.08); color: #fff; box-shadow: 0 10px 32px rgba(0,0,0,0.25); }
@media (max-width: 768px) {
    .floating-whatsapp { width: 52px; height: 52px; bottom: 18px; right: 18px; }
    .floating-call     { width: 52px; height: 52px; bottom: 80px; right: 18px; }
}

/* ---------- Stats / counter strip ---------- */
.stats-strip {
    background: var(--color-primary);
    color: #fff;
    padding: 50px 0;
}
.stats-strip .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
.stats-strip .stat-num {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}
.stats-strip .stat-label {
    margin-top: 8px;
    font-size: 0.95rem;
    opacity: 0.92;
    letter-spacing: 0.02em;
}
@media (max-width: 768px) {
    .stats-strip .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* ---------- Gallery grid ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.gallery-grid .gallery-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
}
.gallery-grid img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-grid .gallery-item:hover img { transform: scale(1.06); }
@media (max-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* ---------- Video block ---------- */
.video-block {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
    max-width: 880px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
}
.video-block video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 768px) {
    .video-block { aspect-ratio: 16 / 10; }
}

/* ---------- Team cards (specialist style) ---------- */
.team-card .card-body { padding: 24px; }
.team-card .team-position {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 6px 0 4px;
}
.team-card .team-quals {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 12px;
}

/* ---------- Service icon variants ---------- */
.service-card .service-icon {
    background: linear-gradient(135deg, rgba(31,79,127,0.08), rgba(245,166,35,0.12));
    color: var(--color-primary);
    width: 56px; height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.service-card .service-icon svg { width: 28px; height: 28px; }

/* ---------- Trust badges row ---------- */
.trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 28px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.92rem;
    flex-wrap: wrap;
}
.trust-row .trust-item { display: inline-flex; align-items: center; gap: 8px; }
.trust-row svg { width: 22px; height: 22px; color: var(--color-accent); }

/* ---------- Contact-icon: switch to primary-color tint ---------- */
.contact-icon {
    background: rgba(31, 79, 127, 0.08);
    color: var(--color-primary);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS — additional refinements
   ========================================================================== */
@media (max-width: 768px) {
    /* Service card cleaner on mobile - smaller icons, tighter padding */
    .service-card .card-body { padding: 20px 16px; }
    .service-card h3 { font-size: 1.1rem; margin: 8px 0 8px; }
    .service-card .service-icon {
        width: 48px !important; height: 48px !important;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    .service-card .service-icon svg { width: 24px !important; height: 24px !important; }

    /* Stats strip — 2x2 on mobile, smaller numbers */
    .stats-strip { padding: 36px 0; }
    .stats-strip .stat-num { font-size: 2rem; }
    .stats-strip .stat-label { font-size: 0.8rem; }

    /* Floating buttons closer together, smaller */
    .floating-whatsapp, .floating-call {
        width: 48px !important; height: 48px !important;
    }
    .floating-whatsapp svg, .floating-call svg { width: 22px !important; height: 22px !important; }
    .floating-whatsapp { bottom: 14px !important; right: 14px !important; }
    .floating-call     { bottom: 72px !important; right: 14px !important; }

    /* Team grid - single column on mobile */
    .grid-4, .grid-3 { grid-template-columns: 1fr !important; gap: 16px !important; }
    .team-card .card-image { aspect-ratio: 4/3; max-height: 320px; }
    .team-card .card-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

    /* Hero text smaller, less margin */
    .hero h1 { font-size: 1.7rem !important; line-height: 1.2; }
    .hero p { font-size: 0.95rem; }
    .hero-buttons { flex-direction: column; gap: 10px; }
    .hero-buttons .btn { width: 100%; }
    .hero { padding: 32px 0 24px !important; }

    /* Section spacing — less on mobile */
    .section { padding: 40px 0 !important; }
    .section-header h2 { font-size: 1.45rem !important; }
    .section-header p { font-size: 0.95rem; }

    /* Container padding */
    .container { padding-left: 16px; padding-right: 16px; }

    /* Appointment form */
    .appointment-card { padding: 24px 18px !important; }
    .appointment-card .form-row { grid-template-columns: 1fr !important; gap: 14px; }

    /* Footer */
    .footer { padding: 32px 0 20px !important; }
    .footer-grid { grid-template-columns: 1fr !important; gap: 24px !important; }

    /* Gallery - 2 cols on mobile */
    .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .gallery-grid .gallery-item { aspect-ratio: 1/1; }
}

@media (max-width: 480px) {
    .stats-strip .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .stats-strip .stat-num { font-size: 1.7rem; }

    /* Header — hide phone, keep just menu toggle + book now */
    .header-phone { display: none; }
    .btn.btn-accent { padding: 10px 14px; font-size: 0.85rem; }

    /* Hero buttons fit better */
    .hero h1 { font-size: 1.5rem !important; }
}

/* ==========================================================================
   DESKTOP — extra polish
   ========================================================================== */
@media (min-width: 1025px) {
    /* Ensure team grid never goes beyond 4 cols on desktop */
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   CARD HOVER COLOUR FIX — prevent text from inheriting link colour
   ==========================================================================
   When a <a class="card"> wraps card content, the global a:hover rule
   would change ALL text colour inside the card. These overrides keep
   text readable and only animate the card lift + icon highlight.
   ========================================================================== */
.card, .card:hover, .card *, .card:hover * {
    text-decoration: none;
}

/* Card heading: stays primary navy even when card is hovered */
.card h2, .card h3, .card h4,
.card:hover h2, .card:hover h3, .card:hover h4 {
    color: var(--color-primary) !important;
}

/* Card body text: stays grey */
.card p, .card:hover p,
.card .team-quals, .card:hover .team-quals,
.card .team-position, .card:hover .team-position,
.card small, .card:hover small {
    color: inherit !important;
}
.card p, .card:hover p { color: var(--color-text-muted) !important; }
.card .team-position { color: var(--color-primary) !important; }
.card .team-quals { color: var(--color-text-muted) !important; }
.card small { color: var(--color-text-muted) !important; }

/* The "Learn more →" link: only THIS changes on hover */
.card .card-link {
    color: var(--color-accent) !important;
    transition: color 0.2s, gap 0.2s;
}
.card:hover .card-link {
    color: var(--color-accent-dark) !important;
    gap: 12px;
}

/* Service-icon: keep brand colours regardless of hover */
.service-card .service-icon,
.service-card:hover .service-icon {
    color: var(--color-primary) !important;
    background: linear-gradient(135deg, rgba(31,79,127,0.08), rgba(245,166,35,0.12)) !important;
}
.service-card:hover .service-icon {
    background: linear-gradient(135deg, rgba(31,79,127,0.14), rgba(245,166,35,0.20)) !important;
}

/* Blog tag (category pill) keeps its colour on card hover */
.card .blog-tag,
.card:hover .blog-tag {
    background: var(--color-primary-light) !important;
    color: var(--color-primary) !important;
}

/* ==========================================================================
   BLOG POST HERO IMAGE — cap height so portrait images don't run off-screen
   ========================================================================== */
.blog-content img,
article img {
    max-height: 560px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto 24px;
}
@media (max-width: 768px) {
    .blog-content img,
    article img { max-height: 360px; }
}

/* The big hero image at top of a blog post (inline style="width:100%") */
.article-hero-image,
article > img:first-of-type {
    max-height: 520px !important;
    object-fit: cover !important;
    width: 100% !important;
    margin-bottom: 30px !important;
    border-radius: var(--radius-lg) !important;
}

/* ==========================================================================
   IMAGE PROTECTIONS — no image can ever overflow its parent card
   ========================================================================== */
.card-image {
    overflow: hidden;
    background: var(--color-bg-alt);
}
.card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
