/*
Theme Name: Solar_Quotes
Description: A modern WordPress directory theme for Solar Quotes.ca - helping Canadians find verified solar installers across all provinces.
Author: Stackbase System
Version: 1.0
Text Domain: solar-quotes
*/

/* CSS Custom Properties - Canadian Color Palette */
:root {
    --forest-green: #0d4f3c;
    --warm-copper: #b87333;
    --charcoal-slate: #2d3748;
    --maple-cream: #f7e6cc;
    --canadian-red: #FF0000;
    --snow-white: #ffffff;
    --stone-grey: #718096;
    --success-green: #38a169;
    --shadow-dark: rgba(13, 79, 60, 0.15);
    --shadow-light: rgba(184, 115, 51, 0.1);
}

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

body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--charcoal-slate);
    background-color: var(--snow-white);
    overflow-x: hidden;
}

/* Typography System */
.headline-bold {
    font-family: 'Arial Black', Arial, sans-serif;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 0.9;
}

.body-canadian {
    font-family: Georgia, serif;
    font-weight: 400;
}

.ui-clean {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 16px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--forest-green) 0%, #1a5f4a 100%);
    color: var(--snow-white);
    box-shadow: 0 4px 16px var(--shadow-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-dark);
}

.btn-secondary {
    background: var(--warm-copper);
    color: var(--snow-white);
    border: 2px solid var(--warm-copper);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--warm-copper);
    transform: translateY(-1px);
}

/* Header Styles */
.site-header {
    background: var(--forest-green);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(13, 79, 60, 0.2);
    border-bottom: 2px solid var(--warm-copper);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--snow-white);
}

.site-logo {
    height: 150px;
    width: auto;
    max-width: 300px;
    transition: all 0.3s ease;
    margin: -50px 0; /* Negative margin to prevent nav height expansion */
}

.site-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--snow-white);
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--warm-copper);
}

.header-cta {
    background: var(--warm-copper);
    color: var(--snow-white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.header-cta:hover {
    background: #a66429;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--snow-white);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Visibility utility classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--forest-green) 0%, #1a5f4a 50%, var(--charcoal-slate) 100%);
    color: var(--snow-white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(184, 115, 51, 0.1) 70%);
    clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 24px;
    color: var(--snow-white);
}

.hero-text .subtitle {
    font-size: 1.5rem;
    color: var(--maple-cream);
    margin-bottom: 32px;
    font-style: italic;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin: 40px 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--warm-copper);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--maple-cream);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Search Section */
.search-section {
    padding: 60px 0;
    background: var(--maple-cream);
    position: relative;
}

.search-widget {
    background: var(--snow-white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 16px 48px var(--shadow-dark);
    transform: translateY(0px);
    position: relative;
    z-index: 10;
}

.search-title {
    text-align: center;
    margin-bottom: 40px;
}

.search-title h2 {
    font-size: 2.5rem;
    color: var(--forest-green);
    margin-bottom: 16px;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-items: end;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--charcoal-slate);
    font-size: 1.1rem;
}

.form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: var(--snow-white);
    transition: all 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: var(--forest-green);
    box-shadow: 0 0 0 3px rgba(13, 79, 60, 0.1);
}

/* Featured Section */
.featured-section {
    padding: 80px 0;
    background: var(--snow-white);
}

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

.business-card {
    background: var(--snow-white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px var(--shadow-light);
    border: 3px solid var(--maple-cream);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.business-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px var(--shadow-dark);
}

.business-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.business-logo {
    width: 60px;
    height: 60px;
    background: var(--forest-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--snow-white);
    font-size: 1.5rem;
    font-weight: 900;
}

.business-info h3 {
    font-size: 1.5rem;
    color: var(--forest-green);
    margin-bottom: 4px;
}

.business-address {
    color: var(--stone-grey);
    font-size: 0.9rem;
}

.review-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    padding: 12px 16px;
    background: var(--maple-cream);
    border-radius: 8px;
}

.stars {
    color: var(--warm-copper);
    font-size: 1.2rem;
}

.review-count {
    font-weight: 600;
    color: var(--charcoal-slate);
}

/* Provinces Section */
.provinces-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--maple-cream) 0%, #f0e6d2 100%);
}

.provinces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 60px;
}

.province-card {
    background: var(--snow-white);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.province-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--canadian-red) 0%, var(--snow-white) 20%, var(--canadian-red) 100%);
}

.province-card:hover {
    transform: translateY(-4px);
    border-color: var(--forest-green);
    box-shadow: 0 12px 32px var(--shadow-dark);
}

.province-icon {
    width: 80px;
    height: 80px;
    background: var(--forest-green);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--snow-white);
    font-size: 2rem;
    font-weight: 900;
}

.province-name {
    font-size: 1.5rem;
    color: var(--forest-green);
    margin-bottom: 8px;
    font-weight: 700;
}

.installer-count {
    color: var(--stone-grey);
    font-size: 0.9rem;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background: var(--snow-white);
    position: relative;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
    position: relative;
    z-index: 2;
}

.step-card {
    text-align: center;
    padding: 40px 24px;
    position: relative;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--warm-copper);
    color: var(--snow-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(184, 115, 51, 0.3);
}

.step-title {
    font-size: 1.5rem;
    color: var(--forest-green);
    margin-bottom: 16px;
    font-weight: 700;
}

.step-description {
    color: var(--stone-grey);
    line-height: 1.7;
}

/* Blog Section */
.blog-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--charcoal-slate) 0%, #1a202c 100%);
    color: var(--snow-white);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.blog-card {
    background: var(--snow-white);
    color: var(--charcoal-slate);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-category {
    background: var(--warm-copper);
    color: var(--snow-white);
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-content {
    padding: 24px;
}

.blog-title {
    font-size: 1.3rem;
    color: var(--forest-green);
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.blog-excerpt {
    color: var(--stone-grey);
    margin-bottom: 16px;
    line-height: 1.6;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--stone-grey);
}

/* Footer */
.footer {
    background: var(--forest-green);
    color: var(--snow-white);
    padding: 60px 0 30px;
}

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

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--maple-cream);
}

.footer-brand {
    padding-right: 20px;
}

.footer-description {
    color: var(--snow-white);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1rem;
}

.footer-contact a {
    color: var(--warm-copper);
    text-decoration: none;
    font-weight: 600;
}

.footer-contact a:hover {
    color: var(--maple-cream);
}

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

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(247, 230, 204, 0.2);
    padding-top: 30px;
    text-align: center;
    color: var(--maple-cream);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Header fixes */
    .header-container {
        padding: 0 1rem;
        flex-wrap: nowrap;
    }
    
    /* Logo mobile adjustments */
    .site-logo {
        height: 120px;
        max-width: 220px;
        margin: -50px 0; /* Adjusted for mobile */
    }
    
    .nav-container {
        flex: 1;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--forest-green) 0%, #1a5f4a 100%);
        flex-direction: column;
        padding: 1.5rem 0;
        box-shadow: 0 8px 32px rgba(13, 79, 60, 0.4);
        gap: 0;
        z-index: 1001;
        border-radius: 0 0 16px 16px;
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links a {
        padding: 1.2rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: var(--snow-white);
        text-decoration: none;
        font-weight: 500;
        font-size: 1.1rem;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--maple-cream);
        padding-left: 2.5rem;
    }
    
    .nav-links a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        background: var(--warm-copper);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }
    
    .nav-links a:hover::before {
        transform: scaleY(1);
    }
    
    /* Mobile submit button - desktop styling but highlighted */
    .header-cta-mobile {
        background: var(--warm-copper);
        color: var(--snow-white);
        padding: 0.6rem 1.2rem;
        border: none;
        border-radius: 6px;
        font-family: Arial, sans-serif;
        font-weight: 600;
        font-size: 1.1rem;
        text-decoration: none;
        transition: all 0.3s ease;
        margin: 0.5rem 2rem;
        text-align: center;
        display: block;
        box-shadow: 0 2px 8px rgba(184, 115, 51, 0.3);
        border-bottom: none !important;
    }
    
    .header-cta-mobile:hover {
        background: #a66429;
    }
    
    .nav-links li:last-child a:not(.header-cta-mobile) {
        border-bottom: none;
    }
    
    /* Header right side */
    .header-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }

    .mobile-menu-toggle {
        display: block;
        order: 2;
    }
    
    /* Hero section fixes */
    .hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero::before {
        display: none; /* Remove background pattern that causes overflow */
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        line-height: 1.2;
    }
    
    .hero-text .subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .stat-item {
        min-width: 100px;
        flex: 1;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    /* Hide maple leaf on mobile to prevent overflow */
    .maple-leaf-accent {
        display: none;
    }
    
    /* Search form responsive */
    .search-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-widget {
        padding: 2rem 1rem;
        margin: 0 1rem;
        transform: translateY(-20px);
    }
    
    .search-title h2 {
        font-size: 1.8rem;
    }

    /* Section spacing */
    .section {
        padding: 40px 0;
    }

    .container {
        padding: 0 16px;
        max-width: 100%;
    }
    
    /* Featured grid responsive */
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Province grid responsive */
    .provinces-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .province-card {
        padding: 1.5rem 1rem;
    }
    
    .province-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .province-name {
        font-size: 1.2rem;
    }
    
    /* Steps responsive */
    .steps-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Blog grid responsive */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Scroll to top button fix */
    .scroll-to-top {
        bottom: 1rem !important;
        right: 1rem !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Verified Badge */
.verified-badge {
    background: var(--success-green);
    color: var(--snow-white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Business Hours Formatting */
.business-hours {
    background: var(--maple-cream);
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.business-hours h4 {
    color: var(--forest-green);
    margin-bottom: 8px;
}

.hours-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
}

/* Services List */
.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.service-tag {
    background: var(--forest-green);
    color: var(--snow-white);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
}

/* Map Container */
.map-container {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    border: 2px solid var(--maple-cream);
}

/* Stackbase Attribution Badge */
.stackbase-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--snow-white);
    border: 2px solid var(--maple-cream);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 16px var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--charcoal-slate);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
    backdrop-filter: blur(10px);
}

.stackbase-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-dark);
    border-color: #7c3aed;
    text-decoration: none;
    color: var(--charcoal-slate);
}

.stackbase-logo {
    height: 18px;
    width: 18px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.stackbase-badge:hover .stackbase-logo {
    opacity: 1;
}

.stackbase-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Mobile adjustments for badge */
@media (max-width: 768px) {
    .stackbase-badge {
        bottom: 15px;
        left: 15px;
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    .stackbase-logo {
        height: 16px;
        width: 16px;
    }
    
    .stackbase-text {
        font-size: 0.7rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}