:root {
    --primary: #4EC3B6; /* Brand Teal */
    --primary-dark: #3aa398;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8fcfb;
    --white: #ffffff;
    --alert: #e74c3c;
    --container-width: 1200px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* Global Resets */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); color: var(--text-dark); line-height: 1.6; }

/* Structural Utilities */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* Buttons & Typography */
.btn { display: inline-block; padding: 10px 20px; text-decoration: none; border-radius: 50px; font-weight: 600; transition: 0.3s; font-family: var(--font-heading); }
.btn-sm { font-size: 0.8rem; padding: 6px 15px; }
.btn-lg { font-size: 1rem; padding: 15px 30px; }
.btn-primary { background: var(--primary); color: white; }
.btn-alert { background: var(--alert); color: white; }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); }
.btn-white { background: white; color: var(--text-dark); }
.btn-block { display: block; width: 100%; border: none; cursor: pointer; text-align: center; }
.btn-teal {
        background-color: #2c7a7b !important; /* Deepened slate-teal to break up the solid block line */
        color: white !important;
    }

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--text-dark); margin-bottom: 1rem; }
h1 { font-size: 3.5rem; color: white; }
h2 { font-size: 2.5rem; }
.sub-heading { color: var(--primary); text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; margin-bottom: 0.5rem; display: block; }
.dark-text { color: #000 !important; font-weight: 600; }

/* Navigation Anchor Underlines */
.main-nav a { 
    position: relative; 
    text-decoration: none; 
    color: var(--text-dark); 
    padding-bottom: 5px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 500;
}
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a:hover { color: var(--primary); }

/* Sticky Center Header Layout */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    z-index: 999;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}
.header-inner-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
}
.logo-centered img { height: 120px; width: auto; display: block; }
.centered-nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.mobile-menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); }

/* Hero Section with Text Overlay */
.hero { 
    height: 650px; 
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://thedentalhygieneclinic.co.uk/uploads/images/waiting-area.jpg') no-repeat center center/cover; 
    display: flex; 
    align-items: center; 
    margin-top: 195px; 
    position: relative; 
}
.opaque-hero-box {
    background: rgba(255, 255, 255, 0.92);
    padding: 40px;
    border-radius: 8px;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-left: 6px solid var(--primary);
}
.opaque-hero-box h1 { color: var(--text-dark); font-size: 2.3rem; line-height: 1.3; margin-bottom: 15px; }

/* Persistent Floating Action Buttons (Desktop Sidebar Layout) */
.floating-action-sidebar {
    position: fixed;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1001;
    width: 220px;
}
.float-btn {
    display: block;
    padding: 14px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.float-btn:hover { transform: translateX(-4px); box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
.btn-teal { background-color: var(--primary); color: white; }
.btn-light-teal { background-color: #e6fffa; color: var(--primary-dark); border: 1px solid var(--primary); }

/* Static Outbound Review Button */
.inline-widget-row { 
    display: flex; 
    justify-content: space-between; /* MAGIC LINE: Pushes Google left, CQC right */
    align-items: center;            /* Vertically centers both elements perfectly */
    margin-bottom: 30px; 
}
.static-google-review-btn {
    background: #1a1a1a; color: white; padding: 20px 20px; border-radius: 4px;
    text-decoration: none; font-weight: 600; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 10px;
}
.review-stars { color: #ffd700; }

/* Constrains the CQC asset layout */
.cqc-wrapper img {
    height: 65px; /* Clean, professional standard height for compliance badges */
    width: auto;
    display: block;
}

/* Structural Content Splits & Checklists */
.split-layout { display: flex; gap: 40px; align-items: center; }
.split-layout > div { flex: 1; }
.image-block img { width: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.check-list { list-style: none; margin-top: 20px; padding-left: 20px; } /* Indent Fixed */
.check-list li { margin-bottom: 10px; font-weight: 500; display: flex; align-items: center; }
.check-list i { color: var(--primary); margin-right: 12px; }
.finance-tagline {
    margin-top: 20px;
    font-weight: 600;
    color: var(--primary-dark, #2b4c59); /* Match your dark headings */
    font-size: 0.95rem;
}

.finance-tagline i {
    color: var(--primary, #32b5a2); /* Match your brand teal */
    margin-right: 8px;
}
.group-photo-placeholder {
    width: 100%; height: 300px; background: #cbd5e1; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; font-weight: 600; color: #475569;
}
.text-block p {padding: 5px 0;}
.btn-link { color: var(--primary); text-decoration: none; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; }
/* ==========================================
   PHILOSOPHY & CONTENT STYLES (Desktop / Base)
   ========================================== */

/* Your existing .text-block styles here... */

/* --- ADD THE SMART CSS HERE --- */
.text-block ul {
    list-style: none;
    padding-left: 20px;
    margin: 20px 0;
}

.text-block ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    font-weight: 500;
}

.text-block ul li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #4EC3B6;
    position: absolute;
    left: 0;
    top: 0;
}
/* Hide legacy <i> icon tags inside lists so they don't double up */
.text-block ul li i {
    display: none;
}


/* ==========================================
   MOBILE RESPONSIVE TWEAKS (< 768px)
   (Keep this at the very bottom!)
   ========================================== */
@media (max-width: 768px) {
    /* Mobile tweaks sit here */
}
/* Six-Treatment Grid Frame */
.treatments-six-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.service-card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.card-img { height: 200px; background-size: cover; background-position: center; }
.card-body { padding: 25px; text-align: center; }

/* Deep Dive Custom Elements */
.tag { background: var(--text-dark); color: #fff; padding: 5px 10px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; display: inline-block; }
.grid-bullets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.deep-dive-approach { background: #fff; padding: 20px; border-radius: 6px; border-top: 3px solid var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.styled-step-list { margin-top: 15px; padding-left: 20px; }
.styled-step-list li { margin-bottom: 8px; font-weight: 500; }

/* Horizontal Review Sliders */
.testimonial-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 20px; padding-bottom: 20px; margin-top: 30px; }
.testimonial-slider::-webkit-scrollbar { height: 6px; }
.testimonial-slider::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
.testimonial-item { min-width: 350px; flex: 0 0 auto; background: white; padding: 30px; border-radius: 10px; scroll-snap-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
/* 1. Constrain the width & center the item */
.testimonial-item {
    max-width: 600px; /* Adjust between 500px and 650px to taste */
    margin: 0 auto;   /* Centers the box cleanly */
    padding: 20px;
    text-align: center;
}

/* 2. Handle verbose quotes with CSS Line Clamping */
.testimonial-item p {
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Maximum lines to show before adding "..." */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Specialized Team Configurations */
.team-segment { background: white; padding: 30px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.02); margin-bottom: 25px; }
.team-segment h3 { border-bottom: 2px solid #edf2f7; padding-bottom: 10px; margin-bottom: 25px; font-size: 1.3rem; }
.team-sub-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-member-link { text-decoration: none; color: inherit; display: block; }
.team-member-card { text-align: center; transition: transform 0.2s ease; }
.team-member-link:hover .team-member-card { transform: translateY(-4px); }
.team-member-card img { width: 100%; max-width: 180px; height: 180px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; border: 5px solid white; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.dog-placeholder { width: 150px; height: 150px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: #a0aec0; margin: 0 auto 15px; }
.role { color: var(--primary); font-size: 0.9rem; font-weight: 600; display: block; margin-top: 5px; }

/* Unified, high-contrast form fields */
.simple-form input, 
.simple-form select.form-select { 
    width: 100%; 
    padding: 12px 15px; 
    margin-bottom: 20px; /* Forces clear, uniform spacing down the stack */
    border: 1px solid #cbd5e0; 
    border-radius: 6px; 
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--white);
    font-size: 0.95rem;
    display: block;
    appearance: none; /* Cleans up default mobile operating system styling flags */
}

/* Add custom arrow padding back specifically for the dropdown menu */
.simple-form select.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    padding-right: 40px;
}

/* Ensures the submit button sits comfortably away from the fields */
.simple-form button.btn-block {
    margin-top: 5px;
    padding: 14px;
    font-size: 1rem;
    border-radius: 6px;
}

/* Footers and Partners */
/* --- PROUD PARTNERS LOGO STRIP --- */

.partners-strip { 
    padding: 40px 0; 
    border-top: 1px solid #edf2f7; 
    border-bottom: 1px solid #edf2f7; 
    background-color: var(--white);
}

/* --- PARTNER LOGO EQUALIZER --- */

.partner-logos { 
    display: flex; 
    justify-content: center; 
    align-items: center;     
    flex-wrap: wrap; 
    gap: 40px; /* Generous spacing so they have room to breathe */
    padding: 20px 0;
}

/* Target the images directly (or wrap them in a .partner div if needed) */
.partner-logos img,
.partner-logos .partner img { 
    width: 140px;         /* CRITICAL: Fixed width boundary */
    height: 50px;         /* CRITICAL: Fixed height boundary */
    object-fit: contain;  /* THE MAGIC: Prevents squishing, scales logo perfectly inside the box */
    
    /* Center the logo inside its invisible bounding box */
    display: block;
    margin: 0 auto;

    /* Keeping your premium aesthetic filters from earlier */
    opacity: 0.55; 
    filter: grayscale(100%); 
    transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Smooth color transition on hover */
.partner-logos img:hover,
.partner-logos .partner img:hover { 
    opacity: 1; 
    filter: grayscale(0%); 
}

/* Responsive adjustment for mobile screens */
@media (max-width: 768px) {
    .partner-logos { 
        gap: 25px; 
    }
    .partner-logos img,
    .partner-logos .partner img { 
        width: 100px;     /* Slightly smaller bounding boxes on phones */
        height: 35px; 
    }
}

.small-label {margin-bottom: 15px;}




/* Responsive adjustment for mobile screens */
@media (max-width: 768px) {
    .partner-logos { 
        gap: 30px; /* Tighten gaps so they don't force too many rows */
    }
    .partner-logos img { 
        height: 28px; /* Slightly smaller on phones */
        max-width: 120px;
    }
}
.main-footer { background: var(--primary); color: white; padding: 40px 0; font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.main-footer a { color: white; text-decoration: none; margin: 0 10px; }

/* --- RESPONSIVE SYSTEMS AND PROTECTION GATES --- */
@media (max-width: 1024px) {
    .treatments-six-grid { grid-template-columns: 1fr 1fr; }
    .team-sub-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile responsive protection wrap */
@media (max-width: 768px) {
    .inline-widget-row {
        flex-direction: column; /* Stacks them on mobile so they don't collide */
        gap: 15px;
        align-items: center;
    }
}

@media (max-width: 768px) {
    
    /* --- FIX THE BANNER BLOWOUT --- */
    /* Target whatever your white hero text card class is named (e.g., .hero-content or .hero-badge) */
    .hero-content, 
    .hero-text-box,
    [class*="hero-"] { 
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: 100% !important; /* Forces it to respect the phone screen boundaries */
        box-sizing: border-box !important; /* Includes the padding in the width calculation */
        margin: 20px 0 !important;
    }

    /* --- GLOBAL VIEWPORT INSURANCE SHIELD --- */
    /* This completely cuts off any stray horizontal scrolls dead in their tracks */
    html, body {
        width: 100%;
        overflow-x: hidden; /* Stops the screen from being dragged side-to-side */
        -webkit-overflow-scrolling: touch;
    }
    
    /* --- FIX BANNER HEADING CLIPPING --- */
    .hero-content h1,
    .hero-text-box h1,
    [class*="hero-"] h1 {
        font-size: 21px !important;   /* Downsizes the massive desktop font to fit mobile view screens smoothly */
        line-height: 1.25 !important; /* Prevents stacked words from colliding or overlapping */
        padding-top: 5px !important; /* Pushes the first word down so the top of the letters don't clip */
        margin-bottom: 10px !important;
    }
    
    /* Slight adjustment to the paragraph text below it if needed */
    .hero-content p,
    .hero-text-box p,
    [class*="hero-"] p {
        font-size: 15px !important;
        line-height: 1.5 !important;
    }
}

@media (max-width: 768px) {
    /* MOBILE NAV SYSTEM FIX: Fully isolates variables to stop cascading open bug */
    .header-inner-centered { flex-direction: row; justify-content: space-between; padding: 10px 20px; }
    .logo-centered img { height: 55px; }
    .mobile-menu-toggle { display: block; }
    
    .centered-nav ul { 
        display: none; /* Safely forces closed state until active wrapper appended */
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: white; 
        padding: 20px; 
        box-shadow: 0 5px 10px rgba(0,0,0,0.1); 
        gap: 15px;
    }
    .centered-nav ul.active { display: flex !important; }
    
    
    
    .hero { margin-top: 85px; height: auto; padding: 60px 0; }
    .split-layout { flex-direction: column; }
    .treatments-six-grid { grid-template-columns: 1fr; }
    .team-sub-grid { grid-template-columns: 1fr; }
    .grid-bullets { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 15px; text-align: center; }
    
    /* Mobile Fixed Action Footer Rail */
    .floating-action-sidebar {
        position: fixed; bottom: 0; top: auto; left: 0; right: 0;
        transform: none; width: 100%; flex-direction: row; gap: 0;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
    }
    .floating-action-sidebar .btn-primary {
        background-color: var(--primary) !important; /* Vivid brand teal */
        color: white !important;
    }
    
    .floating-action-sidebar .btn-teal {
        background-color: #2c7a7b !important; /* Deepened slate-teal to break up the solid block line */
        color: white !important;
    }
    
    .floating-action-sidebar .btn-light-teal {
        background-color: #f0fff4 !important; /* Very soft Mint White background */
        color: #234e52 !important; /* Deep forest green-teal text for strong contrast */
        border: none !important;
    }
    .float-btn { flex: 1; border-radius: 0; box-shadow: none; font-size: 0.7rem; padding: 12px 5px; }
    .float-btn:hover { transform: none; }
    body { padding-bottom: 55px; }
}

/* ==========================================
   MOBILE RESPONSIVE TWEAKS (< 768px)
   ========================================== */
@media (max-width: 768px) {

    /* 1. Headings (already working well) */
    h1, .section-title {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 12px;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.25;
    }

    /* 2. Constrain Testimonial Container */
    .testimonial-slider {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 0 10px !important;
    }

    .testimonial-item {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important; /* Overrides default flexbox item min-width */
        box-sizing: border-box !important;
        padding: 20px 15px !important;
        margin: 0 auto !important;
    }

    /* 3. Scale down giant quote text */
    .testimonial-item p,
    .testimonial-item blockquote,
    .testimonial-item .lead {
        font-size: 1rem !important; /* Tames giant desktop font size */
        line-height: 1.5 !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .testimonial-item .author {
        font-size: 0.9rem !important;
    }
}