/* ================================================
   Westside Servicing - Main Stylesheet
   Based on Maxim Maintenance Solutions Design
   ================================================ */

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

:root {
    /* Color Palette */
    --primary-red: #d94948;
    --secondary-yellow: #ffc500;
    --dark-navy: #23244f;
    --footer-dark: #011627;
    --text-dark: #3a3a3a;
    --text-charcoal: #011627;
    --gray-light: #f5f5f5;
    --gray-border: #e5e5e5;
    --white: #ffffff;

    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-size-base: 15px;
    --font-weight-regular: 400;
    --font-weight-bold: 700;

    /* Layout */
    --container-max-width: 1170px;
    --container-narrow: 750px;
    --border-radius-pill: 100px;
    --border-radius-card: 8px;

    /* Breakpoints */
    --mobile: 544px;
    --tablet: 921px;
    --desktop: 922px;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-regular);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-charcoal);
}

h1 {
    font-size: 4.67rem; /* 70px */
}

h2 {
    font-size: 2.27rem; /* 34px */
}

h3 {
    font-size: 1.53rem; /* 23px */
}

h4 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-navy);
}

/* ===== Container & Layout ===== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 3em;
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 2em;
}

section {
    padding: 5em 0;
}

/* ===== Header & Navigation ===== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 0;
}

.logo {
    height: 60px;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2em;
    align-items: center;
}

nav ul li a {
    color: var(--text-charcoal);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0.5em 1em;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-red);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-charcoal);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 1em 2.5em;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius-pill);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary-yellow);
    color: var(--text-charcoal);
}

.btn-primary:hover {
    background-color: var(--dark-navy);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--dark-navy);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-outline:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--dark-navy) 0%, var(--footer-dark) 100%);
    color: var(--white);
    padding: 8em 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/logo.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
}

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

.hero h1 {
    color: var(--white);
    margin-bottom: 0.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero .tagline {
    font-size: 1.5rem;
    color: var(--secondary-yellow);
    margin-bottom: 2em;
    font-weight: var(--font-weight-bold);
    letter-spacing: 2px;
}

.hero .btn-group {
    display: flex;
    gap: 1em;
    justify-content: center;
    margin-top: 2em;
}

/* ===== Cards ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
    margin-top: 3em;
}

.card {
    background-color: var(--white);
    border-radius: var(--border-radius-card);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2em;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5em;
    font-size: 1.8rem;
    color: var(--white);
}

.card h3 {
    margin-bottom: 1em;
    color: var(--primary-red);
}

.card p {
    color: var(--text-dark);
    margin-bottom: 1.5em;
}

/* ===== Section Styles ===== */
.section-gray {
    background-color: var(--gray-light);
}

.section-title {
    text-align: center;
    margin-bottom: 3em;
}

.section-title h2 {
    color: var(--text-charcoal);
    margin-bottom: 0.5em;
}

.section-title p {
    color: var(--text-dark);
    font-size: 1.1rem;
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4em;
    align-items: center;
}

.about-text h2 {
    color: var(--primary-red);
    margin-bottom: 1em;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ===== Gallery ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5em;
    margin-top: 3em;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-card);
    aspect-ratio: 4/3;
    background-color: var(--gray-light);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ===== Contact Form ===== */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4em;
}

.contact-info {
    background-color: var(--dark-navy);
    color: var(--white);
    padding: 3em;
    border-radius: var(--border-radius-card);
}

.contact-info h3 {
    color: var(--secondary-yellow);
    margin-bottom: 1.5em;
}

.contact-detail {
    margin-bottom: 1.5em;
}

.contact-detail strong {
    color: var(--secondary-yellow);
    display: block;
    margin-bottom: 0.5em;
}

.contact-form {
    background-color: var(--white);
    padding: 2em;
    border-radius: var(--border-radius-card);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: var(--font-weight-bold);
    color: var(--text-charcoal);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1em;
    border: 2px solid var(--gray-border);
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

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

/* ===== Footer ===== */
footer {
    background-color: var(--footer-dark);
    color: var(--white);
    padding: 3em 0 1em;
}

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

.footer-section h3 {
    color: var(--secondary-yellow);
    margin-bottom: 1em;
}

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

.footer-section ul li {
    margin-bottom: 0.5em;
}

.footer-section ul li a {
    color: var(--white);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--secondary-yellow);
}

.footer-bottom {
    text-align: center;
    padding-top: 2em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Responsive Design ===== */

/* Tablet (545px - 921px) */
@media screen and (max-width: 921px) {
    :root {
        --font-size-base: 14px;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .container {
        padding: 0 2em;
    }

    .about-content,
    .contact-section {
        grid-template-columns: 1fr;
        gap: 2em;
    }

    .hero {
        padding: 5em 0;
    }

    section {
        padding: 3em 0;
    }
}

/* Mobile (under 544px) */
@media screen and (max-width: 544px) {
    :root {
        --font-size-base: 13px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .container {
        padding: 0 1.5em;
    }

    /* Mobile Navigation */
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 1em;
    }

    nav ul.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .logo {
        height: 45px;
    }

    .hero {
        padding: 3em 0;
    }

    .hero .btn-group {
        flex-direction: column;
        align-items: stretch;
    }

    .card-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 2em 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2em;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

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

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

.hidden {
    display: none;
}
