/* ==========================================
   WHITE'S HEATING & AIR - STYLESHEET
   ========================================== */

:root {
    --primary-red: #da2023;
    --primary-blue: #2892c6;
    --light-grey: #f5f5f5;
    --dark-grey: #333333;
    --text-soft: #666666;
    --border-grey: #d8dde3;
    --white: #ffffff;
    --surface-blue: rgba(40, 146, 198, 0.08);
    --surface-red: rgba(218, 32, 35, 0.08);
    --shadow-soft: 0 18px 40px rgba(17, 24, 39, 0.08);
    --shadow-card: 0 10px 24px rgba(17, 24, 39, 0.08);
    --radius: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    min-width: 320px;
    font-family:
        -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, Helvetica,
        sans-serif;
    line-height: 1.6;
    color: var(--dark-grey);
    background-color: var(--light-grey);
}

img {
    display: block;
    max-width: 100%;
}

main {
    display: block;
}

.container {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

.content-narrow {
    max-width: 780px;
    margin: 0 auto;
}

.content-narrow p + p {
    margin-top: 1rem;
}

section {
    padding: 3.5rem 0;
}

section.alternate {
    background-color: var(--white);
}

h1,
h2,
h3 {
    line-height: 1.15;
    color: var(--dark-grey);
}

h1 {
    font-size: clamp(2.35rem, 6vw, 4rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-soft);
}

.section-intro {
    max-width: 720px;
    margin-bottom: 2rem;
}

.section-intro.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.template-hint {
    font-size: 0.98rem;
}

.note-text {
    font-size: 1.05rem;
}

.text-center {
    text-align: center;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

#site-header {
    position: sticky;
    top: 0;
    z-index: 1200;
}

.site-header {
    position: relative;
    top: 0;
    z-index: 1200;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(51, 51, 51, 0.08);
    backdrop-filter: blur(14px);
}

.header-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.9rem 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    text-decoration: none;
}

.logo-section img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.company-name {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark-grey);
}

.tagline {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-red);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.4rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(218, 32, 35, 0.2);
}

.btn-primary:hover {
    background-color: #ba1c1f;
}

.btn-secondary {
    background-color: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(40, 146, 198, 0.18);
}

.btn-secondary:hover {
    background-color: #237ea9;
}

.call-now-btn {
    display: none;
    white-space: nowrap;
    padding: 0.55rem 0.95rem;
    font-size: 0.86rem;
    box-shadow: 0 8px 16px rgba(218, 32, 35, 0.2);
}

.menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(51, 51, 51, 0.1);
    border-radius: 14px;
    background-color: var(--white);
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background-color: var(--dark-grey);
}

.menu-toggle[aria-expanded='true'] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded='true'] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
    grid-column: 1 / -1;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
}

.site-nav.active {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
}

.site-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.75rem;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    color: var(--dark-grey);
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
    background-color: var(--surface-blue);
    color: var(--primary-blue);
}

body.nav-open {
    overflow: hidden;
}

/* ==========================================
   HERO & FEATURE PANELS
   ========================================== */

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at top left,
            rgba(40, 146, 198, 0.15),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(245, 249, 252, 1) 52%,
            rgba(218, 32, 35, 0.08) 100%
        );
    text-align: center;
}

.hero::after {
    content: '';
    position: absolute;
    right: -18%;
    bottom: -62%;
    width: min(58vw, 420px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(40, 146, 198, 0.22) 0%,
        rgba(40, 146, 198, 0) 68%
    );
    opacity: 0.75;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
}

.hero-logo {
    height: 88px;
    width: auto;
    margin: 0 auto 1.25rem;
    object-fit: contain;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
}

.hero-content-home {
    text-align: center;
}

.hero-side-panel {
    border: 1px solid rgba(40, 146, 198, 0.2);
    border-radius: calc(var(--radius) + 2px);
    background: linear-gradient(170deg, #ffffff 0%, #f4f9fc 100%);
    box-shadow: var(--shadow-card);
    padding: 1.4rem;
    text-align: left;
}

.hero-side-panel h2 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.hero-checklist {
    list-style: none;
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0 1.25rem;
}

.hero-checklist li {
    position: relative;
    padding-left: 1.45rem;
    color: var(--dark-grey);
    font-weight: 600;
}

.hero-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.46em;
    width: 0.52rem;
    height: 0.52rem;
    border-radius: 50%;
    background-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(40, 146, 198, 0.16);
}

.hero-panel-note {
    font-size: 0.95rem;
    line-height: 1.5;
}

.home-services-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

.home-services-grid {
    margin-top: 0;
}

.home-services-aside {
    border: 1px solid rgba(40, 146, 198, 0.2);
    border-radius: calc(var(--radius) + 2px);
    background: linear-gradient(170deg, #ffffff 0%, #f4f9fc 100%);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    text-align: left;
    position: static;
}

.home-services-aside h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.3rem);
    margin-bottom: 0.85rem;
}

.home-services-points {
    list-style: none;
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0 1.25rem;
}

.home-services-points li {
    position: relative;
    padding-left: 1.4rem;
    color: var(--dark-grey);
    font-weight: 600;
}

.home-services-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.46em;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(40, 146, 198, 0.16);
}

.hero .tagline {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.hero-description {
    max-width: 62ch;
    margin: 0 auto 2rem;
    font-size: 1.08rem;
}

.cta-panel {
    padding: 2rem;
    border: 1px solid rgba(40, 146, 198, 0.16);
    border-radius: calc(var(--radius) + 4px);
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.badge {
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background-color: var(--surface-blue);
    color: var(--primary-blue);
    font-size: 0.9rem;
    font-weight: 700;
}

/* ==========================================
   SERVICE, GALLERY, CONTACT, AND TEAM
   ========================================== */

.services-grid,
.gallery-grid,
.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 1fr;
    gap: 1.5rem;
}

.services-grid {
    margin-top: 2rem;
}

.service-card,
.gallery-item,
.contact-form-panel,
.contact-info,
.team-member {
    border: 1px solid rgba(40, 146, 198, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--shadow-card);
}

.service-card,
.contact-form-panel,
.contact-info,
.team-member {
    padding: 1.5rem;
}

.service-card:hover,
.gallery-item:hover,
.team-member:hover {
    box-shadow: var(--shadow-soft);
    border-color: rgba(40, 146, 198, 0.26);
}

.service-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: calc(var(--radius) - 8px);
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--primary-blue);
}

.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.gallery-caption {
    padding: 1rem;
    font-weight: 600;
    color: var(--dark-grey);
}

.gallery-loading,
.gallery-empty-message {
    grid-column: 1 / -1;
    padding: 1rem;
    border: 1px dashed rgba(40, 146, 198, 0.35);
    border-radius: 14px;
    background-color: rgba(40, 146, 198, 0.06);
    text-align: center;
    color: var(--text-soft);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.contact-form-panel p {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--dark-grey);
}

input[type='text'],
input[type='email'],
input[type='tel'],
textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-grey);
    border-radius: 14px;
    background-color: var(--white);
    font: inherit;
    color: var(--dark-grey);
}

input[type='text']:focus,
input[type='email']:focus,
input[type='tel']:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(40, 146, 198, 0.12);
}

textarea {
    min-height: 160px;
    resize: vertical;
}

.form-feedback {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    font-weight: 700;
}

.form-feedback.success {
    border: 1px solid #c9e5d0;
    background-color: #edf7f0;
    color: #24613a;
}

.error-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #b42318;
}

.is-invalid {
    border-color: #b42318 !important;
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08) !important;
}

.contact-info h3 {
    color: var(--primary-red);
}

.contact-detail {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(40, 146, 198, 0.12);
}

.contact-detail:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.contact-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-red);
}

.contact-value,
.contact-subtext,
.contact-info address {
    color: var(--text-soft);
    font-style: normal;
}

.contact-value a,
.contact-info a {
    color: var(--primary-blue);
    text-decoration: none;
}

.contact-value a:hover,
.contact-info a:hover {
    text-decoration: underline;
}

.map-container {
    margin-top: 2rem;
    overflow: hidden;
    border: 1px solid rgba(40, 146, 198, 0.16);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.team-member {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: center;
}

.team-member img {
    width: 150px;
    aspect-ratio: 1;
    margin: 0 auto 1rem;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(40, 146, 198, 0.14);
}

.team-bio {
    margin-top: 0.75rem;
    flex-grow: 1;
}

.team-role {
    display: inline-block;
    margin-top: auto;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background-color: var(--surface-red);
    color: var(--primary-red);
    font-size: 0.9rem;
    font-weight: 700;
}

.motto-block {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.motto-block h2 {
    color: var(--primary-red);
}

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1300;
    min-width: 3.4rem;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 999px;
    background-color: var(--primary-red);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(218, 32, 35, 0.24);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.back-to-top:hover {
    background-color: #ba1c1f;
    box-shadow: 0 12px 24px rgba(186, 28, 31, 0.26);
}

.back-to-top i {
    display: block;
    font-size: 1.2rem;
    line-height: 1;
    pointer-events: none;
}

.back-to-top:focus-visible {
    outline: 3px solid rgba(40, 146, 198, 0.35);
    outline-offset: 2px;
}

/* ==========================================
   FOOTER
   ========================================== */

.site-footer {
    background-color: #1f2c39;
    color: #eef4f8;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section p,
.footer-section address,
.footer-section a {
    color: #d3dde6;
}

.footer-section a {
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-list {
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.footer-logo {
    height: 64px;
    width: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.footer-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.footer-highlight {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--white);
}

.footer-bottom {
    padding: 1.25rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.footer-bottom p {
    color: #c8d1da;
}

@media (max-width: 767px) {
    .home-services-aside {
        order: -1;
    }

    .footer-container,
    .footer-section,
    .footer-bottom {
        text-align: center;
    }

    .footer-list {
        justify-items: center;
    }

    .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-highlights {
        justify-content: center;
    }

    .footer-section address {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==========================================
   RESPONSIVE LAYOUTS
   ========================================== */

@media (min-width: 768px) {
    section {
        padding: 4.25rem 0;
    }

    .header-container {
        grid-template-columns: auto 1fr auto;
    }

    .call-now-btn {
        display: inline-flex;
        justify-self: end;
    }

    .company-name {
        font-size: 1.35rem;
    }

    .menu-toggle {
        display: none;
    }

    .site-nav {
        grid-column: auto;
        max-height: none;
        opacity: 1;
        overflow: visible;
        transform: none;
    }

    .site-nav ul {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 0.5rem;
        padding-top: 0;
    }

    .hero {
        padding: 5.25rem 0 4.5rem;
    }

    .cta-actions {
        flex-direction: row;
        justify-content: center;
    }

    .services-grid,
    .gallery-grid,
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-wrapper {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    }

    .footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .back-to-top {
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .header-container {
        grid-template-columns: auto 1fr auto;
        gap: 1.25rem;
    }

    .hero-layout {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        gap: 2rem;
    }

    .hero-content-home {
        text-align: left;
    }

    .hero-content-home .hero-description {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-content-home .cta-actions,
    .hero-content-home .badge-row {
        justify-content: flex-start;
    }

    .home-services-layout {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        gap: 2rem;
    }

    .home-services-aside {
        position: sticky;
        top: 6.25rem;
    }

    .site-nav {
        justify-self: end;
    }

    .site-nav ul {
        gap: 0.75rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .team-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-container {
        grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
    }
}
