/* ========================================
   MOAKES HEATING & PLUMBING - MASTER STYLESHEET
   Color Palette:
   - Primary: #B91C1C (Deep burgundy red)
   - Secondary: #2C2C2C (Charcoal grey)
   - Accent: #D4AF37 (Gold)
   - Neutral: #FFFFFF, #F3F4F6
   - Text: #1F2937
======================================== */

/* ========================================
   RESET & BASE STYLES
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1F2937;
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #B91C1C;
    color: #FFFFFF;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-weight: 700;
}

.skip-link:focus {
    top: 0;
}

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

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: #B91C1C;
}

.highlight {
    background: linear-gradient(120deg, #FEF3C7 0%, #FEF3C7 100%);
    background-repeat: no-repeat;
    background-size: 100% 40%;
    background-position: 0 85%;
    padding: 0.2rem 0;
}

/* ========================================
   BUTTONS
======================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #B91C1C;
    color: #FFFFFF;
    box-shadow: 0 4px 6px rgba(185, 28, 28, 0.3);
}

.btn-primary:hover {
    background: #991b1b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(185, 28, 28, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
}

.btn-secondary:hover {
    background: #FFFFFF;
    color: #2C2C2C;
}

.btn-outline {
    background: transparent;
    color: #B91C1C;
    border: 2px solid #B91C1C;
}

.btn-outline:hover {
    background: #B91C1C;
    color: #FFFFFF;
}

.btn-outline-light {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
}

.btn-outline-light:hover {
    background: #FFFFFF;
    color: #B91C1C;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

.btn-header {
    background: #B91C1C;
    color: #FFFFFF;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

/* Focus indicators for accessibility */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 3px solid #D4AF37;
    outline-offset: 3px;
}

input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #B91C1C;
    outline-offset: 2px;
}

/* ========================================
   FIXED HEADER
======================================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #2C2C2C;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    animation: logoGlow 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(185, 28, 28, 0.6));
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(185, 28, 28, 0.6)); }
    50% { filter: drop-shadow(0 0 16px rgba(185, 28, 28, 0.9)); }
}

.flame-icon {
    font-size: 1.5rem;
    animation: flicker 2s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: #D1D5DB;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #D4AF37;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #FFFFFF;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #2C2C2C;
    flex-direction: column;
    padding: 1rem;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.mobile-nav a {
    color: #FFFFFF;
    padding: 1rem;
    border-bottom: 1px solid #444;
    font-weight: 500;
}

.mobile-nav.active {
    display: flex;
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    background: #F3F4F6;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: center;
    padding: 0;
    max-width: 100%;
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-content {
    background: #2C2C2C;
    padding: 4rem 3rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.hero-subtitle {
    color: #D1D5DB;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.trust-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.75rem;
    border-radius: 6px;
}

.badge-icon {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.badge-text {
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ========================================
   TRUST STATS BAR
======================================== */
.trust-stats {
    background: #1F2937;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-box {
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: #D4AF37;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #D1D5DB;
    font-size: 1rem;
    font-weight: 500;
}

/* ========================================
   ABOUT BAILEY SECTION
======================================== */
.about-bailey {
    padding: 6rem 0;
    background: #FFFFFF;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-image {
    position: sticky;
    top: 100px;
}

.profile-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    box-shadow: 0 10px 30px rgba(185, 28, 28, 0.3);
    border: 5px solid #B91C1C;
}

.profile-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, #B91C1C, #991b1b);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(185, 28, 28, 0.3);
}

.profile-placeholder svg {
    width: 150px;
    height: 150px;
    color: rgba(255,255,255,0.9);
}

.about-text p {
    font-size: 1.1rem;
    color: #4B5563;
    line-height: 1.8;
}

/* ========================================
   SERVICES SECTION
======================================== */
.services {
    padding: 6rem 0;
    background: #F3F4F6;
}

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

.service-box {
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.service-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(185, 28, 28, 0.2);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #B91C1C;
}

.service-box h3 {
    color: #1F2937;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.service-box p {
    color: #6B7280;
    margin: 0;
}

/* ========================================
   TESTIMONIALS CAROUSEL
======================================== */
.testimonials {
    padding: 6rem 0;
    background: #B91C1C;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
}

.testimonials h2 {
    color: #FFFFFF;
}

.carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 2rem;
}

.testimonial-card {
    min-width: 100%;
    background: rgba(255,255,255,0.1);
    padding: 3rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.stars {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.testimonial-text {
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

.testimonial-author {
    font-weight: 600;
    color: #FEF3C7;
    margin: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: #FFFFFF;
    border: none;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: -60px;
}

.carousel-btn.next {
    right: -60px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: #FFFFFF;
    transform: scale(1.3);
}

.reviews-cta {
    text-align: center;
}

/* ========================================
   WHY MOAKES SECTION
======================================== */
.why-moakes {
    padding: 6rem 0;
    background: #FFFFFF;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.benefit-box {
    text-align: center;
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: #D4AF37;
    color: #FFFFFF;
    font-size: 2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.benefit-box h3 {
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.benefit-box p {
    color: #6B7280;
    margin: 0;
}

/* ========================================
   ACCREDITATIONS SECTION
======================================== */
.accreditations {
    padding: 6rem 0;
    background: #2C2C2C;
    color: #FFFFFF;
}

.accreditations h2 {
    color: #FFFFFF;
}

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

.accreditation-box {
    text-align: center;
}

.accreditation-badge {
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #D4AF37;
}

.badge-large {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.accreditation-badge h3 {
    color: #D4AF37;
    margin-bottom: 0.5rem;
}

.license {
    color: #D1D5DB;
    margin: 0;
}

.accreditation-note {
    text-align: center;
    font-size: 1.1rem;
    color: #D1D5DB;
    margin: 0;
}

/* ========================================
   COVERAGE MAP SECTION
======================================== */
.coverage {
    padding: 6rem 0;
    background: #F3F4F6;
}

.coverage-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.coverage-map iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 12px;
}

.coverage-info h3 {
    color: #1F2937;
    margin-bottom: 1rem;
}

.coverage-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.coverage-list li {
    color: #4B5563;
    padding: 0.5rem;
    background: #FFFFFF;
    border-radius: 6px;
    font-weight: 500;
}

.coverage-list li::before {
    content: "📍 ";
}

.postcodes {
    font-size: 1.1rem;
    color: #B91C1C;
    font-weight: 700;
    margin-bottom: 2rem;
}

.coverage-note {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1F2937;
    background: #FFFFFF;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #B91C1C;
    margin: 0;
}

/* ========================================
   EMERGENCY CTA BANNER
======================================== */
.emergency-cta {
    padding: 5rem 0;
    background: #B91C1C;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
}

.emergency-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.8) 0%, rgba(185, 28, 28, 1) 100%);
    animation: emergencyPulse 3s ease-in-out infinite;
}

@keyframes emergencyPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.emergency-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.emergency-content h2 {
    color: #FFFFFF;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.emergency-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #FEF3C7;
}

.emergency-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.emergency-phone {
    font-size: 2.5rem;
    font-weight: 900;
    color: #FFFFFF;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.emergency-phone:hover {
    transform: scale(1.05);
    color: #FEF3C7;
}

.emergency-email {
    font-size: 1.2rem;
    color: #FFFFFF;
    text-decoration: underline;
    transition: all 0.3s;
}

.emergency-email:hover {
    color: #FEF3C7;
}

.emergency-note {
    font-size: 1rem;
    color: #FEF3C7;
    margin: 0;
}

/* ========================================
   FOOTER
======================================== */
.footer {
    background: #2C2C2C;
    color: #D1D5DB;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: #D4AF37;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-col p, .footer-col a {
    color: #D1D5DB;
    margin-bottom: 0.5rem;
}

.footer-col a:hover {
    color: #D4AF37;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
    color: #D1D5DB;
}

.google-reviews {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
}

.google-reviews a {
    font-weight: 600;
    color: #D4AF37;
}

.accreditations-footer {
    margin-top: 1rem;
}

.accreditations-footer p {
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 0.3rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
}

.footer-bottom p {
    color: #9CA3AF;
    margin: 0;
}

.small {
    font-size: 0.9rem;
}

/* ========================================
   MOBILE FIXED BOTTOM BAR
======================================== */
.mobile-cta-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #B91C1C;
    z-index: 1000;
    padding: 1rem;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.3);
    animation: mobilePulse 2s ease-in-out infinite;
}

@keyframes mobilePulse {
    0%, 100% { box-shadow: 0 -4px 12px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 -4px 20px rgba(185, 28, 28, 0.6); }
}

.mobile-cta-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #FFFFFF;
    color: #B91C1C;
    text-align: center;
    font-weight: 900;
    font-size: 1.1rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1024px) {
    .hero-content {
        max-width: 500px;
        padding: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        position: static;
        display: flex;
        justify-content: center;
    }
    
    .coverage-content {
        grid-template-columns: 1fr;
    }
    
    .carousel-btn.prev {
        left: 10px;
    }
    
    .carousel-btn.next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .nav-menu,
    .btn-header {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero {
        min-height: auto;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .hero-image {
        min-height: 400px;
        order: 1;
    }
    
    .hero-content {
        order: 2;
        padding: 2rem 1.5rem;
    }
    
    .trust-badges {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .coverage-list {
        grid-template-columns: 1fr;
    }
    
    .emergency-contact {
        flex-direction: column;
        gap: 1rem;
    }
    
    .emergency-phone {
        font-size: 1.8rem;
    }
    
    .mobile-cta-bar {
        display: block;
    }
    
    body {
        padding-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .profile-placeholder {
        width: 200px;
        height: 200px;
    }
    
    .profile-placeholder svg {
        width: 120px;
        height: 120px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .testimonial-card {
        padding: 2rem 1.5rem;
    }
    
    .testimonial-text {
        font-size: 1.1rem;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .carousel-btn.prev {
        left: 5px;
    }
    
    .carousel-btn.next {
        right: 5px;
    }
}

/* ========================================
   UTILITY CLASSES
======================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.hidden {
    display: none;
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Smooth scroll offset for fixed header */
section {
    scroll-margin-top: 80px;
}

/* Loading optimization */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}