/* ===== PRISTINE PROPERTY MASTERS - MAIN STYLESHEET ===== */

/* CSS Reset & Base Styles */
/* ======================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Fixed sticky header and prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Ensure header is sticky on all devices */
.header {
    background: var(--clr-text-light) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

/* Fix mobile layouts */
@media (max-width: 767px) {
    .header {
        position: -webkit-sticky !important; /* iOS Safari support */
    }
    
    .container {
        max-width: 100%;
        width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Prevent content from expanding beyond viewport */
    .services-grid,
    .reviews-grid,
    .gallery-grid,
    .areas-grid,
    .contact-grid,
    .footer-content {
        width: 100%;
        max-width: 100%;
    }
}

/* Services section - blue glass card override */
.services .card--glass {
    background: rgba(70, 90, 120, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
    .services .card--glass {
        background: rgba(70, 90, 120, 0.85);
    }
}

.services .card--glass:hover {
    background: rgba(70, 90, 120, 0.55);
    border-color: rgba(255, 214, 10, 0.3);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 214, 10, 0.1);
}

/* Services card text - white on blue glass */
.services .card--glass .service-title {
    color: #fff;
    opacity: 0.98;
}

.services .card--glass .service-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Why Choose section - maintain site width */
.why-choose-panel {
    max-width: 1200px !important;
}

/* Light section wrapper - visual reset between navy sections */
.section--light {
    background: linear-gradient(180deg, #EAF2FA 0%, #F5F7FB 100%);
    padding: 5rem 0;
    position: relative;
}

.section--light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(10, 35, 66, 0.1);
}

.section--light::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(10, 35, 66, 0.1);
}

/* Typography on light surface */
.section--light h2,
.section--light h3 {
    color: #0A2342 !important;
}

.section--light p,
.section--light .about-description,
.section--light .trust-rating,
.section--light .feature-content {
    color: #1A1A1A !important;
}

/* Glassy blue panel inside light section */
.section--light .why-choose-panel {
    background: rgba(70, 90, 120, 0.15) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(70, 90, 120, 0.2) !important;
    box-shadow: 0 8px 32px rgba(10, 35, 66, 0.08), 0 0 0 1px rgba(70, 90, 120, 0.05) !important;
}

/* Feature cards - light translucent blue to match panel */
.section--light .feature-card {
    background: rgba(70, 90, 120, 0.08) !important;
    border: 1px solid rgba(70, 90, 120, 0.15) !important;
    box-shadow: 0 2px 8px rgba(10, 35, 66, 0.05) !important;
}

.section--light .feature-card .feature-title {
    color: #0A2342 !important;
}

/* Yellow accents only */
.section--light .section-title::after {
    background: #FFD60A !important;
}

.section--light .trust-rating .stars {
    color: #FFD60A !important;
}

/* Responsive padding */
@media (max-width: 1024px) {
    .section--light {
        padding: 4.5rem 0;
    }
}

@media (max-width: 768px) {
    .section--light {
        padding: 3.5rem 0;
    }
}

@media (max-width: 480px) {
    .section--light {
        padding: 2.5rem 0;
    }
}

/* A) Why Choose - mobile rating layout */
.section--light .trust-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

@media (max-width: 480px) {
    .section--light .trust-rating {
        flex-direction: column;
        gap: 8px;
    }
}

@media (min-width: 768px) {
    .section--light .trust-rating {
        flex-direction: row;
        gap: 12px;
    }
}

/* B) Why Choose - enhanced glass feature cards */
.section--light .feature-card {
    background: rgba(70, 90, 120, 0.15) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    padding: 24px 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
    .section--light .feature-card {
        background: rgba(70, 90, 120, 0.85) !important;
    }
}

.section--light .feature-card:hover {
    transform: translateY(-4px) !important;
    background: rgba(70, 90, 120, 0.2) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Enhanced feature card icons */
.section--light .feature-card .feature-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: rgba(255, 214, 10, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    margin: 0 auto 16px auto !important;
    transition: all 0.3s ease !important;
}

.section--light .feature-card:hover .feature-icon {
    background: rgba(255, 214, 10, 0.15) !important;
    transform: scale(1.05) !important;
}

@media (min-width: 768px) {
    .section--light .feature-card {
        padding: 28px 24px !important;
    }
}

/* C) Proudly Serving - equal-size city buttons */
.service-areas-panel .areas-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
}

.service-areas-panel .areas-grid .area-link {
    width: 100% !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 12px 16px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    .service-areas-panel .areas-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        max-width: 600px !important;
        margin: 0 auto !important;
    }
    
    .service-areas-panel .areas-grid .area-link {
        min-width: 140px !important;
    }
}

@media (max-width: 480px) {
    .service-areas-panel .areas-grid .area-link {
        white-space: normal !important;
        line-height: 1.2 !important;
        padding: 10px 12px !important;
        min-height: 52px !important;
    }
}

/* D) Testimonials - improved readability */
.reviews .section-title {
    color: #0A2342 !important;
    text-shadow: none !important;
    letter-spacing: 0.3px !important;
}

.reviews .review-card {
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    border-radius: 16px !important;
    padding: 24px !important;
}

.reviews .review-card .review-author {
    color: #0A2342 !important;
    text-shadow: none !important;
    font-weight: 500 !important;
}

.reviews .review-card .review-stars {
    color: #FFD60A !important;
    font-size: 1rem !important;
    margin-bottom: 12px !important;
}

/* Gallery grid - 4×2 desktop, 1 column mobile */
.gallery-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    margin-bottom: 2rem !important;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.5rem !important;
    }
}


/* Mobile Free Quote button */
.mobile-quote-btn {
    display: none;
    background: var(--clr-accent);
    color: var(--clr-text-dark);
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.mobile-quote-btn:hover {
    background: var(--clr-accent-hover);
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .mobile-quote-btn {
        display: flex;
    }
    
    .mobile-right-group {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    background: var(--clr-accent);
    color: var(--clr-text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px;
    padding: 12px 20px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0.9;
    white-space: nowrap;
}

.floating-cta:hover,
.floating-cta:focus {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    background: var(--clr-accent-hover);
}

.floating-cta:focus-visible {
    outline: 3px solid var(--clr-primary);
    outline-offset: 2px;
}

/* Desktop positioning */
@media (min-width: 768px) {
    .floating-cta {
        bottom: 2rem;
        right: 2rem;
    }
}

/* Mobile positioning */
@media (max-width: 767px) {
    .floating-cta {
        bottom: calc(1.5rem + env(safe-area-inset-bottom));
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.85rem;
        padding: 10px 18px;
    }
    
    .floating-cta:hover,
    .floating-cta:focus {
        transform: translateX(-50%) translateY(-2px);
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .floating-cta {
        transition: none;
    }
    
    .floating-cta:hover,
    .floating-cta:focus {
        transform: none;
    }
    
    @media (max-width: 767px) {
        .floating-cta:hover,
        .floating-cta:focus {
            transform: translateX(-50%);
        }
    }
}

/* Quote section scroll offset */
#quote {
    scroll-margin-top: 2rem;
    scroll-margin-bottom: 2rem;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Typography */
/* ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: #004499;
    text-decoration: underline;
}

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

/* Buttons & Forms */
button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

textarea {
    overflow: auto;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section Sizing Rules */
/* ========================= */
.hero {
    min-height: 100vh;
    min-height: 100dvh; /* Modern browsers */
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height, 64px) + env(safe-area-inset-top) + 12px);
        padding-bottom: 2rem;
    }
}

@media (min-width: 1536px) {
    .hero {
        min-height: 75vh;
    }
}

/* Responsive Design */
/* ================= */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 0.75rem;
    }
    
    /* Hero CTA spacing */
    .hero-cta {
        margin-bottom: 0.75rem;
    }
    
    .hero-reassurance {
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(1.6rem, 6vw, 2rem);
        line-height: 1.25;
    }
}

@media (max-width: 375px) {
    .hero {
        padding-top: calc(var(--header-height, 64px) + env(safe-area-inset-top) + 32px);
        padding-bottom: 2.5rem;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 5.5vw, 1.9rem);
        line-height: 1.2;
        margin-bottom: 0.75rem;
        margin-top: 0.5rem;
    }
}

/* Component-specific styles will be added as pages are built */

/* ===== CONTACT PAGE STYLES ===== */

/* Contact Hero Section */
.contact-hero {
    background: linear-gradient(135deg, var(--clr-primary) 0%, #1a3a5c 50%, var(--clr-primary) 100%);
    color: var(--clr-text-light);
    padding: 3rem 0 2rem;
    text-align: center;
}

.contact-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.contact-hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Contact Form Section */
.contact-form-section {
    background: var(--clr-light);
    padding: 3rem 0;
}

.contact-form {
    background: var(--clr-text-light);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--clr-text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--clr-accent);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    width: 100%;
    margin-top: 1rem;
}

.form-reassurance {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Alternative Contact Methods */
.contact-methods {
    background: var(--clr-text-light);
    padding: 3rem 0;
}

.contact-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-method-card {
    background: var(--clr-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.contact-method-card:hover {
    transform: translateY(-4px);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.contact-method-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--clr-primary);
}

.contact-link {
    color: var(--clr-accent);
    text-decoration: none;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

/* Service Areas Section */
.service-areas {
    background: linear-gradient(135deg, var(--clr-primary) 0%, #1a3a5c 50%, var(--clr-primary) 100%);
    padding: 4rem 0;
    text-align: center;
}

.service-areas .section-title {
    color: var(--clr-text-light);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.service-areas .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--clr-accent);
    margin: 1rem auto;
    border-radius: 2px;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto 0;
}

.area-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--clr-text-dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.area-link:hover {
    background: var(--clr-accent);
    color: var(--clr-text-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 214, 10, 0.3);
    border-color: var(--clr-accent);
}

.area-icon {
    font-size: 1rem;
    opacity: 0.8;
}

/* Trust Section */
.trust-section {
    background: var(--clr-light);
    padding: 4rem 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.review-card {
    background: var(--clr-text-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.review-text {
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.review-author {
    font-weight: 500;
    color: var(--clr-primary);
}

.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--clr-primary);
}

.trust-badge-icon {
    font-size: 1.5rem;
}

/* Contact Page Mobile Responsive */
@media (max-width: 768px) {
    .contact-hero-title {
        font-size: 2rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 400px;
    }

    .form-submit {
        width: 100%;
    }
}

@media (min-width: 769px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .form-submit {
        width: auto;
        justify-self: end;
    }
}

@media (max-width: 480px) {
    .areas-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }

    .contact-hero {
        padding: 2rem 0 1.5rem;
    }

    .contact-hero-title {
        font-size: 1.75rem;
    }
}