/* ============================================
   Chicago Comfort HVAC Services - Main Stylesheet
   Modern, Professional Design
   ============================================ */

/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
    --primary-color: #003d82;
    --secondary-color: #ff6b35;
    --accent-color: #ffa500;
    --dark-blue: #001f3f;
    --light-blue: #e8f4f8;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

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

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-small {
    padding: 50px 0;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-top {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.header-info a {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-info a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--white);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #e55a2b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}

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

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat center bottom;
    background-size: cover;
    opacity: 0.3;
}

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

.hero-content {
    max-width: 700px;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* ============================================
   Services Section
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--white);
    border-radius: 10px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.service-icon {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    margin-bottom: 20px;
    line-height: 1.7;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.feature-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.feature-content h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.cta p {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* ============================================
   About Section
   ============================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 40px;
}

.about-text h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text ul {
    list-style: none;
    margin-top: 20px;
}

.about-text ul li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-light);
}

.about-text ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.contact-info {
    background-color: var(--light-blue);
    padding: 40px;
    border-radius: 10px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.contact-item-icon {
    font-size: 1.8rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.contact-item-content h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.contact-item-content p,
.contact-item-content a {
    color: var(--text-light);
}

.contact-item-content a:hover {
    color: var(--secondary-color);
}

.contact-form {
    background-color: var(--white);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.1);
}

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

.map-container {
    margin-top: 60px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border: 0;
}

/* ============================================
   Service Detail Page
   ============================================ */
.service-detail-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.service-detail-hero h1 {
    color: var(--white);
    margin-bottom: 15px;
}

.service-detail-hero p {
    color: var(--white);
    font-size: 1.2rem;
    opacity: 0.95;
}

.service-detail-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-top: 60px;
}

.service-main-content {
    line-height: 1.8;
}

.service-main-content h2,
.service-main-content h3 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 20px;
}

.service-main-content ul,
.service-main-content ol {
    list-style-position: inside;
    margin-bottom: 20px;
    padding-left: 20px;
}

.service-main-content ul li,
.service-main-content ol li {
    margin-bottom: 10px;
    color: var(--text-light);
}

.service-main-content ul {
    list-style-type: disc;
}

.service-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background-color: var(--light-blue);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.sidebar-services-list a {
    display: block;
    padding: 12px 15px;
    background-color: var(--white);
    margin-bottom: 10px;
    border-radius: 5px;
    color: var(--text-dark);
    transition: var(--transition);
}

.sidebar-services-list a:hover,
.sidebar-services-list a.active {
    background-color: var(--secondary-color);
    color: var(--white);
    padding-left: 25px;
}

.sidebar-cta {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    text-align: center;
}

.sidebar-cta h3 {
    color: var(--white);
}

.sidebar-cta p {
    color: var(--white);
    opacity: 0.95;
    margin-bottom: 20px;
}

/* ============================================
   Blog Section
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.blog-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.blog-content {
    padding: 30px;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.blog-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.blog-card h3:hover {
    color: var(--secondary-color);
}

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-more:hover {
    color: var(--primary-color);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--dark-blue);
    color: var(--white);
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.footer-contact-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: 3px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.section-header h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.section-subtitle {
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        padding: 80px 30px 30px;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        z-index: 999;
        align-items: flex-start;
        gap: 15px;
    }

    .nav.active {
        right: 0;
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 1000;
    }

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

    .about-content,
    .contact-wrapper,
    .service-detail-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .hero {
        padding: 80px 0;
    }

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

    .hero p {
        font-size: 1.1rem;
    }

    .header-info {
        gap: 15px;
        font-size: 0.85rem;
    }

    .services-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

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

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

    .hero-buttons .btn {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .header-top {
        text-align: center;
    }

    .header-top .container {
        flex-direction: column;
        gap: 10px;
    }

    .header-info {
        flex-direction: column;
        gap: 5px;
        width: 100%;
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
}

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

.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

.bg-light {
    background-color: var(--light-gray);
}

.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ============================================
   Accessibility
   ============================================ */
:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
