@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #00D1FF;
    --primary-hover: #00B8E6;
    --text-dark: #1A1A1A;
    --text-light: #FFFFFF;
    --bg-light: #FFFFFF;
    --navbar-height: 80px;
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

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

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

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 209, 255, 0.3);
}

/* Header & Navbar */
.header {
    height: var(--navbar-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: #FFFFFF;
    /* Solid white background as per reference */
    display: flex;
    align-items: center;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Subtle shadow for depth */
}

/* No need for .header.scrolled transparency logic if it's always white */
/* But keeping .header.scrolled for potential shadow increase if desired */
.header.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header.scrolled .nav-link {
    color: var(--text-dark);
}

/* On transparent header, links should be white if over dark hero */
.nav-link {
    color: var(--text-dark);
    /* Default, adjust if needed */
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 30px;
    /* Minimum gap between logo, links, and CTA */
}

.logo {
    flex-shrink: 0;
    margin-right: 20px;
}

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

.nav-links {
    display: flex;
    gap: 40px;
    /* Increased gap between links */
    align-items: center;
    flex-grow: 1;
    justify-content: center;
    /* Center the links in the middle */
}

.nav-link {
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-cta {
    display: flex;
    align-items: center;
}

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

@media (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--navbar-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        background-color: var(--bg-light);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s;
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-link {
        font-size: 20px;
    }

    .nav-cta {
        display: none;
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    /* Changed from height to min-height for safety */
    width: 100%;
    background-image: url('images/hero.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding-top: calc(var(--navbar-height) + 60px);
    /* Increased padding to prevent overlap */
    padding-bottom: 60px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
    z-index: 1;
}

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

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    text-wrap: balance;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 1s ease-out forwards;
}

/* Section Utilities */
.section {
    padding: 100px 0;
}

.section-alt {
    background-color: #F8F9FA;
}

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

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid System */
.grid {
    display: grid;
    gap: 30px;
}

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

/* Cards */
.card {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    transition: var(--transition);
    border: 1px solid #eee;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 24px;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.card p {
    color: #666;
    font-size: 0.95rem;
}

/* Product Section */
.product-row {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-top: 40px;
}

.product-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.product-info {
    flex: 1;
}

.product-info h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.product-info p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #444;
}

.product-features {
    margin: 30px 0;
}

.product-features h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.product-features ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
}

.product-features i {
    color: var(--primary);
    font-size: 1.2rem;
}

.product-actions {
    margin-top: 40px;
}

@media (max-width: 900px) {
    .product-row {
        flex-direction: column;
        text-align: center;
    }

    .product-features ul {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        /* Better for mobile performance */
    }

    .nav-cta {
        display: none;
        /* Hide on mobile navbar for now, can add a burger menu later */
    }
}

/* Image Comparison Slider */
.comparison-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.img-comparison-slider {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 500px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.img-comparison-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    clip-path: inset(0 50% 0 0);
    /* Initial state */
    -webkit-clip-path: inset(0 50% 0 0);
}

.img-after {
    z-index: 0;
}

.slider {
    position: absolute;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    margin: 0;
    transition: all .2s;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    cursor: ew-resize;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 4px;
    height: 500px;
    background: white;
    cursor: ew-resize;
}

.slider-button {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 11;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.slider-button::before,
.slider-button::after {
    content: "";
    border: solid #333;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    position: absolute;
}

.slider-button::before {
    transform: rotate(135deg);
    left: 10px;
}

.slider-button::after {
    transform: rotate(-45deg);
    right: 10px;
}

/* Checklist Grouping */
.checklist-group {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 30px 0;
}

.checklist h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.checklist ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #555;
}

.checklist i {
    color: var(--primary);
}

/* About Us Polish */
.product-row.reverse {
    flex-direction: row-reverse;
}

@media (max-width: 900px) {
    .product-row.reverse {
        flex-direction: column;
    }

    .img-comparison-slider {
        height: auto;
        aspect-ratio: 16/10;
        max-width: 100%;
    }

    .slider::-webkit-slider-thumb {
        height: 450px;
        /* Taller to cover the aspect ratio */
    }
}

/* Stats Bar */
.stats-bar {
    background-color: #1A1A1A;
    padding: 60px 0;
    color: var(--text-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* How It Works (Installer Process) */
.how-it-works {
    background-color: #1A1A1A;
    padding: 100px 0;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.process-card {
    background-color: #111111;
    padding: 50px 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.process-card:hover {
    transform: translateY(-10px);
}

.process-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: invert(65%) sepia(85%) saturate(1637%) hue-rotate(155deg) brightness(101%) contrast(105%);
    /* Matching Cyan Primary */
}

.process-card h3 {
    color: #FFFFFF;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.process-card p {
    color: #BBBBBB;
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .process-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Certificates Section */
.certificates {
    padding: 80px 0;
    background-color: #FFFFFF;
}

.certificates-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 100px;
    margin-top: 50px;
}

.certificates-grid img {
    max-width: 250px;
    height: auto;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.certificates-grid img:hover {
    opacity: 1;
}

/* Projects Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    aspect-ratio: 4/5;
}

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

@media (max-width: 900px) {
    .certificates-grid {
        gap: 50px;
        flex-direction: column;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Map Section */
.map-section {
    line-height: 0;
}

.map-section iframe {
    width: 100%;
}

/* Footer Styles */
.main-footer {
    background-color: #111111;
    color: #FFFFFF;
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-logo {
    max-width: 200px;
}

.footer-col h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 0.05em;
    color: #FFFFFF;
}

.footer-col p {
    color: #BBBBBB;
    font-size: 0.95rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col i {
    color: var(--primary);
    width: 20px;
}

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

.social-links a {
    color: #FFFFFF;
    background-color: #222222;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.footer-bottom {
    background-color: #000000;
    padding: 25px 0;
    border-top: 1px solid #222222;
    text-align: center;
}

.footer-bottom p {
    color: #888888;
    font-size: 0.85rem;
    margin: 0;
}

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

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .footer-logo {
        margin: 0 auto;
    }

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

    .footer-col p {
        justify-content: center;
    }
}