:root {
    /* Brand Theme Colors matched from https://varghesebenny.wixsite.com/elecon */
    --primary-color: #1e2d3b;       /* Dark slate navy (Wix header, cards, text) */
    --primary-dark: #141f29;        /* Deeper slate (hero overlay, footer) */
    --primary-green: #509c35;      /* Elecon vibrant signature green (rgb 80, 156, 53) */
    --primary-green-hover: #3f7e29; /* Darker green hover state (rgb 53, 104, 35) */
    --primary-green-light: #eef7eb; /* Soft green tint for subtle accents */
    --secondary-color: #509c35;    /* Brand green for interactive accents */
    --secondary-hover: #3f7e29;
    --accent-yellow: #edcd1f;      /* Wix signature golden-yellow underline (rgb 237, 205, 31) */
    --accent-yellow-hover: #dbbc14;
    --text-color: #3b3a3a;          /* Charcoal readable body text */
    --text-muted: #727272;          /* Muted descriptions */
    --bg-light: #f7f9fa;           /* Clean soft background */
    --bg-white: #ffffff;
    --bg-dark: #141f29;            /* Deep dark slate for footer */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --border-subtle: rgba(30, 45, 59, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(30, 45, 59, 0.08);
    --shadow-lg: 0 16px 36px rgba(30, 45, 59, 0.12);
    --header-height-desktop: 72px;
    --header-height-mobile: 62px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    color: var(--text-color);
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    line-height: 1.6;
    background-color: #ffffff;
    -webkit-text-size-adjust: 100%;
}

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

/* Scroll Offset for Fixed Header */
section, [id] {
    scroll-margin-top: calc(var(--header-height-desktop) + 10px);
}

@media (max-width: 860px) {
    section, [id] {
        scroll-margin-top: calc(var(--header-height-mobile) + 10px);
    }
}

/* ==========================================================================
   Header & Navbar (Matching Wix Header Layout & Theme)
   ========================================================================== */
.navbar {
    background: #1e2d3b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height-desktop);
}

/* Signature Green Brand Container Block (Exact Wix Style) */
.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    background: var(--primary-green);
    padding: 0 24px;
    height: 100%;
    margin-left: -24px;
    transition: background-color 0.25s ease;
    user-select: none;
}

.navbar-brand:hover {
    background: var(--primary-green-hover);
}

.brand-logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
}

.brand-name {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: capitalize;
}

.brand-sub {
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--font-main);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 3px;
}

/* Desktop Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-item {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 6px 0;
    position: relative;
    transition: color 0.25s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-green);
    transition: width 0.25s ease;
    border-radius: 2px;
}

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

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

.nav-item.nav-btn {
    background: var(--primary-green);
    color: #ffffff !important;
    padding: 9px 22px;
    border-radius: 4px;
    transition: all 0.25s ease;
    margin-left: 6px;
    font-weight: 700;
}

.nav-item.nav-btn::after {
    display: none;
}

.nav-item.nav-btn:hover {
    background: var(--primary-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(80, 156, 53, 0.35);
}

/* Mobile Toggle Hamburger Button */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--primary-green);
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.nav-toggle.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation Drawer */
@media (max-width: 860px) {
    .nav-container {
        height: var(--header-height-mobile);
        padding: 0 16px;
    }

    .navbar-brand {
        height: var(--header-height-mobile);
        padding: 0 16px;
        margin-left: -16px;
    }

    .brand-logo-img {
        height: 34px;
    }

    .brand-name {
        font-size: 18px;
    }

    .brand-sub {
        font-size: 8px;
        letter-spacing: 1.8px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(30, 45, 59, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
        animation: slideDown 0.25s ease forwards;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-item {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 6px;
        color: rgba(255, 255, 255, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .nav-item::after {
        display: none;
    }

    .nav-item:hover, .nav-item.active {
        background: rgba(255, 255, 255, 0.08);
        color: var(--primary-green);
        padding-left: 18px;
    }

    .nav-item.nav-btn {
        margin-top: 10px;
        text-align: center;
        border-radius: 6px;
        padding: 12px !important;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-height-desktop));
    min-height: calc(100dvh - var(--header-height-desktop));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 60px 24px;
    overflow: hidden;
    background-color: var(--primary-color);
}

.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 45, 59, 0.78) 0%, rgba(20, 31, 41, 0.88) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 860px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.15;
    margin: 0 0 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.hero p {
    font-size: clamp(15px, 2vw, 19px);
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto 32px;
    color: rgba(255, 255, 255, 0.92);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 34px;
    background: var(--primary-green);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(80, 156, 53, 0.35);
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 156, 53, 0.45);
}

@media (max-width: 860px) {
    .hero {
        min-height: calc(100dvh - var(--header-height-mobile));
        padding: 40px 18px;
    }

    .hero h1 {
        font-size: clamp(26px, 7vw, 36px);
        margin-bottom: 14px;
    }

    .hero p {
        font-size: 14.5px;
        line-height: 1.5;
        margin-bottom: 24px;
        padding: 0 4px;
    }

    .btn-primary {
        padding: 12px 28px;
        font-size: 14px;
        width: 100%;
        max-width: 240px;
    }
}

/* ==========================================================================
   Sections & Common Layout
   ========================================================================== */
.section {
    padding: 70px 24px;
    width: 100%;
}

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

/* Section Title with the signature yellow underline bar from Wix */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(26px, 3.5vw, 36px);
    text-align: center;
    margin: 0 0 40px;
    color: var(--primary-color);
    position: relative;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.section-title::after {
    content: '';
    width: 65px;
    height: 4px;
    background: var(--accent-yellow);
    display: block;
    margin: 14px auto 0;
    border-radius: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--bg-white);
    padding: 32px 28px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(80, 156, 53, 0.35);
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--primary-color);
    margin: 0 0 14px;
    font-weight: 700;
}

.card p {
    color: var(--text-color);
    line-height: 1.65;
    font-size: 15px;
    margin: 0;
}

/* Service / Project Cards */
.service-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.service-content {
    padding: 24px;
    background: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-content h3 {
    font-size: 18px;
    margin: 0 0 10px;
    color: var(--primary-color);
}

.service-content p {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.6;
}

/* ==========================================================================
   Client Section Boxes (Home & Category Pages)
   ========================================================================== */

/* 1. Home Page Industry/Client Cards */
.home-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.home-cat-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 160px;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-cat-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s ease;
}

.home-cat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(30, 45, 59, 0.15) 0%, rgba(30, 45, 59, 0.72) 55%, rgba(20, 31, 41, 0.95) 100%);
    z-index: 2;
    transition: background 0.3s ease;
}

.home-cat-content {
    position: relative;
    z-index: 3;
    padding: 16px 14px;
    width: 100%;
}

.home-cat-content h3 {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 6px 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.client-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    background: var(--accent-yellow);
    color: #1e2d3b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.home-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(30, 45, 59, 0.25);
    border-color: var(--primary-green);
}

.home-cat-card:hover .home-cat-img {
    transform: scale(1.06);
}

.home-cat-card:hover .home-cat-overlay {
    background: linear-gradient(180deg, rgba(30, 45, 59, 0.1) 0%, rgba(30, 45, 59, 0.65) 45%, rgba(20, 31, 41, 0.96) 100%);
}

/* 2. All Clients Page Category Grid (`clients.php`) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    margin-top: 25px;
}

.category-card {
    background: #ffffff;
    padding: 22px 18px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(30, 45, 59, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--primary-color);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 45, 59, 0.12);
    border-color: var(--primary-green);
}

.category-card h2 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--primary-color);
    line-height: 1.3;
}

.category-card p {
    color: var(--primary-green);
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

/* 3. Client Category Client Items Grid (`client_category.php`) */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.client-card {
    background: #ffffff;
    padding: 16px 12px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(30, 45, 59, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 125px;
}

.client-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 45, 59, 0.1);
    border-color: var(--primary-green);
}

.client-logo {
    max-width: 80px;
    max-height: 44px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: grayscale(100%) opacity(0.8);
    transition: all 0.3s ease;
}

.client-card:hover .client-logo {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

.client-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--primary-color);
    font-family: var(--font-heading);
    line-height: 1.25;
}

.client-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
    line-height: 1.3;
}

/* Page Header for subpages */
.page-header {
    background: linear-gradient(135deg, #1e2d3b 0%, #3d5975 100%);
    color: white;
    padding: 48px 20px;
    text-align: center;
    border-bottom: 3px solid var(--accent-yellow);
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(26px, 4.5vw, 40px);
    margin: 0 0 10px 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-header p {
    font-size: clamp(14px, 2vw, 16px);
    opacity: 0.9;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Stats Section */
.stats-section {
    background: var(--primary-color);
    color: white;
    padding: 55px 20px;
    border-top: 3px solid var(--accent-yellow);
    border-bottom: 3px solid var(--accent-yellow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.stat-item {
    padding: 10px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 42px);
    color: var(--accent-yellow);
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
}

.stat-license {
    font-family: var(--font-heading);
    font-size: clamp(16px, 2vw, 20px);
    color: var(--accent-yellow);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
}

.stat-label {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.85);
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: white;
    padding: 55px 24px 22px;
    text-align: center;
    border-top: 4px solid var(--primary-green);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 35px;
    text-align: left;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-col h4 {
    color: var(--primary-green);
    font-family: var(--font-heading);
    font-size: 16px;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.footer-col p, .footer-col a {
    color: #9ca3af;
    text-decoration: none;
    line-height: 1.8;
    font-size: 14px;
}

.footer-col a:hover {
    color: var(--primary-green);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    color: #949494;
    font-size: 13px;
    max-width: 1200px;
    margin: 0 auto;
}

.copyright a, .footer-highlight {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.copyright a:hover, .footer-highlight:hover {
    color: var(--accent-yellow);
    text-decoration: underline;
}

/* ==========================================================================
   Mobile Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .section {
        padding: 40px 16px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 28px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card {
        padding: 20px 16px;
    }

    /* Client Boxes on Mobile (Sleek 2-column compact grid) */
    .home-cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .home-cat-card {
        height: 125px;
        border-radius: 8px;
    }

    .home-cat-content {
        padding: 10px 8px;
    }

    .home-cat-content h3 {
        font-size: 12.5px;
        line-height: 1.2;
        margin-bottom: 4px;
    }

    .client-count-badge {
        font-size: 9.5px;
        padding: 2px 7px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 18px;
    }

    .category-card {
        padding: 14px 10px;
        border-radius: 8px;
        min-height: 85px;
    }

    .category-card h2 {
        font-size: 12px;
        line-height: 1.25;
    }

    .category-card p {
        font-size: 11px;
    }

    .client-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 16px;
    }

    .client-card {
        height: 105px;
        padding: 10px 6px;
        border-radius: 8px;
    }

    .client-logo {
        max-width: 65px;
        max-height: 32px;
        margin-bottom: 6px;
    }

    .client-name {
        font-size: 11.5px;
        line-height: 1.2;
    }

    /* Stats Grid on Mobile */
    .stats-section {
        padding: 35px 14px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 10px;
    }

    .stat-license-item {
        grid-column: span 2;
    }

    .stat-number {
        font-size: 30px;
    }

    .stat-license {
        font-size: 15px;
    }

    .stat-label {
        font-size: 11px;
    }

    .page-header {
        padding: 30px 16px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .service-img {
        height: 160px;
    }

    .service-content {
        padding: 18px 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
}
