/* ==========================================================================
   Hitherwood Electrical - Styles
   ========================================================================== */

/* CSS Variables */
:root {
    --color-primary: #D35400;
    --color-primary-dark: #A04000;
    --color-secondary: #8B0000;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-background: #FFFFFF;
    --color-background-alt: #F8F8F8;
    --color-border: #E0E0E0;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --container-width: 1100px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-dark);
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 120px;
    width: auto;
}

/* Burger menu button */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-background);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding: var(--spacing-sm);
}

.nav.active {
    display: flex;
}

.nav a {
    color: var(--color-text);
    font-weight: 500;
    padding: var(--spacing-sm);
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav a:hover {
    background-color: var(--color-background-alt);
    color: var(--color-primary);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    min-height: 35vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-image: url('images/hero.jpg');
    background-size: cover;
    background-position: center;
    margin-top: 140px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: var(--spacing-lg) var(--spacing-sm);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.95;
}

/* Button */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.btn-primary {
    background: white;
    color: var(--color-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    color: var(--color-primary-dark);
}

/* ==========================================================================
   About
   ========================================================================== */
.about {
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.about-intro {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
    color: var(--color-text-light);
}

.trust-badges {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.badge {
    padding: var(--spacing-md);
    background: #FDF2E9;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.badge strong {
    display: block;
    font-size: 1.1rem;
    color: var(--color-text);
}

.badge span {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.about-cta {
    font-size: 1.1rem;
    color: var(--color-text);
}

/* ==========================================================================
   Services
   ========================================================================== */
.services {
    padding: var(--spacing-xl) 0;
    background: var(--color-background-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.service-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.service-card h3 {
    color: var(--color-primary);
    font-size: 1.3rem;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-background-alt);
    margin-bottom: var(--spacing-sm);
}

.service-card ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.service-card li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--color-text-light);
}

.service-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery {
    padding: var(--spacing-xl) 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
    padding: var(--spacing-xl) 0;
    background: #FDF2E9;
}

.contact-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    color: var(--color-text-light);
}

.contact-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.contact-item {
    text-align: center;
    padding: var(--spacing-md);
    background: white;
    border-radius: 8px;
}

.contact-item strong {
    display: block;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.contact-item a,
.contact-item span {
    font-size: 1.2rem;
    color: var(--color-text);
}

.contact-item a:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: var(--spacing-md) 0;
    text-align: center;
    background: var(--color-text);
    color: white;
    font-size: 0.9rem;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 0.7;
}

/* ==========================================================================
   Responsive - Tablet and up
   ========================================================================== */
@media (min-width: 600px) {
    .trust-badges {
        grid-template-columns: repeat(3, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-details {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Show nav, hide burger on tablet+ */
    .nav-toggle {
        display: none;
    }

    .nav {
        display: flex;
        position: static;
        flex-direction: row;
        box-shadow: none;
        padding: 0;
        gap: var(--spacing-sm);
    }

    .nav a {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* ==========================================================================
   Responsive - Desktop
   ========================================================================== */
@media (min-width: 900px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid img {
        height: 280px;
    }
}
