/* CSS Variables */
:root {
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --electric-blue: #06b6d4;
    --electric-green: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 35px 60px -12px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: var(--bg-light);
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.electric-loader {
    position: relative;
    width: 100px;
    height: 100px;
}

.electric-bolt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--primary);
    animation: electric-pulse 2s ease-in-out infinite;
}

.loader-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes electric-pulse {
    0%, 100% { 
        color: var(--primary);
        filter: drop-shadow(0 0 10px var(--primary));
    }
    50% { 
        color: var(--accent);
        filter: drop-shadow(0 0 20px var(--accent));
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: var(--secondary);
    color: var(--white);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 120px 0;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        var(--secondary) 0%,
        #1e293b 25%,
        var(--primary-dark) 50%,
        #7c2d12 75%,
        var(--secondary) 100%
    );
    z-index: 0;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, var(--primary) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, var(--accent) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, var(--electric-blue) 0%, transparent 50%);
    opacity: 0.1;
    animation: pattern-float 20s ease-in-out infinite;
}

@keyframes pattern-float {
    0%, 100% { transform: translateX(0) translateY(0) scale(1); }
    33% { transform: translateX(30px) translateY(-20px) scale(1.1); }
    66% { transform: translateX(-20px) translateY(30px) scale(0.9); }
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    animation: particle-float 15s infinite linear;
}

.particle:nth-child(2n) { background: var(--accent); animation-delay: -5s; }
.particle:nth-child(3n) { background: var(--electric-blue); animation-delay: -10s; }

@keyframes particle-float {
    0% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) translateX(100px) rotate(360deg); opacity: 0; }
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: slide-in-left 1s ease-out;
}

@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent) 50%, var(--electric-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.hero-visual {
    position: relative;
    animation: slide-in-right 1s ease-out 0.2s both;
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-10deg) rotateX(10deg);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(-45deg);
    animation: card-shine 4s ease-in-out infinite;
}

@keyframes card-shine {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(-45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(-45deg); }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    font-family: 'Space Grotesk', monospace;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    padding: 1.25rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: var(--white);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Company Logos Section */
.company-logos-section {
    background: var(--white);
    padding: 60px 0;
    border-bottom: 1px solid #e5e7eb;
}

.logos-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logos-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.logos-scroll {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 80px;
    display: flex;
    align-items: center;
}

.logos-track {
    display: flex;
    gap: 3rem;
    animation: scrollLogos 30s linear infinite;
    will-change: transform;
}

@keyframes scrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.company-logo {
    height: 60px;
    width: auto;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.company-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Cable Connection Animation Section - FIXED */
.cable-connection-section {
    height: 200vh; /* Increased height for scroll duration */
    position: relative;
    background: var(--secondary);
    overflow: hidden;
}

.cable-connection-container {
    position: sticky;
    top: 0;
    height: 100vh; /* Fixed viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('https://yambar.ab360.ca/photos/bck.png');
    background-size: cover;
    background-position: center;
}

.cable-animation-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    z-index: 2;
}

.cable-half-container {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    height: 100%;
    overflow: hidden;
    will-change: transform;
}

#cableLeftContainer {
    left: 0;
}

#cableRightContainer {
    right: 0;
}

.cable-half-container img {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 100%;
    width: auto;
    max-width: none;
    transition: transform 0.5s ease-out;
}

#cableLeftContainer img {
    right: 0;
}

#cableRightContainer img {
    left: 0;
}

.cables-connected-spark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    height: 100px;
    width: auto;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    will-change: opacity;
    pointer-events: none;
}

.generac-title-overlay {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    z-index: 3;
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
}

/* Animation states */
.cable-animation-wrapper.connecting #cableLeftContainer img {
    transform: translateY(-50%) translateX(20px);
}

.cable-animation-wrapper.connecting #cableRightContainer img {
    transform: translateY(-50%) translateX(-20px);
}

.cable-animation-wrapper.connected .cables-connected-spark {
    opacity: 1;
}

.cable-animation-wrapper.connected .generac-title-overlay {
    opacity: 1;
    pointer-events: auto;
}
.generac-main-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, var(--white), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.generac-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Trust Section */
.trust-section {
    background: linear-gradient(135deg, #f9fafb, #e5e7eb);
    padding: 120px 0;
    position: relative;
}

.trust-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.trust-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-family: 'Space Grotesk', sans-serif;
}

.trust-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.trust-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

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

.trust-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 0.5rem;
}

.trust-label {
    font-size: 1.125rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* About Section */
.about-section {
    background: var(--white);
    padding: 120px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-dark);
    font-family: 'Space Grotesk', sans-serif;
}

.about-description p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.about-description p:last-child {
    color: var(--text-dark);
    font-weight: 600;
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Google Reviews Section */
.reviews-section {
    background: var(--white);
    padding: 80px 0;
    overflow: hidden;
    position: relative;
}

.reviews-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.reviews-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-family: 'Space Grotesk', sans-serif;
}

.reviews-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
}

.google-reviews-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.google-reviews-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.reviews-scroll {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: center;
}

.reviews-track {
    display: flex;
    gap: 2rem;
    animation: scrollReviews 120s linear infinite;
    will-change: transform;
}

@keyframes scrollReviews {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.review-card {
    min-width: 400px;
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
}

.review-info h4 {
    font-weight: 600;
    color: var(--text-dark);
}

.review-stars {
    color: #fbbf24;
    font-size: 1.125rem;
}

.review-text {
    color: var(--text-light);
    line-height: 1.6;
    font-style: italic;
}

/* Services Grid Section */
.services-showcase {
    background: var(--bg-light);
    padding: 120px 0;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.services-header {
    text-align: center;
    margin-bottom: 5rem;
}

.services-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-family: 'Space Grotesk', sans-serif;
    position: relative;
}

.services-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.service-showcase-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    transform: translateY(50px);
    opacity: 0;
}

.service-showcase-card.in-view {
    transform: translateY(0);
    opacity: 1;
}

.service-showcase-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

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

.service-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(6, 182, 212, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card-icon {
    font-size: 4rem;
    color: var(--white);
}

.service-card-content {
    padding: 2rem;
}

.service-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.service-card-subtitle {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.service-card-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.service-card-link:hover {
    color: var(--primary-dark);
    gap: 1rem;
}

.coming-soon {
    background: var(--accent);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Projects Section */
.projects-section {
    background: var(--white);
    padding: 120px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 300px;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 2rem;
    color: var(--white);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
    opacity: 1;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.status-ongoing {
    background: #fef3c7;
    color: #92400e;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    background-color: var(--white);
    margin: 2% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: var(--text-light);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 2rem;
}

.modal-main-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.modal-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.modal-specs {
    margin-top: 2rem;
}

.modal-specs h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.modal-specs ul {
    padding-left: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

#modalFullProject {
    margin-top: 2rem;
}

/* Blog Section */
.blog-section {
    background: var(--bg-light);
    padding: 120px 0;
}

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

.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

.blog-content {
    padding: 2rem;
}

.blog-category {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0.5rem 0 1rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.blog-read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    gap: 1rem;
}

/* Article Modal */
.article-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
}

.article-modal-content {
    background-color: var(--white);
    margin: 2% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.article-content {
    padding: 3rem;
    line-height: 1.8;
}

.article-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.125rem;
}

.article-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: var(--text-light);
}

.article-content strong {
    color: var(--text-dark);
}

/* FAQ Section */
.faq-section {
    background: var(--white);
    padding: 120px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 0;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-light);
    line-height: 1.6;
}

.faq-answer.active {
    max-height: 200px;
    padding-bottom: 1.5rem;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 80px 0 40px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 2rem 0;
}

.footer-bottom {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: var(--white);
}

.floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.floating-btn.call {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.floating-btn.chat {
    background: linear-gradient(135deg, var(--success), #059669);
}

.floating-btn.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4); }
    100% { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

/* Chat Modal */
.chat-modal {
    position: fixed;
    bottom: 140px;
    right: 2rem;
    width: 350px;
    height: 500px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, var(--success), #059669);
    color: var(--white);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-form input,
.chat-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
}

.chat-form textarea {
    resize: none;
    height: 80px;
}

.chat-send-btn {
    background: var(--success);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    background: #059669;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-card {
        transform: none;
        max-width: 500px;
        margin: 0 auto;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cable-animation-wrapper {
        height: 150px;
    }

    .generac-main-title {
        font-size: clamp(2rem, 8vw, 4rem);
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-showcase-card {
        min-width: auto;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .chat-modal {
        right: 1rem;
        left: 1rem;
        width: auto;
    }

    .floating-actions {
        right: 1rem;
    }

    .review-card {
        min-width: 300px;
    }

    .company-logo {
        height: 40px;
    }

    .modal-content,
    .article-modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .social-links {
        gap: 0.5rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}


/* Enhanced Mobile CSS with Dynamic Layouts - Add to style.css */

/* Dynamic mobile layout classes - these will be generated based on admin settings */
.mobile-layout-1 { display: grid; grid-template-columns: 1fr; }
.mobile-layout-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.mobile-layout-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.mobile-layout-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

.tablet-layout-1 { display: grid; grid-template-columns: 1fr; }
.tablet-layout-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.tablet-layout-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.tablet-layout-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

/* Enhanced responsive breakpoints */
@media (max-width: 1024px) {
    /* Tablet layouts */
    .stats-grid.tablet-layout-1 { grid-template-columns: 1fr; }
    .stats-grid.tablet-layout-2 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid.tablet-layout-3 { grid-template-columns: repeat(3, 1fr); }
    .stats-grid.tablet-layout-4 { grid-template-columns: repeat(4, 1fr); }
    
    .trust-stats.tablet-layout-1 { grid-template-columns: 1fr; }
    .trust-stats.tablet-layout-2 { grid-template-columns: repeat(2, 1fr); }
    .trust-stats.tablet-layout-3 { grid-template-columns: repeat(3, 1fr); }
    .trust-stats.tablet-layout-4 { grid-template-columns: repeat(4, 1fr); }
    
    .services-grid.tablet-layout-1 { grid-template-columns: 1fr; }
    .services-grid.tablet-layout-2 { grid-template-columns: repeat(2, 1fr); }
    .services-grid.tablet-layout-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile-specific layout overrides */
@media (max-width: var(--mobile-breakpoint, 768px)) {
    /* Base mobile settings */
    body {
        font-size: var(--mobile-base-font-size, 14px) !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        transform: scale(var(--mobile-heading-scale, 0.9));
        transform-origin: left center;
    }
    
    section {
        padding: var(--mobile-section-padding, 40px) 0 !important;
    }
    
    .nav-menu {
        background: var(--mobile-menu-bg, #ffffff) !important;
    }
    
    .nav-menu li a {
        color: var(--mobile-menu-text, #1f2937) !important;
    }
    
    /* Mobile layout classes for hero stats */
    .stats-grid.mobile-layout-1 {
        grid-template-columns: 1fr !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    .stats-grid.mobile-layout-2 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    .stats-grid.mobile-layout-3 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    .stats-grid.mobile-layout-4 {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    /* Mobile layout classes for trust stats */
    .trust-stats.mobile-layout-1 {
        grid-template-columns: 1fr !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    .trust-stats.mobile-layout-2 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    .trust-stats.mobile-layout-3 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    .trust-stats.mobile-layout-4 {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    /* Mobile layout classes for services */
    .services-grid.mobile-layout-1 {
        grid-template-columns: 1fr !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    .services-grid.mobile-layout-2 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    /* Mobile layout classes for projects */
    .projects-grid.mobile-layout-1 {
        grid-template-columns: 1fr !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    .projects-grid.mobile-layout-2 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    /* Mobile layout classes for blog */
    .blog-grid.mobile-layout-1 {
        grid-template-columns: 1fr !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    .blog-grid.mobile-layout-2 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--mobile-gap, 1rem);
    }
    
    /* Section visibility controls */
    .mobile-hidden-hero .hero { display: none !important; }
    .mobile-hidden-cable .cable-connection-section { display: none !important; }
    .mobile-hidden-trust .trust-section { display: none !important; }
    .mobile-hidden-services .services-showcase { display: none !important; }
    .mobile-hidden-projects .projects-section { display: none !important; }
    .mobile-hidden-blog .blog-section { display: none !important; }
    
    /* Custom section styling based on admin settings */
    .section-custom-bg { background-color: var(--section-bg-color, transparent); }
    .section-custom-text { color: var(--section-text-color, inherit); }
    .section-custom-align { text-align: var(--section-text-align, center); }
    
    /* Responsive adjustments for very small screens */
    @media (max-width: 480px) {
        .stats-grid.mobile-layout-4,
        .trust-stats.mobile-layout-4 {
            grid-template-columns: repeat(2, 1fr) !important;
        }
        
        .stats-grid.mobile-layout-3,
        .trust-stats.mobile-layout-3 {
            grid-template-columns: repeat(2, 1fr) !important;
        }
        
        .stat-item, .trust-stat {
            padding: 1rem !important;
        }
        
        .stat-number, .trust-number {
            font-size: 1.5rem !important;
        }
        
        .stat-label, .trust-label {
            font-size: 0.8rem !important;
        }
    }
}

/* Cable animation responsive fixes */
@media (max-width: 768px) {
    .cable-connection-section {
        height: 150vh !important;
    }
    
    .cable-animation-wrapper {
        height: 200px !important;
    }
    
    .generac-main-title {
        font-size: clamp(2rem, 8vw, 4rem) !important;
    }
    
    .generac-title-overlay {
        top: 65% !important;
    }
}

/* Print styles for debugging */
@media print {
    .mobile-layout-info::after {
        content: "Mobile: " attr(data-mobile-layout) " | Tablet: " attr(data-tablet-layout) " | Desktop: " attr(data-desktop-layout);
        display: block;
        font-size: 10px;
        color: #666;
        margin-top: 5px;
    }
}

/* Fixed Mobile CSS - Add to style.css - PRESERVES DESKTOP LAYOUT */

/* Default desktop layouts (preserve original 2x2 for hero stats) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Keep desktop as 2x2 */
    gap: 2rem;
}

.trust-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Keep desktop as 4x1 */
    gap: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* Keep desktop responsive */
    gap: 3rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Keep desktop responsive */
    gap: 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Keep desktop responsive */
    gap: 3rem;
}

/* Dynamic Mobile Layout CSS - ONLY affects mobile/tablet */
<?php if (isset($mobileLayouts) && is_array($mobileLayouts)): ?>
<?php foreach ($mobileLayouts as $sectionName => $layout): ?>
/* Layout for <?php echo $sectionName; ?> section */

/* Tablet layout (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .<?php echo $sectionName; ?>-grid {
        grid-template-columns: repeat(<?php echo $layout['grid_columns_tablet'] ?? 2; ?>, 1fr) !important;
        gap: <?php echo $layout['gap_size'] ?? '1rem'; ?> !important;
    }
}

/* Mobile layout (up to 768px) */
@media (max-width: 768px) {
    .<?php echo $sectionName; ?>-grid {
        grid-template-columns: repeat(<?php echo $layout['grid_columns_mobile'] ?? 1; ?>, 1fr) !important;
        gap: <?php echo $layout['gap_size'] ?? '1rem'; ?> !important;
        text-align: <?php echo $layout['text_align'] ?? 'center'; ?>;
    }
    
    <?php if (!empty($layout['background_color'])): ?>
    .<?php echo $sectionName; ?>-section {
        background-color: <?php echo $layout['background_color']; ?> !important;
    }
    <?php endif; ?>
    
    <?php if (!empty($layout['text_color'])): ?>
    .<?php echo $sectionName; ?>-section {
        color: <?php echo $layout['text_color']; ?> !important;
    }
    <?php endif; ?>
}
<?php endforeach; ?>
<?php endif; ?>

/* General Mobile Settings */
@media (max-width: <?php echo $mobile['breakpoint'] ?? 768; ?>px) {
    body {
        font-size: <?php echo $mobile['base_font_size'] ?? 14; ?>px !important;
    }
    
    h1, h2, h3 {
        transform: scale(<?php echo $mobile['heading_scale'] ?? 0.90; ?>);
        transform-origin: left center;
    }
    
    section {
        padding: <?php echo $mobile['section_padding'] ?? 40; ?>px 0 !important;
    }
    
    .nav-menu {
        background: <?php echo $mobile['menu_bg_color'] ?? '#ffffff'; ?> !important;
    }
    
    .nav-menu li a {
        color: <?php echo $mobile['menu_text_color'] ?? '#1f2937'; ?> !important;
    }
    
    /* Section visibility controls */
    <?php if (!($mobile['show_hero'] ?? 1)): ?>.hero { display: none !important; }<?php endif; ?>
    <?php if (!($mobile['show_cable'] ?? 1)): ?>.cable-connection-section { display: none !important; }<?php endif; ?>
    <?php if (!($mobile['show_trust'] ?? 1)): ?>.trust-section { display: none !important; }<?php endif; ?>
    <?php if (!($mobile['show_services'] ?? 1)): ?>.services-showcase { display: none !important; }<?php endif; ?>
    <?php if (!($mobile['show_projects'] ?? 1)): ?>.projects-section { display: none !important; }<?php endif; ?>
    <?php if (!($mobile['show_blog'] ?? 1)): ?>.blog-section { display: none !important; }<?php endif; ?>
}

/* Very small screens adjustments */
@media (max-width: 480px) {
    .stats-grid,
    .trust-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .stat-item,
    .trust-stat {
        padding: 1rem !important;
    }
    
    .stat-number,
    .trust-number {
        font-size: 1.5rem !important;
    }
}

/* Cable animation mobile fixes */
@media (max-width: 768px) {
    .cable-connection-section {
        height: 150vh !important;
    }
    
    .cable-animation-wrapper {
        height: 200px !important;
    }
    
    .generac-main-title {
        font-size: clamp(2rem, 8vw, 4rem) !important;
    }
    
    .generac-title-overlay {
        top: 65% !important;
    }
}