/* ============================================
   HIXA HEATING - Worcester Bosch Inspired Design
   Clean, professional, trustworthy
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Primary brand colors */
    --navy: #1a3a5c;
    --navy-dark: #0f2439;
    --navy-light: #2a4a6e;

    /* Accent - Hixa brand orange/copper */
    --accent: #c45d35;
    --accent-hover: #b54d28;
    --accent-light: #d4714a;

    /* Neutrals - Worcester Bosch style */
    --white: #ffffff;
    --grey-50: #f8f9fa;
    --grey-100: #f1f3f5;
    --grey-200: #e9ecef;
    --grey-300: #dee2e6;
    --grey-400: #ced4da;
    --grey-500: #adb5bd;
    --grey-600: #868e96;
    --grey-700: #495057;
    --grey-800: #343a40;
    --grey-900: #212529;

    /* Text colors */
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #868e96;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Layout */
    --container-max: 1280px;
    --header-height: 80px;

    /* Effects */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

    --transition: 0.2s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--white);
}

body.menu-open {
    overflow: hidden;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
}

/* ============================================
   HEADER - Worcester Bosch Style
   ============================================ */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--grey-200);
    transition: all var(--transition);
}

/* Brand stripe at top - like Worcester Bosch rainbow */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--accent) 0%,
        var(--accent) 25%,
        var(--navy) 25%,
        var(--navy) 50%,
        var(--accent-light) 50%,
        var(--accent-light) 75%,
        var(--navy-light) 75%,
        var(--navy-light) 100%
    );
}

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

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding-top: 4px; /* Account for brand stripe */
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

/* Navigation */
.main-nav > ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.main-nav > ul > li > a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color var(--transition);
}

.main-nav > ul > li > a:hover {
    color: var(--accent);
}

/* Submenu */
.has-submenu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: var(--space-xs);
    padding-top: calc(var(--space-xs) + 8px);
    margin-top: 0;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 100;
}

/* Bridge the gap between parent and submenu for hover */
.has-submenu::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.has-submenu:hover .submenu,
.has-submenu.submenu-open .submenu {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.submenu li a {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.submenu li a:hover {
    background: var(--grey-100);
    color: var(--text-primary);
}

/* Phone CTA Button - Worcester Bosch style blue button (using our accent) */
.header-cta .phone-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    border: none;
}

.header-cta .phone-button:hover {
    background: var(--accent-hover);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ============================================
   HERO SECTION - Worcester Bosch Style
   ============================================ */

.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
    background: var(--grey-100);
    overflow: hidden;
}

/* Background image handling */
.hero[style*="background-image"] {
    background-size: cover !important;
    background-position: center !important;
}

.hero[style*="background-image"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.85) 0%, rgba(248,249,250,0.9) 100%);
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    max-width: 800px;
    margin: 0 auto var(--space-md);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero > p {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

/* Hero CTA - Worcester Bosch blue button style */
.hero .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--white);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.hero .cta-button:hover {
    background: var(--accent-hover);
}

/* Trust badges - Worcester Bosch horizontal style */
.hero > div[style*="margin-top"] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-xl) !important;
    padding-top: var(--space-lg);
    max-width: 900px;
}

.hero > div[style*="margin-top"] p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

main {
    min-height: 50vh;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

/* ============================================
   SECTIONS - Clean Worcester Bosch Style
   ============================================ */

.section {
    background: var(--white);
    padding: var(--space-2xl) var(--space-xl);
    margin-bottom: 2px;
}

/* Alternating grey backgrounds like Worcester Bosch */
.section:nth-child(even) {
    background: var(--grey-50);
}

.section h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.section p {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 800px;
}

.section ul {
    margin: var(--space-md) 0;
    padding-left: var(--space-md);
}

.section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.section a:not(.cta-button) {
    color: var(--accent);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.section a:not(.cta-button):hover {
    color: var(--accent-hover);
}

/* ============================================
   CTA BUTTON (General)
   ============================================ */

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--white);
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    margin: var(--space-sm) 0;
}

.cta-button:hover {
    background: var(--accent-hover);
}

/* ============================================
   CARD GRID - Worcester Bosch 3-column style
   ============================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 1px solid var(--grey-200);
}

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

.card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: var(--space-md) var(--space-md) var(--space-sm);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0 var(--space-md) var(--space-md);
}

.card ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.card li {
    padding: 0.75rem var(--space-md);
    border-top: 1px solid var(--grey-100);
}

.card li:first-child {
    border-top: none;
}

.card a {
    color: var(--accent);
    font-weight: 500;
}

.card a:hover {
    text-decoration: underline;
}

/* ============================================
   CTA BOX - Contact/Call to Action Box
   ============================================ */

.cta-box {
    background: linear-gradient(135deg, var(--grey-50) 0%, var(--white) 100%);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-lg) 0;
    text-align: center;
}

.cta-box h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.cta-box .phone-number {
    margin-bottom: var(--space-sm);
}

.cta-box .phone-number a {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.cta-box .phone-number a:hover {
    text-decoration: underline;
}

.cta-box .email a {
    font-size: 1.125rem;
    color: var(--accent);
    text-decoration: none;
}

.cta-box .email a:hover {
    text-decoration: underline;
}

.cta-box p {
    margin: var(--space-sm) 0;
    color: var(--text-secondary);
}

.cta-box p:last-child {
    margin-bottom: 0;
}

/* ============================================
   FEATURES GRID - Worcester Bosch Trust Badges Style
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
    text-align: center;
}

.feature-item {
    padding: var(--space-lg);
}

.feature-item h3,
.feature-item strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0 auto;
    max-width: 280px;
}

/* ============================================
   HIGHLIGHT BOX
   ============================================ */

.highlight-box {
    background: var(--grey-50);
    border-left: 4px solid var(--accent);
    padding: var(--space-lg) var(--space-xl);
    margin: var(--space-lg) 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.highlight-box h3 {
    color: var(--text-primary);
    margin-top: 0;
    font-size: 1.25rem;
}

/* ============================================
   FOOTER - Clean Worcester Bosch Style
   ============================================ */

footer {
    background: var(--grey-900);
    color: var(--white);
    padding: var(--space-3xl) var(--space-lg) var(--space-lg);
    margin-top: 0;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-md);
}

.footer-section p {
    color: var(--grey-400);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

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

.footer-section li {
    margin-bottom: 0.375rem;
}

.footer-section a {
    color: var(--grey-400);
    font-size: 0.875rem;
    transition: color var(--transition);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: var(--container-max);
    margin: var(--space-xl) auto 0;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--grey-700);
    text-align: center;
}

.footer-bottom p {
    color: var(--grey-500);
    font-size: 0.8125rem;
}

/* ============================================
   COOKIE BANNER - Clean style
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--grey-200);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 10000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-banner-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.cookie-banner-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-link {
    color: var(--accent);
    font-weight: 500;
}

.cookie-banner-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
}

.cookie-btn-accept {
    background: var(--accent);
    color: var(--white);
}

.cookie-btn-accept:hover {
    background: var(--accent-hover);
}

.cookie-btn-decline {
    background: var(--white);
    color: var(--text-secondary);
    border: 1px solid var(--grey-300);
}

.cookie-btn-decline:hover {
    border-color: var(--grey-400);
    background: var(--grey-50);
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .header-container {
        height: 70px;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--white);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 90px var(--space-md) var(--space-lg);
        z-index: 999;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .main-nav > ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav > ul > li {
        border-bottom: 1px solid var(--grey-200);
        width: 100%;
    }

    .main-nav > ul > li > a {
        padding: var(--space-sm) 0;
        font-size: 1.0625rem;
    }

    .submenu {
        position: static;
        display: none;
        transform: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: var(--grey-50);
        margin: 0;
        padding: var(--space-xs) 0;
    }

    .has-submenu.submenu-open .submenu {
        display: block;
        animation: none;
    }

    .submenu li a {
        padding: 0.75rem var(--space-md);
    }

    .header-cta {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: calc(70px + var(--space-xl)) var(--space-md) var(--space-xl);
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .header-container {
        padding: 0 var(--space-md);
    }

    .logo img {
        height: 42px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero > p {
        font-size: 1rem;
    }

    .hero > div[style*="margin-top"] {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .section {
        padding: var(--space-xl) var(--space-md);
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .card-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .feature-item {
        text-align: left;
        padding: var(--space-md);
        background: var(--grey-50);
        border-radius: var(--radius-md);
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .cookie-banner-content {
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-sm);
        text-align: center;
    }

    .cookie-banner-buttons {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE
   ============================================ */

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .section {
        padding: var(--space-lg) var(--space-sm);
    }

    .cta-button {
        width: 100%;
    }
}

/* ============================================
   ACCESSIBILITY & UTILITY
   ============================================ */

.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;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

::selection {
    background: var(--accent);
    color: var(--white);
}

/* Print styles */
@media print {
    header, footer, .cookie-banner {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: var(--space-lg);
        background: var(--white) !important;
    }

    .section {
        break-inside: avoid;
    }
}
