@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css");
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap");

:root {
    --primary: #82b440;
    --primary-dark: #6a9632;
    --primary-light: #9cd452;
    --secondary: #1a1a1a;
    --accent: #f4b400;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

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

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

section {
    padding: 80px 0;
}

/* Typography Helpers */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.uppercase { text-transform: uppercase; letter-spacing: 1px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(130, 180, 64, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(130, 180, 64, 0.23);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

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

/* Header & Nav */
header.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000; /* High enough to be above everything */
    transition: var(--transition);
    padding: 20px 0;
    color: white; /* Default white text for hero overlay */
}

header.main-header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
    color: var(--text-main); /* Switch to dark text when background is light */
}

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

.logo img {
    height: 50px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center; /* Fix vertical alignment */
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

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

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

.nav-links a.active {
    color: var(--primary) !important;
}

.nav-links .btn-primary {
    padding: 10px 25px;
    margin-left: 10px;
}

.nav-links .btn-primary::after {
    display: none;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: 
        linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 20%), /* Top shadow for nav */
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
        url('../images/banner_home.jpg') center/cover no-repeat;
    color: white;
    padding-top: 100px;
}

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

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

/* Services Section */
.section-title {
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-title span {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

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

.service-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
}

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

.service-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: block;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Featured Service Cards (Services Page) */
.featured-service {
    display: flex;
    gap: 30px;
    align-items: center;
    grid-column: 1 / -1;
}

.featured-icon {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--radius);
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-icon i {
    margin-bottom: 0;
    margin-right: 0;
}

.featured-content h3 {
    font-size: 2rem;
    color: var(--primary);
}

.featured-content p {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .featured-service {
        grid-column: 1 / -1; /* Keep full width */
        gap: 15px; /* Reduce gap */
        padding: 25px; /* Reduce padding from 40px */
        align-items: flex-start;
    }
    
    .featured-icon {
        width: 80px; /* Specific sizing for mobile */
        height: 80px;
        padding: 15px;
    }
    
    .featured-icon i {
        font-size: 1.8rem; /* Smaller icon */
    }
    
    .featured-content h3 {
        font-size: 1.5rem; /* Smaller title */
        word-break: break-word; /* Prevent overflow */
    }
    
    .featured-content p {
        font-size: 1rem;
    }
}

/* Partners / Certifications */
.partners {
    background: var(--bg-white);
    padding: 60px 0;
}

.partners-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    opacity: 0.7;
    filter: grayscale(1);
    transition: var(--transition);
}

.partners-wrap:hover {
    opacity: 1;
    filter: grayscale(0);
}

.partners-wrap img {
    height: 70px;
    object-fit: contain;
}

.partners-wrap img:first-child {
    height: 90px; /* VCA logo is smaller due to whitespace, so we increase size */
    margin-top: -20px; /* Optical adjustment to align vertically with other logos */
}

/* Footer */
.main-footer {
    background: var(--secondary);
    color: white;
    padding: 80px 0 20px;
}

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

.footer-info h4 {
    margin-bottom: 25px;
    font-size: 1.25rem;
}

.footer-info img {
    height: 40px;
    margin-bottom: 20px;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #999;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--secondary);
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.3);
        padding: 40px;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        color: white !important;
        font-size: 1.25rem;
    }

    .nav-links .btn-primary {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .mobile-menu-btn {
        display: block;
        font-size: 1.8rem;
        z-index: 2001;
        position: relative;
        color: white; /* Visible on hero overlay */
    }
    
    header.main-header.scrolled .mobile-menu-btn {
        color: var(--text-main);
    }

    /* Overlay when menu is open */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(8px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 1500; /* Lower than header (2000) */
    }

    body.menu-open .menu-overlay {
        opacity: 1;
        visibility: visible;
    }

    body.menu-open {
        overflow: hidden;
    }
    
    .hero-content {
        text-align: center;
        margin: 0 auto;
        width: 100%;
        padding: 0 15px; /* Ensure padding prevents edge-to-edge text */
    }
    
    .hero h1 { 
        font-size: 2rem; /* Reduced from 2.8rem to fit 'ELEKTROTECHNIEK' */
        word-wrap: break-word; /* Ensure long words break if necessary */
        line-height: 1.3;
    }
    .hero p { font-size: 1rem; }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    section {
        padding: 50px 0;
    }

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

    .footer-links li i {
        display: none;
    }
}
