/* ========================================
   Residential Surveyor - Main Stylesheet
   Optimized for performance and SEO
   ======================================== */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #1e3a5f;
    --secondary-color: #2c5f8d;
    --accent-color: #d4af37;
    --text-dark: #2c3e50;
    --text-light: #5a6c7d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --success: #28a745;
    --border-color: #e1e8ed;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    max-width: 100vw;
}

/* Better tap highlighting */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p {
    margin-bottom: 1.2rem;
    color: var(--text-light);
    font-size: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header and Navigation */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-btn span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* Animated Hamburger Icon */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.95), rgba(44, 95, 141, 0.9));
    padding: 3rem 0 2rem;
}

/* Hero Video Container */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.75), rgba(44, 95, 141, 0.65));
    z-index: 1;
}

/* Fallback for old hero-background class */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.3;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: start;
    color: var(--white);
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    color: var(--white);
    margin-bottom: 1.25rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    line-height: 1.2;
}

.hero-text p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #e6c24d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Contact Form Styles */
.contact-form-container {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 100px;
}

.contact-form-container h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

.contact-form-container p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* HubSpot Form Overrides */
.hs-form-field {
    margin-bottom: 1rem;
}

.hs-input {
    width: 100% !important;
    padding: 0.75rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    font-size: 1rem !important;
    transition: var(--transition) !important;
}

.hs-input:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1) !important;
}

.hs-button {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    padding: 1rem 2rem !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
    width: 100% !important;
}

.hs-button:hover {
    background-color: var(--secondary-color) !important;
    transform: translateY(-2px) !important;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
}

.card p {
    font-size: 0.95rem;
}

/* Features Section */
.features {
    background-color: var(--bg-light);
}

.feature-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
}

.feature-icon {
    width: 30px;
    height: 30px;
    background-color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

/* Reviews/Testimonials */
.review-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.review-stars {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.review-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
}

.author-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.author-info p {
    font-size: 0.85rem;
    margin: 0;
}

/* Team Members */
.team-member {
    text-align: center;
}

.team-member img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.team-member h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.team-role {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Blog Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
    display: block;
}

.blog-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.blog-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.blog-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.blog-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--accent-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Blog Article Page */
.article-header {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background-color: var(--white);
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--bg-light);
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* Services Styling */
.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.service-detail:nth-child(even) {
    direction: rtl;
}

.service-detail:nth-child(even) > * {
    direction: ltr;
}

.service-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

/* Areas Coverage */
.areas-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.area-item {
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
}

.area-item:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: #ffffff !important;
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 1;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-weight: 500;
}

.footer-bottom p {
    color: #ffffff !important;
    opacity: 1 !important;
}

.accreditations {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.accreditation-badge {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff !important;
}

/* Tables Responsive */
table {
    width: 100%;
    border-collapse: collapse;
}

.cost-table {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cost-table th,
.cost-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.cost-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.cost-table tbody tr:hover {
    background-color: var(--bg-light);
}

/* CTA Box Styling */
.cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.cta-box h3 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-box .btn {
    margin: 0.5rem;
}

/* Related Articles */
.related-articles {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
}

.related-articles h3 {
    margin-bottom: 1.5rem;
}

.related-articles ul {
    list-style: none;
    margin: 0;
}

.related-articles li {
    margin-bottom: 1rem;
}

.related-articles a {
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-articles a::before {
    content: '→';
    color: var(--accent-color);
}

.related-articles a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Lead Paragraph */
.lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Extra Large Desktops: 1400px+ */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-content {
        max-width: 1400px;
    }
}

/* Large Laptops: max-width 1200px */
@media (max-width: 1200px) {
    .container {
        padding: 3rem 2rem;
    }
    
    .hero-content {
        gap: 2rem;
    }
}

/* Medium Laptops and Tablets: max-width 968px */
@media (max-width: 968px) {
    /* Navigation - Mobile Menu */
    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        max-width: 100vw;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0.5rem;
        z-index: 999;
        height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 8px;
        transition: var(--transition);
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background-color: var(--bg-light);
        color: var(--primary-color);
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Hero Section - Tablet */
    .hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        padding: 3rem 1.5rem;
        gap: 2.5rem;
        text-align: center;
    }
    
    .hero-text {
        order: 1;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .contact-form-container {
        position: static;
        margin-top: 2rem;
        order: 2;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Grid Layouts */
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Service Details */
    .service-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-detail:nth-child(even) {
        direction: ltr;
    }
    
    .service-image {
        height: 300px;
    }

    /* Blog Grid */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Features Grid */
    .feature-grid,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Areas List */
    .areas-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Tablets: max-width 768px */
@media (max-width: 768px) {
    /* Typography Scaling */
    html {
        font-size: 15px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    /* Container Spacing */
    .container {
        padding: 2.5rem 1.5rem;
    }
    
    .section {
        padding: 3.5rem 0;
    }
    
    /* Navigation */
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    /* Hero Video - Hide on mobile for performance */
    .hero-video,
    .hero-video-container {
        display: none;
    }
    
    .hero {
        background: linear-gradient(135deg, rgba(30, 58, 95, 0.95), rgba(44, 95, 141, 0.9)),
                    url('../images/hero-properties.jpg') center/cover;
    }
    
    /* Forms */
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .contact-form-container h3 {
        font-size: 1.3rem;
    }
    
    /* Blog Article */
    .article-content {
        font-size: 1rem;
    }
    
    .article-image {
        max-height: 350px;
    }
    
    /* FAQ */
    .faq-question {
        padding: 1.25rem;
        font-size: 1rem;
    }
    
    .faq-answer-content {
        padding: 0 1.25rem 1.25rem;
    }
    
    /* CTA Box */
    .cta-box {
        padding: 2.5rem 2rem;
    }
    
    .cta-box h3 {
        font-size: 1.5rem;
    }
    
    /* Cards */
    .card {
        padding: 1.5rem;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    /* Tables - Horizontal Scroll */
    .cost-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .cost-table th,
    .cost-table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Small Mobile Landscape: max-width 600px */
@media (max-width: 600px) {
    /* Typography */
    html {
        font-size: 15px;
    }
    
    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Container and Sections */
    .container {
        padding: 2rem 1rem;
    }

    .section {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* Hero Section - Mobile */
    .hero {
        min-height: auto;
        padding: 2rem 0 1.5rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }
    
    /* Buttons - Touch Friendly */
    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
        min-height: 44px;
        text-align: center;
    }
    
    .btn-primary,
    .btn-secondary {
        display: block;
        margin: 0.5rem 0;
    }
    
    /* Contact Form - Mobile */
    .contact-form-container {
        padding: 1.25rem;
        margin: 0 0.5rem;
    }
    
    .contact-form-container h3 {
        font-size: 1.2rem;
    }
    
    /* HubSpot Forms - Mobile Optimization */
    .hs-form-field {
        margin-bottom: 0.75rem !important;
    }
    
    .hs-input {
        padding: 0.7rem !important;
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    .hs-button {
        width: 100% !important;
        padding: 0.85rem !important;
        font-size: 1rem !important;
        min-height: 44px !important;
    }
    
    .hs-form-field label {
        font-size: 0.9rem !important;
    }

    /* All Grid Layouts - Single Column */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    /* Blog Grid */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-card {
        margin-bottom: 1rem;
    }
    
    .blog-title {
        font-size: 1.2rem;
    }
    
    .blog-image {
        height: 200px;
    }
    
    .blog-content {
        padding: 1.25rem;
    }
    
    .blog-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Blog Article Page */
    .article-header {
        margin-bottom: 2rem;
    }
    
    .article-content h1 {
        font-size: 1.5rem;
    }
    
    .article-content h2 {
        font-size: 1.3rem;
        margin-top: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.15rem;
    }
    
    .article-content h4 {
        font-size: 1.05rem;
    }
    
    .article-content ul,
    .article-content ol {
        margin-left: 1.25rem;
    }
    
    .article-image {
        max-height: 250px;
        margin-bottom: 1.5rem;
    }
    
    /* FAQ - Mobile Friendly */
    .faq-item {
        margin-bottom: 0.75rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .faq-answer {
        padding: 0.75rem 1rem;
    }
    
    .faq-icon {
        font-size: 1.25rem;
    }
    
    /* Footer - Mobile Stack */
    .footer {
        padding: 2.5rem 1.5rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 1rem;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
    }
    
    .footer-links {
        text-align: center;
    }
    
    .accreditations {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .accreditation-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        font-size: 0.85rem;
        padding-top: 1.5rem;
    }
    
    /* Service Items */
    .service-item {
        padding: 1.25rem;
    }
    
    .service-icon {
        font-size: 2rem;
    }
    
    .service-item h3 {
        font-size: 1.1rem;
    }
    
    .service-image {
        height: 250px;
    }
    
    /* Feature Items */
    .feature-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon {
        margin-bottom: 0.5rem;
    }
    
    /* Team Members */
    .team-member img {
        aspect-ratio: 1;
    }
    
    /* Areas Coverage */
    .areas-list {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .area-item {
        padding: 0.85rem;
        font-size: 0.95rem;
    }
    
    /* CTA Section */
    .cta-box {
        padding: 2rem 1.5rem;
        border-radius: 10px;
        margin: 1.5rem 0.5rem;
    }
    
    .cta-box h3 {
        font-size: 1.3rem;
    }
    
    .cta-box p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Related Articles */
    .related-articles {
        padding: 1.5rem;
    }
    
    .related-articles h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    /* Review Cards */
    .review-card {
        padding: 1.5rem;
    }
    
    .review-text {
        font-size: 0.95rem;
    }
    
    /* Lead Paragraph */
    .lead {
        font-size: 1.1rem;
    }
    
    /* Cards */
    .card {
        padding: 1.25rem;
    }
    
    .card-image {
        height: 200px;
    }
}

/* Extra Small Mobile Portrait: max-width 480px */
@media (max-width: 480px) {
    /* Typography - Fine Tuning */
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1rem; }
    
    p {
        font-size: 0.95rem;
    }
    
    /* Sections */
    .container {
        padding: 1.5rem 1rem;
    }
    
    .section {
        padding: 2.5rem 0;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 0.95rem;
    }
    
    /* Navigation */
    .logo {
        font-size: 1.3rem;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    
    /* Hero - Extra Small */
    .hero-content {
        padding: 1.5rem 1rem;
    }
    
    .hero-text h1 {
        font-size: 1.35rem;
        line-height: 1.3;
    }
    
    .hero-text p {
        font-size: 0.85rem;
    }
    
    .contact-form-container {
        padding: 1rem;
    }
    
    .contact-form-container h3 {
        font-size: 1.1rem;
    }
    
    .contact-form-container p {
        font-size: 0.85rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Blog */
    .blog-title {
        font-size: 1.1rem;
    }
    
    .blog-image {
        height: 180px;
    }
    
    /* Article */
    .article-content {
        font-size: 0.95rem;
    }
    
    .article-image {
        max-height: 200px;
    }
    
    /* FAQ */
    .faq-question {
        padding: 0.85rem;
        font-size: 0.9rem;
    }
    
    .faq-answer-content {
        padding: 0 0.85rem 0.85rem;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 1rem 0.75rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.9rem;
    }
    
    .accreditation-badge {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
    
    /* CTA Box */
    .cta-box {
        padding: 1.5rem 1rem;
    }
    
    .cta-box h3 {
        font-size: 1.2rem;
    }
    
    .cta-box p {
        font-size: 0.95rem;
    }
    
    /* Service Image */
    .service-image {
        height: 220px;
    }
    
    /* Tables - Better Mobile View */
    .cost-table th,
    .cost-table td {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    /* Review Cards */
    .review-card {
        padding: 1.25rem;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .author-info h4 {
        font-size: 0.95rem;
    }
    
    .author-info p {
        font-size: 0.8rem;
    }
}

/* Loading and Performance Optimizations */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cta-buttons,
    .contact-form-container {
        display: none;
    }

    body {
        font-size: 12pt;
    }
}
