/*
Theme Name: MAK Plumbing and Heating
Theme URI: https://makplumbing.uk
Author: MAK Plumbing
Description: Professional WordPress theme for MAK Plumbing - V2.0 Optimized
Version: 2.0.0
*/

/* =========================================
   1. RESET & VARIABLES
   ========================================= */
:root {
    --primary-color: #1e40af;
    --secondary-color: #dc2626;
    --accent-color: #f97316;
    --dark-text: #1f2937;
    --light-text: #6b7280;
    --background: #ffffff;
    --section-bg: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --star-color: #fbbf24;
    --hero-text-color: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

html, body {
    overflow-x: clip;
    width: 100%;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* BIGGER TEXT FIX */
    font-size: 18px; 
    line-height: 1.7;
    
    color: var(--dark-text);
    background: var(--background);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1rem;
}
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}
.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: var(--light-text);
    margin-bottom: 3rem;
}

/* =========================================
   2. HEADER & STICKY NAVIGATION
   ========================================= */
.site-header {
    position: -webkit-sticky;
    position: sticky;
    top: -42px; /* Hides the blue bar on scroll */
    width: 100%;
    z-index: 99999;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Fix for Admin Bar */
body.admin-bar .site-header { top: -10px; }

.header-top {
    background: var(--primary-color);
    color: white;
    padding: 8px 0;
    height: 42px;
    overflow: hidden;
}

.header-contact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.main-navigation { background: white; }

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

.site-logo {
    height: 72px;
    width: auto;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}
.nav-menu a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 600;
    transition: color 0.3s;
    font-size: 1rem;
}
.nav-menu a:hover { color: var(--primary-color); }

/* Header Buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cta-button {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.cta-button:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

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

/* Gas Safe Logo in Header */
.nav-actions img.gas-safe-badge {
    width: 60px;
    height: auto;
    object-fit: contain;
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-text);
    margin: 3px 0;
    transition: 0.3s;
}
.mobile-menu-toggle.menu-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.menu-open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.menu-open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--hero-text-color);
}
.hero-subtitle {
    font-size: 1.3rem; /* Bigger subtitle */
    margin-bottom: 2rem;
}
.hero-cta-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}
.hero-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.hero-image img {
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

/* =========================================
   4. CONTENT GRIDS (DESKTOP FIX)
   ========================================= */
/* Default Grid (Mobile) */
.services-grid, 
.testimonials-grid, 
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 3rem;
}

/* DESKTOP GRID RESTORATION (Forces rows) */
@media screen and (min-width: 769px) {
    .services-grid, 
    .testimonials-grid,
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 Columns side-by-side */
    }
    
    .trust-grid {
        grid-template-columns: repeat(4, 1fr) !important; /* 4 Columns */
    }
    
    .pricing-table {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 Columns pricing */
        gap: 20px;
    }
}

/* Card Styling */
.service-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}
.service-card img,
.gallery-item img {
    width: 100%;
    height: 250px; /* Fixed height for images so they align */
    object-fit: cover;
}
.service-card-title {
    font-size: 1.3rem;
    margin: 1rem 1.5rem 0.5rem;
    color: var(--primary-color);
}
.service-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 1.5rem;
}
.service-description {
    padding: 0.5rem 1.5rem;
    color: var(--light-text);
    flex-grow: 1; /* Pushes button down */
}
.service-cta {
    display: inline-block;
    padding: 0.5rem 1.5rem 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Trust Signals */
.trust-signals {
    padding: 60px 0;
    background: var(--section-bg);
}
.trust-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 3rem;
}
.trust-card {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

/* Testimonials */
.testimonials-section { padding: 80px 0; background: white; }
.testimonial-card {
    background: var(--section-bg);
    padding: 30px;
    border-radius: 10px;
}
.star { color: var(--star-color); font-size: 1.3rem; }

/* FIX GIANT GOOGLE ICON */
.google-badge svg, .google-badge .google-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    flex-shrink: 0;
}
.google-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Pricing Item */
.pricing-item {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background: white;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Brands */
.brands-section { padding: 60px 0; background: white; }
.brands-title { text-align: center; margin-bottom: 2rem; color: var(--primary-color); }
.brands-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.brands-grid img { height: 50px; width: auto; object-fit: contain; }

/* Main Content Text */
.service-content h2 { font-size: 2.2rem; color: var(--primary-color); margin-bottom: 1rem; }
.service-content h3 { font-size: 1.6rem; color: var(--primary-color); margin-top: 2rem; margin-bottom: 1rem; }
.service-content p { margin-bottom: 1rem; font-size: 1.1rem; }
.service-content ul { margin-left: 20px; margin-bottom: 1.5rem; }

/* =========================================
   5. FOOTER STYLES
   ========================================= */
.site-footer {
    background: var(--dark-text);
    color: white;
    padding: 60px 0 20px;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Cols Desktop */
    gap: 30px;
    margin-bottom: 40px;
}
.footer-column h3 { color: white; margin-bottom: 20px; font-size: 1.2rem; }
.footer-column p { color: #d1d5db; font-size: 1rem; line-height: 1.8; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #d1d5db; text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--accent-color); }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* =========================================
   6. CONTACT FORM 7 STYLES (NEW GRID LAYOUT)
   ========================================= */
.cf7-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Columns for Form */
    gap: 15px;
}
.cf7-grid .full { grid-column: 1 / -1; }

.wpcf7-form label { display: block; font-weight: 600; margin-bottom: 5px; }
.wpcf7-form input, 
.wpcf7-form textarea, 
.wpcf7-form select {
    width: 100%;
    padding: 14px;
    border: 1px solid #9ca3af;
    border-radius: 6px;
    background: #f3f4f6; /* High contrast grey */
    font-size: 1rem;
    color: #000;
}
.wpcf7-form input:focus, 
.wpcf7-form textarea:focus {
    background: #fff;
    border-color: var(--primary-color);
}
.wpcf7-form input[type="submit"] {
    background: var(--secondary-color);
    color: white;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-size: 1.2rem;
}
.wpcf7-form input[type="submit"]:hover { background: #b91c1c; }
.wpcf7-response-output { padding: 10px; margin-top: 10px; border-radius: 5px; background: #fff; }
.wpcf7-spinner { display: none; }

/* =========================================
   7. MOBILE STICKY BAR
   ========================================= */
.mobile-sticky-bar { display: none; }

@media screen and (max-width: 768px) {
    .mobile-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 999999;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    .sticky-btn {
        flex: 1;
        text-align: center;
        padding: 15px 10px;
        color: white !important;
        font-weight: 700;
        text-decoration: none;
        font-size: 16px;
        text-transform: uppercase;
    }
    .call-btn { background-color: #28a745; border-right: 1px solid rgba(255,255,255,0.2); }
    .whatsapp-btn { background-color: #25D366; }
    
    body { padding-bottom: 55px; } /* Space for bar */
}

/* =========================================
   8. MOBILE RESPONSIVE FIXES
   ========================================= */
@media screen and (max-width: 1024px) {
    .hero-container, .about-content { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media screen and (max-width: 768px) {
    /* Header */
    .site-header { top: -55px; }
    body.admin-bar .site-header { top: 0px; }
    .header-contact, .nav-actions { display: none; }
    .mobile-menu-toggle { display: flex; }
    
    /* Compact Menu */
    ul.nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 10px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
    }
    ul.nav-menu.active { display: flex; }
    ul.nav-menu li { width: 100%; margin: 0; text-align: center; }
    ul.nav-menu a { display: block; padding: 12px; border-bottom: 1px solid #f5f5f5; }

    /* Layouts stack on mobile */
    .services-grid, .testimonials-grid, .trust-grid, .pricing-table {
        grid-template-columns: 1fr !important;
    }
    
    /* Contact Form stacks on mobile */
    .cf7-grid { grid-template-columns: 1fr; }

    /* Elements */
    .hero-title { font-size: 2.2rem; }
    .section-title { font-size: 2rem; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .gas-safe-wrapper, .gas-safe-wrapper img { width: 40px !important; }
    /* Service Pages Mobile Fix */
@media (max-width: 768px) {
    
    /* Fix hero section */
    section [style*="display: flex"][style*="gap: 40px"] {
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    section [style*="min-width: 300px"] {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    /* Fix grids */
    section [style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Fix tables */
    table {
        font-size: 14px !important;
    }
    
    table td, table th {
        padding: 10px 12px !important;
    }
    
    /* Fix headings */
    section [style*="font-size: 2.5rem"] {
        font-size: 1.8rem !important;
    }
    
    section [style*="font-size: 2rem"] {
        font-size: 1.5rem !important;
    }
    
    /* Fix buttons wrapping */
    section [style*="display: flex"][style*="gap: 15px"] {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    section [style*="display: flex"][style*="gap: 20px"] {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    /* Fix comparison table */
    section [style*="min-width: 340px"] {
        min-width: 100% !important;
    }
    
    /* Fix padding on sections */
    section [style*="padding: 60px 0"] {
        padding: 40px 0 !important;
    }
    
    /* Fix CTA buttons */
    section a[style*="padding: 16px 40px"] {
        padding: 14px 30px !important;
        font-size: 1rem !important;
    }
    
    /* Fix emergency cards min-width */
    section [style*="min-width: 340px"] {
        min-width: 100% !important;
    }
}

}
/* ===========================
   SINGLE BLOG POST
   =========================== */

.post-hero {
    background: var(--primary-color);
    color: #fff;
    padding: 48px 0 40px;
}

.post-back-link {
    display: inline-block;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.post-back-link:hover { color: #fff; }

.post-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    color: #fff;
}

.post-meta {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.post-featured-image {
    padding: 32px 0 0;
    background: #fff;
}

.post-content-section {
    padding: 40px 0 60px;
    background: #fff;
}

.post-content-wrapper {
    max-width: 780px;
    margin: 0 auto;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-text);
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 36px 0 12px;
    color: var(--primary-color);
}

.post-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 28px 0 10px;
    color: var(--dark-text);
}

.post-content p { margin-bottom: 20px; }

.post-content ul, .post-content ol {
    margin: 0 0 20px 24px;
}

.post-content li { margin-bottom: 8px; }

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
    display: block;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 36px 0;
}

.post-author-box {
    margin-top: 48px;
    padding: 24px;
    background: var(--section-bg);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.post-author-box strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--dark-text);
}

.post-author-box p {
    font-size: 0.95rem;
    color: var(--light-text);
    margin: 0;
}

.post-cta-section {
    background: var(--section-bg);
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .post-hero { padding: 32px 0 28px; }
    .post-content { font-size: 1rem; }
}
