:root {
    --primary-color: #2563EB;
    --primary-dark: #1D4ED8;
    --secondary-color: #3B82F6;
    --accent-color: #F59E0B;
    --accent-light: #FBBF24;
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-color: #4B5563;
    --heading-color: #111827;
    --footer-bg: #0F172A;
    --border-color: #E2E8F0;
    --card-shadow: 0 4px 12px -1px rgba(0, 0, 0, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.1), 0 10px 10px -5px rgba(37, 99, 235, 0.04);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    --gradient-dark: linear-gradient(135deg, #0F172A, #1E293B);

    /* Category Colors for Search Results */
    --electrical-color: #2563EB;
    --instrumentation-color: #059669;
    --mechanical-color: #D97706;
}

body.dark-mode {
    --primary-color: #10B981;
    --primary-dark: #059669;
    --secondary-color: #34D399;
    --accent-color: #F59E0B;
    --accent-light: #FBBF24;
    --bg-color: #0F172A;
    --card-bg: #1E293B;
    --text-color: #CBD5E1;
    --heading-color: #F1F5F9;
    --footer-bg: #020617;
    --border-color: #334155;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--accent-light));

    --electrical-color: #60A5FA;
    --instrumentation-color: #34D399;
    --mechanical-color: #FBBF24;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Enhanced Header & Navigation */
.header {
    background: var(--gradient-primary);
    color: white;
    padding-bottom: 24px; /* Reduced from 120px */
    position: relative;
    z-index: 50; /* Ensure header and dropdowns stay on top */
    overflow: visible;
}

/* New Container for Background Animation to prevent overflow issues */
.header-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.header-bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
    animation: rotate 40s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media(max-width:768px) {
    .header-bg-animation::before {
        animation: none;
    }
}

/* --- MEGA MENU STYLES --- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--card-bg);
    /* Min-width increased for Mega Menu */
    min-width: 800px; /* Wide menu */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 24px; /* More padding */
    z-index: 1000;
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Border top accent */
    border-top: 4px solid var(--primary-color);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Mega Menu Layout */
.repo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Columns */
    gap: 20px;
}

.dropdown-menu a {
    display: block;
    padding: 6px 12px;
    color: var(--heading-color) !important;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 6px;
    white-space: nowrap;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-menu a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color) !important;
    transform: translateX(3px) !important;
}

.view-all-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.view-all-link {
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    text-transform: uppercase;
    font-size: 0.9rem !important;
    letter-spacing: 0.5px;
    display: inline-block;
}

.dropdown-menu a::after {
    display: none !important;
}

/* Specific Category Accents */
.dropdown:nth-child(2) .dropdown-menu { border-top-color: var(--electrical-color); }
.dropdown:nth-child(3) .dropdown-menu { border-top-color: var(--instrumentation-color); }
.dropdown:nth-child(4) .dropdown-menu { border-top-color: var(--mechanical-color); }

/* Professional Navigation Bar */
/* Professional Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0; /* Tightened from 24px */
    position: relative;
    z-index: 10;
}

/* Home Page specific header style */
.header.home-header {
    padding-bottom: 20px; /* Drastically reduced from 64px/120px */
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px; /* Reduced gap */
    text-decoration: none;
    color: white;
    flex-wrap: nowrap;
    flex-direction: row; 
}

.logo {
    height: 42px; /* Sleek logo size (was 56px) */
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.35rem; /* Balanced with new logo size */
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.5px;
    line-height: 1;
    white-space: nowrap;
    position: relative;
    top: 1px; /* Optical alignment correction */
}

/* Enhanced Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links {
    display: flex;
    gap: 20px; /* Tighter spacing */
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600; /* Increased weight for legibility */
    font-size: 0.95rem; /* Slight reduction for elegance */
    transition: all 0.3s;
    padding: 6px 10px;
    border-radius: 6px;
    position: relative;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--accent-color);
    transition: transform 0.3s;
}

.nav-links a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    z-index: 1000;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle .icon {
    color: white;
    font-size: 1.2rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    transition: .4s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--accent-color);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* HERO SECTION & SEARCH STYLES */
.hero {
    text-align: center;
    padding: 60px 0 0;
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.3rem;
    max-width: 750px;
    margin: 0 auto 2.5rem auto;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
    font-weight: 400;
    line-height: 1.6;
}

/* --- SEARCH BAR CSS START (Adapted for Home Page) --- */
.search-wrapper {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
    z-index: 100;
}

.search-input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border-radius: 50px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #FFFFFF;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.2rem;
    z-index: 10;
}

/* Search Results Container */
.search-results-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border-radius: 16px;
    margin-top: 10px;
    padding: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: none;
    /* Hidden by default */
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
    z-index: 200;
    border: 1px solid var(--border-color);
}

.search-results-overlay.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

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

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

/* Styles for individual search results */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--heading-color);
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--bg-color);
}

.search-result-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Colors for Result Icons based on Category (Assigned via JS or specific classes) */
.search-result-item.electrical i {
    color: var(--electrical-color);
    background: rgba(37, 99, 235, 0.1);
}

.search-result-item.instrumentation i {
    color: var(--instrumentation-color);
    background: rgba(5, 150, 105, 0.1);
}

.search-result-item.mechanical i {
    color: var(--mechanical-color);
    background: rgba(217, 119, 6, 0.1);
}

.search-result-text {
    display: flex;
    flex-direction: column;
}

.result-name {
    font-weight: 600;
    font-size: 1rem;
}

.no-results-msg {
    padding: 20px;
    text-align: center;
    color: var(--text-color);
    font-style: italic;
}

/* --- SEARCH BAR CSS END --- */

.cta-button {
    background: var(--gradient-accent);
    color: #111827;
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    z-index: -1;
    transition: opacity 0.3s;
    opacity: 0;
}

.cta-button:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.cta-button:hover::before {
    opacity: 1;
}

main {
    position: relative;
    z-index: 10;
}

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

.section-title {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

.section-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto 5rem auto;
    font-weight: 400;
    line-height: 1.6;
}

.generic-button {
    background: var(--gradient-primary);
    color: white;
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.generic-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Why Choose Us Section */
#why-choose-us {
    background-color: var(--card-bg);
    padding-top: 100px;
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 48px 32px;
    border-radius: 16px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-in-out;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--card-hover-shadow);
}

.feature-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    line-height: 1;
    transition: transform 0.3s ease-in-out;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
}

.feature-card h3 {
    font-size: 1.6rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.feature-card p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* About Author */
#about-author {
    background-color: var(--bg-color);
}

body.dark-mode #about-author {
    background-color: var(--bg-color);
}

.about-author-content {
    display: flex;
    align-items: center;
    gap: 48px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 60px;
    box-shadow: var(--card-shadow);
}

.author-avatar-large {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 6px solid var(--primary-color);
    flex-shrink: 0;
}

.author-bio .section-title {
    text-align: left;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.author-creds {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.author-bio p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

/* Tools Section */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 48px;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
    border: 1px solid var(--border-color);
    position: relative;
}


.tool-card:hover {
    transform: translateY(-16px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
}

.tool-card-content {
    padding: 40px 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.tool-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    line-height: 1;
}

.tool-card h3 {
    font-size: 1.8rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.tool-card p {
    flex-grow: 1;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.tool-card .card-instruction {
    background: var(--gradient-primary);
    color: white;
    padding: 16px 28px;
    border-radius: 50px;
    text-align: center;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tool-card:hover .card-instruction {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.card-instruction i {
    transition: transform 0.3s ease-in-out;
}

.tool-card:hover .card-instruction i {
    transform: translateX(8px);
}

/* How It Works Section */
.how-it-works-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    position: relative;
}

.step-card {
    flex: 1;
    max-width: 320px;
    padding: 24px;
    text-align: center;
    position: relative;
}

.step-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2rem auto;
    font-size: 2.5rem;
    color: white;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.step-card:hover .step-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

.step-card h3 {
    font-size: 1.4rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.arrow-icon {
    font-size: 2.5rem;
    color: var(--border-color);
    margin-top: 60px;
    position: relative;
    z-index: 1;
    animation: bounce-horizontal 2s infinite;
}

@keyframes bounce-horizontal {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(0);
    }

    40% {
        transform: translateX(10px);
    }

    60% {
        transform: translateX(5px);
    }
}

/* Standards Section */
#standards {
    background-color: var(--card-bg);
}

.standards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

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

.standard-svg {
    width: 120px;
    height: 60px;
    transition: filter 0.3s, opacity 0.3s, transform 0.3s;
    filter: grayscale(100%) opacity(0.6);
    border-radius: 8px;
}

.standard-logo:hover .standard-svg {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

body.dark-mode .standard-svg {
    filter: brightness(0) invert(1) opacity(0.7);
}

body.dark-mode .standard-logo:hover .standard-svg {
    filter: brightness(0) invert(1) opacity(1);
}

.standard-logo p {
    margin-top: 12px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Articles Section */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.article-card {
    background: var(--bg-color);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
}

.article-placeholder-svg {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card:hover .article-placeholder-svg {
    transform: scale(1.05);
}

.article-card-content {
    padding: 32px;
}

.article-card-content h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card-content h3 {
    font-size: 1.4rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
    line-height: 1.4;
    font-weight: 700;
}

.article-card-content p {
    font-size: 1rem;
    line-height: 1.6;
}

.articles-footer {
    text-align: center;
    margin-top: 5rem;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.testimonial-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    position: relative;
    transition: transform 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-8px);
}

.testimonial-icon {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 3.5rem;
    color: var(--primary-color);
    opacity: 0.1;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.author-info h4 {
    color: var(--heading-color);
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
}

.author-info p {
    color: var(--text-color);
    margin: 0;
    font-size: 0.95rem;
}

/* FAQ Section */
#faq {
    background-color: var(--card-bg);
}

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

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 28px 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading-color);
    transition: color 0.3s;
}

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

.faq-question i {
    transition: transform 0.3s ease-in-out;
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}

.faq-answer p {
    padding-top: 1.5rem;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.7;
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* Footer */
footer {
    background: var(--gradient-dark);
    color: #CBD5E1;
    padding: 60px 0 30px 0;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-left {
    flex: 1;
    min-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    text-decoration: none;
    color: white;
}

.footer-logo img {
    height: 40px;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
}

.footer-description {
    margin-bottom: 25px;
    max-width: 400px;
    line-height: 1.6;
}

.social-buttons {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.social-btn.linkedin {
    background-color: #0A66C2;
}

.social-btn.youtube {
    background-color: #FF0000;
}

.social-btn.twitter {
    background-color: #1DA1F2;
}

.social-btn.facebook {
    background-color: #1877F2;
}

.social-btn.whatsapp {
    background-color: #25D366;
}

.footer-right {
    flex: 1;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    min-width: 300px;
}

.footer-col {
    min-width: 150px;
}

.footer-col h4 {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: #CBD5E1;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

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

.footer-disclaimer {
    text-align: center;
    margin: 30px auto;
    padding-top: 30px;
    border-top: 1px solid #334155;
    max-width: 800px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #94A3B8;
}

.creator-name {
    color: var(--secondary-color);
    font-weight: bold;
}

body.dark-mode .creator-name {
    color: var(--secondary-color);
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gradient-primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    border: none;
}

#back-to-top.show {
    display: flex;
    opacity: 1;
}

#back-to-top:hover {
    transform: scale(1.1);
}

/* Cookie Consent Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #0F172A;
    color: white;
    padding: 20px;
    z-index: 9999;
    display: none;
    /* Hidden by default, shown via JS */
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
    border-top: 1px solid #334155;
}

.cookie-banner p {
    margin-bottom: 16px;
    font-size: 0.95rem;
    max-width: 900px;
    line-height: 1.5;
}

.cookie-banner a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 16px;
}

.cookie-btn {
    padding: 10px 24px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.cookie-btn:hover {
    transform: scale(1.05);
}

.cookie-btn.accept {
    background-color: var(--primary-color);
    color: white;
}

.cookie-btn.decline {
    background-color: transparent;
    border: 1px solid #CBD5E1;
    color: #CBD5E1;
}

@media (min-width: 768px) {
    .cookie-banner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 20px 40px;
    }

    .cookie-banner p {
        margin-bottom: 0;
        margin-right: 20px;
    }
}

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

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

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .hero h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.6rem;
    }
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.6rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .how-it-works-grid {
        flex-direction: column;
        gap: 60px;
        align-items: center;
    }

    .how-it-works-grid .arrow-icon {
        display: none;
    }

    .section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .footer-content {
        flex-direction: column;
    }

    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--gradient-dark);
        flex-direction: column;
        padding: 100px 30px 30px;
        gap: 24px;
        transition: left 0.4s ease-in-out;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
        z-index: 999;
        overflow-y: auto; /* Added for scrollable menu */
    }

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

    .nav-links a {
        width: 100%;
        padding: 12px 16px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
    }

    .nav-menu {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        gap: 16px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero {
        padding: 60px 0 0;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

    .logo {
        height: 48px;
    }

    .footer-right {
        flex-direction: column;
        gap: 30px;
    }

    /* Responsive "About Author" section */
    .about-author-content {
        flex-direction: column;
        text-align: center;
        padding: 40px 24px;
    }

    .author-bio .section-title {
        text-align: center;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }

    .feature-card,
    .tool-card-content,
    .testimonial-card {
        padding: 32px 24px;
    }
}

/* --- SILO GRID STYLES (Rich Context Mode) --- */
.silo-grid {
    display: grid;
    /* Increased min-width to allow for descriptive text */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.silo-card {
    background: var(--card-bg);
    padding: 24px 20px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.silo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary-color);
}

.silo-card i {
    font-size: 2rem;
    margin-bottom: 16px;
    transition: transform 0.2s ease-in-out;
}

.silo-card:hover i {
    transform: scale(1.1);
}

.silo-card span {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--heading-color);
}

.silo-card p {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
}

/* Category Specific Colors */
.silo-card.electrical i {
    color: var(--electrical-color);
}

.silo-card.electrical:hover {
    border-color: var(--electrical-color);
}

.silo-card.instrumentation i {
    color: var(--instrumentation-color);
}

.silo-card.instrumentation:hover {
    border-color: var(--instrumentation-color);
}

.silo-card.mechanical i {
    color: var(--mechanical-color);
}

.silo-card.mechanical:hover {
    border-color: var(--mechanical-color);
}

/* --- NEW SEO INTRO BLOCK STYLES --- */
.page-intro-block {
    max-width: 1000px;
    margin: 0 auto 4rem auto;
    text-align: justify;
    line-height: 1.8;
    position: relative;
    padding: 0 10px;
}

.page-intro-block h2 {
    text-align: center;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.page-intro-block p {
    font-size: 1.15rem;
    color: var(--text-color);
    margin-bottom: 0;
}

.page-intro-block p strong {
    color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .page-intro-block {
        text-align: left;
        padding: 0;
    }

    .page-intro-block h2 {
        font-size: 1.8rem;
    }
}

/* --- TECHNICAL INSIGHTS SECTION STYLES --- */
.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin: 3rem 0 5rem 0;
}

.insight-card {
    background-color: var(--card-bg);
    padding: 32px;
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.insight-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    padding: 12px;
    border-radius: 12px;
    display: inline-block;
}

.insight-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
    font-weight: 700;
}

.insight-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
    text-align: left;
    /* Easier to read for technical concepts */
}

/* --- Mobile Dropdown Overrides --- */
@media (max-width: 768px) {
    .dropdown {
        width: 100%;
        display: block;
    }

    .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        min-width: 0; /* Reset min-width for mobile */
        transform: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.2);
        border: none;
        padding: 0;
        display: none;
        opacity: 1;
        visibility: visible;
        margin-top: 10px;
        border-top: none; /* Remove accent border on mobile */
    }

    .repo-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .dropdown-menu > div {
        /* Ensure columns stack */
        display: flex;
        flex-direction: column;
    }

    .dropdown.active .dropdown-menu {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .dropdown-menu a {
        background: transparent;
        color: rgba(255, 255, 255, 0.8) !important;
        padding: 12px 16px 12px 30px;
        font-size: 0.9rem;
        white-space: normal; /* Allow text wrap */
        overflow: visible;
        text-overflow: clip;
    }

    .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.05);
        color: white !important;
        transform: none !important;
    }

    /* Rotate arrow when active */
    .dropdown.active .dropdown-toggle i {
        transform: rotate(180deg);
    }
}

/* --- HOMEPAGE GATEWAY SECTION --- */
.gateway-section {
    padding: 60px 0 0px 0; /* Adjusted padding */
    background: var(--bg-color);
}

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

.gateway-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--card-shadow);
    height: 100%;
}

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

.gateway-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--card-accent);
}

.gateway-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--card-icon-bg);
    color: var(--card-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

.gateway-card:hover .gateway-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.gateway-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 12px;
}

.gateway-desc {
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.gateway-link {
    font-weight: 600;
    color: var(--card-accent);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s;
    margin-top: auto; /* Push to bottom */
}

.gateway-card:hover .gateway-link {
    gap: 12px;
}

/* Specific Card Themes */
.gateway-card.electrical {
    --card-accent: var(--electrical-color);
    --card-icon-bg: rgba(37, 99, 235, 0.1);
}

.gateway-card.instrumentation {
    --card-accent: var(--instrumentation-color);
    --card-icon-bg: rgba(5, 150, 105, 0.1);
}

.gateway-card.mechanical {
    --card-accent: var(--mechanical-color);
    --card-icon-bg: rgba(217, 119, 6, 0.1);
}

/* Insight Grid Enhancements */
.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}