/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Original Theme Colors */
    --primary-color: #405caa;
    /* Dark Blue/Grey */
    --secondary-color: #27ae60;
    /* Simple Logic Green */
    --accent-blue: #2980b9;

    /* Neutral Colors */
    --dark-bg: #1a1a1a;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --text-color: #333;
    --card-bg: #ffffff;

    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #ecf0f1;
    /* Light Text for Dark Mode */
    --secondary-color: #2ecc71;
    /* Brighter Green */
    --accent-blue: #3498db;
    --light-bg: #121212;
    --white: #1e1e1e;
    /* Dark Card Bg */
    --text-color: #e0e0e0;
    --card-bg: #2a2a2a;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.logo-box {
    background: #405caa;
    /* Always Dark Blue for contrast */
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-color);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.btn-cta {
    background: var(--secondary-color);
    color: #fff !important;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: var(--transition);
}

.btn-cta:hover {
    background: #219150;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/hero.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 1rem;
    position: relative;
    overflow: hidden;
}

#hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #219150;
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #fff;
    color: var(--primary-color);
}

/* Sections */
section {
    padding: 5rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    /* Adaptive color */
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-color);
    opacity: 0.8;
}

/* Page Header (Inner Pages) */
.page-header {
    background: var(--light-bg);
    padding: 3rem 5%;
    text-align: center;
}

.page-header h1 {
    color: var(--text-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1.2rem;
}

/* Grids & Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-top: 4px solid transparent;
    color: var(--text-color);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--secondary-color);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* Feature Blocks */
.feature-block {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    transition: var(--transition);
    color: var(--text-color);
}

.feature-block:hover {
    transform: translateX(10px);
    border-left: 5px solid var(--secondary-color);
}

/* Alternating Layout (Grid-2) */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

/* Scoped layout for Products and Hardware Pages */
.products-content .grid-2,
.hardware-content .grid-2 {
    grid-template-columns: 2fr 1fr;
}

.grid-2.reverse {
    direction: rtl;
}

.grid-2.reverse>* {
    direction: ltr;
}

.text-content h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.image-content img {
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

/* Scoped image size for Products and Hardware Pages */
.products-content .image-content img,
.hardware-content .image-content img {
    max-width: 350px;
    cursor: pointer;
    margin: 0 auto;
}

.image-content img:hover {
    transform: scale(1.02);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* Testimonials */
.testimonials {
    background: var(--light-bg);
    color: var(--text-color);
    text-align: center;
}

.testimonials h2 {
    color: var(--text-color);
}

.testimonial-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.testimonial-author {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Partners Marquee */
.marquee-container {
    background: var(--card-bg);
    padding: 3rem 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

/* Fade Masks */
.marquee-container::before,
.marquee-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--card-bg), transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--card-bg), transparent);
}

.marquee-content {
    display: inline-block;
    animation: marquee 40s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-content span {
    display: inline-block;
    margin: 0 3rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    opacity: 0.3;
    transition: all 0.3s ease;
    cursor: default;
    letter-spacing: 1px;
}

.marquee-content span:hover {
    opacity: 1;
    color: var(--primary-color);
    transform: scale(1.1);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #fff;
    padding: 4rem 5% 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: #ccc;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 2rem;
    color: #777;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background: var(--card-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 16px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        direction: ltr !important;
        gap: 2rem;
    }
}