/* =================================================================== */
/* 1. FONT IMPORTS & ROOT DESIGN TOKENS (ORIGINAL)                     */
/* =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
    /* Primary Color Palette */
    --color-primary: #9E7A65;
    /* Brown-tan */
    --color-secondary: #DFBE91;
    /* Beige-gold */
    --color-dark: #0F394E;
    /* Dark blue-teal */

    /* Neutrals */
    --color-white: #FFFFFF;
    --color-light-gray: #f8f9fa;
    --color-gray: #e9ecef;
    --color-medium-gray: #6c757d;
    --color-dark-gray: #343a40;

    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Playfair Display', serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --container-padding: 1.5rem;
    --header-height: 80px;

    /* Theme Variables (Default Light) */
    --bg-body: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-main: #343a40;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
}

/* =================================================================== */
/* 2. DARK MODE CONFIGURATION (High Contrast)                          */
/* =================================================================== */
:root[data-theme="dark"] {
    --color-white: #121212;
    /* Redefine white to dark */
    --color-light-gray: #1E1E1E;
    /* Redefine light gray to dark gray */
    --color-gray: #333333;
    /* Redefine border gray */
    --color-medium-gray: #D1D5DB;
    /* Make muted text lighter */
    --color-dark-gray: #F3F4F6;
    /* Make main text whiteish */
    --color-dark: #DFBE91;
    /* Make dark headings Gold for readability */

    --bg-body: #121212;
    --bg-card: #1E1E1E;
    --text-main: #F3F4F6;
    --text-muted: #D1D5DB;
    --border-color: #444444;
}

/* Force Dark Mode Backgrounds */
[data-theme="dark"] body,
[data-theme="dark"] .site-header,
[data-theme="dark"] .mobile-nav {
    background-color: var(--bg-body) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .service-card,
[data-theme="dark"] .project-card,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .certificate-card,
[data-theme="dark"] .download-item,
[data-theme="dark"] .contact-grid,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .landing-card,
[data-theme="dark"] .chat-interface,
[data-theme="dark"] .bg-white {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

/* Fix Input Fields in Dark Mode */
[data-theme="dark"] input:not([type="checkbox"]),
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: #2D2D2D !important;
    color: #FFFFFF !important;
    border-color: #555 !important;
}

/* =================================================================== */
/* 3. GLOBAL STYLES & RESETS                                           */
/* =================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-white);
    color: var(--color-dark-gray);
    line-height: 1.7;
    padding-top: var(--header-height);
    /* Restore padding for fixed header */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-secondary);
    color: var(--color-dark);
    font-weight: 700;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-dark);
}

.prose {
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1em;
}

.prose h2,
.prose h3,
.prose h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* =================================================================== */
/* 4. HEADER & NAVIGATION STYLES (RESTORED STABLE VERSION)             */
/* =================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    height: 70px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    max-width: var(--container-width);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 45px;
    width: auto;
    margin-right: 15px;
}

.logo-text {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
}

.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    padding: 0;
    margin: 0;
    align-items: center;
}

.main-navigation a:not(.special-link) {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-medium-gray);
    position: relative;
    padding: 5px 0;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.main-navigation a:not(.special-link):hover,
.main-navigation a.active:not(.special-link) {
    color: var(--color-dark);
}

.main-navigation a:not(.special-link):hover::after,
.main-navigation a.active:not(.special-link)::after {
    width: 100%;
}

.main-navigation a.special-link {
    font-weight: 700;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 6px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-navigation a.special-link:hover {
    color: var(--color-white);
    background-color: var(--color-primary);
    text-decoration: none;
}

.main-navigation a.special-link::after {
    content: none;
}

.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-dark);
    cursor: pointer;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-color: var(--color-white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
}

.mobile-nav.is-open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-gray);
}

.logo-text-mobile {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-dark);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-dark);
}

.mobile-navigation ul {
    list-style: none;
    padding: 1.5rem;
}

.mobile-navigation li {
    margin-bottom: 1rem;
}

.mobile-navigation a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-dark-gray);
    font-size: 1.1rem;
    font-weight: 500;
}

.mobile-navigation a:hover {
    color: var(--color-primary);
}

@media (max-width: 992px) {
    .main-navigation {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }
}

.mobile-nav-separator {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.mobile-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-label {
    font-weight: 600;
    color: var(--text-main);
}


/* =================================================================== */
/* 5. FOOTER STYLES (RESTORED)                                         */
/* =================================================================== */
.site-footer {
    background-color: var(--color-dark);
    color: var(--color-gray);
    padding: 4rem 0 2rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: var(--container-width);
    margin: auto;
    padding: 0 var(--container-padding);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-logo {
    max-height: 50px;
    margin-bottom: 1rem;
}

.footer-about {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-gray);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icons a {
    color: var(--color-gray);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--color-secondary);
    transform: translateY(-3px);
}

.footer-heading {
    font-family: var(--font-secondary);
    color: var(--color-white);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-links,
.footer-contact {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-gray);
}

.footer-links a:hover {
    color: var(--color-white);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-contact i {
    color: var(--color-secondary);
    margin-top: 5px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.newsletter-form .u-input {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-radius: 20em;
    padding: 10px 20px;
}

.newsletter-form .u-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#newsletter-message {
    margin-top: 10px;
    font-size: 0.9rem;
}

#newsletter-message.success {
    color: #a7f3d0;
}

#newsletter-message.error {
    color: #fca5a5;
}

.footer-copyright {
    text-align: center;
    border-top: 1px solid var(--color-medium-gray);
    padding-top: 2rem;
    font-size: 0.9rem;
}

.whatsapp-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* =================================================================== */
/* 6. HOMEPAGE & GENERAL SECTION STYLES                                */
/* =================================================================== */
.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.bg-light {
    background-color: var(--color-light-gray);
}

.bg-dark {
    background-color: var(--color-dark);
}

.text-white {
    color: var(--color-white);
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-medium-gray);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.hero-section {
    position: relative;
    height: 70vh;
    min-height: 500px;
    background-image: url('https://images.unsplash.com/photo-1600569233157-933b41c3527a?auto=format&fit=crop&w=1470&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 57, 78, 0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--color-white);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-gray);
    max-width: 700px;
    margin: 0 auto 2rem auto;
}

.btn {
    border: none;
    min-width: 12em;
    height: 4.5em;
    border-radius: 3em;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background: #1C1A1C;
    cursor: pointer;
    transition: all 450ms ease-in-out;
    padding: 0 25px;
    text-decoration: none;
}

.sparkle {
    width: 20px;
    height: 20px;
    fill: #AAAAAA;
    transition: all 800ms ease;
}

.text {
    font-weight: 600;
    color: #AAAAAA;
    font-size: 1.05rem;
    transition: all 450ms ease;
}

.btn:hover {
    background: linear-gradient(0deg, var(--color-primary), var(--color-secondary));
    box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4),
        inset 0px -4px 0px 0px rgba(0, 0, 0, 0.2),
        0px 0px 0px 4px rgba(255, 255, 255, 0.1),
        0px 0px 100px 0px var(--color-primary);
    transform: translateY(-2px);
}

.btn:hover .text {
    color: white;
}

.btn:hover .sparkle {
    fill: white;
    transform: scale(1.2) rotate(15deg);
}

.btn:active {
    transform: translateY(0);
    box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: var(--color-dark);
    box-shadow: 0 0.7em 1.5em -0.5em rgba(15, 57, 78, 0.4);
}

.btn-secondary:hover {
    background: var(--color-primary);
    box-shadow: 0 0.5em 1.5em -0.5em rgba(158, 122, 101, 0.4);
}

.btn-dark {
    background: var(--color-dark);
    box-shadow: 0 0.7em 1.5em -0.5em rgba(15, 57, 78, 0.4);
}

.btn-white {
    background: white;
    color: var(--color-dark) !important;
    box-shadow: 0 0.7em 1.5em -0.5em rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    background: #f8f9fa;
    color: var(--color-primary) !important;
}

.btn-white svg {
    color: var(--color-dark);
}

.service-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--color-white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-card-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.service-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card-text {
    color: var(--color-medium-gray);
}

.stats-grid,
.stats-grid-dark {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item .stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-secondary);
    display: block;
}

.stat-item .stat-label {
    font-size: 1rem;
    color: var(--color-gray);
    display: block;
}

.client-logo-container.is-marquee {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.client-logo-container.is-static-flex .logo-track {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.client-logo-container.is-marquee .logo-track {
    display: flex;
    width: var(--track-width);
    animation: scroll 40s linear infinite;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(var(--scroll-dist));
    }
}

.client-logo {
    width: 200px;
    padding: 0 20px;
}

.client-logo img {
    max-width: 100%;
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.client-logo a:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.cta-section {
    background-color: var(--color-dark);
}

.cta-title {
    color: var(--color-white);
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.cta-subtitle {
    color: var(--color-gray);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* =================================================================== */
/* 7. GENERIC INNER PAGE & PROJECTS PAGE STYLES                        */
/* =================================================================== */
.page-header {
    position: relative;
    padding: 4rem 0;
    background-color: var(--color-dark);
    text-align: center;
    color: var(--color-white);
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(15, 57, 78, 0.8), rgba(15, 57, 78, 0.95));
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header-title {
    font-size: 3rem;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background-color: var(--color-white);
    border: 2px solid var(--color-gray);
    color: var(--color-medium-gray);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--color-gray);
    color: var(--color-dark);
}

.filter-btn.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border: 1px solid var(--color-gray);
    opacity: 1;
    transform: scale(1);
}

.project-card.is-hidden {
    opacity: 0;
    transform: scale(0.95);
    display: none;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.project-card-image {
    height: 240px;
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

.project-card-content {
    padding: 1.5rem;
    text-align: left;
}

.project-card-category {
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.project-card-title {
    font-size: 1.3rem;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-dark);
}

.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-medium-gray);
    padding: 2rem;
}

/* =================================================================== */
/* 8. SERVICES PAGE STYLES                                             */
/* =================================================================== */
.service-list-container {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.service-list-item {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 992px) {
    .service-list-item {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .service-list-item:nth-child(even) .service-list-image {
        order: 2;
    }
}

.service-list-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.service-list-content {
    text-align: left;
}

.service-list-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* =================================================================== */
/* 9. ABOUT US PAGE STYLES                                             */
/* =================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 992px) {
    .about-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.mission-vision-box {
    background-color: var(--color-light-gray);
    border-radius: 8px;
    padding: 2rem;
    border-left: 4px solid var(--color-primary);
    height: fit-content;
}

.mission-vision-title {
    font-size: 1.25rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.mission-vision-text {
    font-size: 0.95rem;
    color: var(--color-medium-gray);
    line-height: 1.6;
}

.mission-vision-divider {
    margin: 1.5rem 0;
    border-color: var(--color-gray);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-card {
    padding: 2.5rem 2rem;
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.value-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.value-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.value-text {
    color: var(--color-medium-gray);
}

/* =================================================================== */
/* 10. BLOGS & CERTIFICATES & DOWNLOADS & CONTACT STYLES               */
/* =================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.blog-card-title {
    color: var(--color-dark);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.blog-card-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 15px;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.certificate-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.certificate-card-image {
    height: 220px;
    overflow: hidden;
    background-color: #f9fafb;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.certificate-card-content {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
}

.certificate-card-title {
    color: var(--color-dark);
    font-size: 1.25rem;
    font-weight: 600;
}

.certificate-card-description {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--color-medium-gray);
    margin-top: 0.75rem;
    line-height: 1.6;
}

.downloads-list-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.download-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: white;
    border: 1px solid var(--color-gray);
    border-radius: 8px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.download-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.download-icon i {
    font-size: 2.5rem;
    color: var(--color-medium-gray);
}

.download-item .fa-file-pdf {
    color: #ef4444;
}

.download-item .fa-file-word {
    color: #3b82f6;
}

.download-item .fa-file-excel {
    color: #22c55e;
}

.download-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-dark);
}

.download-desc {
    color: var(--color-medium-gray);
    margin-top: 0.25rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--color-primary);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-download:hover {
    background-color: var(--color-dark);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    background-color: white;
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

@media (min-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr 2fr;
    }
}

.contact-info-block .info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-block .info-icon {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-top: 0.25rem;
}

.contact-info-block h3 {
    color: var(--color-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-form .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .contact-form .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-gray);
    border-radius: 5px;
    font-size: 1rem;
}

.contact-form .btn-submit {
    background-color: var(--color-primary);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form .btn-submit:hover {
    background-color: var(--color-dark);
}

.map-section {
    height: 450px;
    margin-top: 5rem;
}

.map-section iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* =================================================================== */
/* 11. IMAGE GALLERY STYLES                                            */
/* =================================================================== */
.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.gallery-item .gallery-link {
    display: block;
    position: relative;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-in-out;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 57, 78, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2.5rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

.home-gallery-wrapper .image-gallery-grid {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.home-gallery-wrapper .image-gallery-grid::-webkit-scrollbar {
    display: none;
}

.home-gallery-wrapper .gallery-item {
    flex: 0 0 280px;
    height: 220px;
}

.home-gallery-wrapper .gallery-item .gallery-link {
    height: 100%;
}

/* =================================================================== */
/* 12. SOLUTIONS MODULE RESPONSIVENESS                                 */
/* =================================================================== */
.solutions-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
}

.chat-interface {
    display: flex;
    flex-direction: column;
    height: 70vh;
    min-height: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.landing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.landing-card {
    border-top: 5px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .container[style*="margin: 80px auto"] {
        margin: 20px auto !important;
        padding: 15px !important;
    }

    h1,
    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    .landing-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .landing-hero h1 {
        font-size: 28px !important;
    }

    .landing-card {
        padding: 25px;
    }

    .btn-group-landing {
        flex-direction: column;
    }

    .btn-group-landing a {
        width: 100%;
        margin-bottom: 10px;
        display: block;
        text-align: center;
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    .service-list-item,
    .contact-grid,
    .download-item {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .service-list-item:nth-child(even) .service-list-image {
        order: 0;
    }

    .download-icon {
        justify-self: center;
    }

    #user_input {
        width: 100% !important;
        margin-bottom: 10px;
    }

    .chat-input-area {
        flex-direction: column;
    }

    .chat-input-area button {
        width: 100%;
    }

    .flex-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group a,
    .btn-group button {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
}

/* =================================================================== */
/* 13. TOGGLE SWITCH STYLES (FIXED & GLOBAL)                           */
/* =================================================================== */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switch-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-medium-gray);
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    vertical-align: middle;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    appearance: none;
    position: absolute;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--color-primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round:after {
    content: '☀️';
    position: absolute;
    right: 6px;
    top: 4px;
    font-size: 11px;
    line-height: 1;
}

input:checked+.slider:after {
    content: '🌙';
    left: 6px;
    right: auto;
    color: white;
    top: 4px;
}

/* --- Custom Checkbox (Uiverse.io) --- */
.custom-checkbox-container input {
    position: absolute;
    opacity: 0 !important;
    cursor: pointer;
    height: 0 !important;
    width: 0 !important;
    appearance: none !important;
}

.custom-checkbox-container {
    display: block;
    position: relative;
    cursor: pointer;
    font-size: 20px;
    /* Slight reduction from 25px for table fit */
    user-select: none;
    width: 1.3em;
    height: 1.3em;
    margin: 0 auto;
}

/* Create a custom checkbox */
.checkmark {
    position: relative;
    top: 0;
    left: 0;
    height: 1.3em;
    width: 1.3em;
    background: #eee;
    border: 1px solid #ddd;
    border-radius: 50px;
    transition: all 0.7s;
    --spread: 20px;
}

/* When the checkbox is checked, add a blue background */
.custom-checkbox-container input:checked~.checkmark {
    background: black;
    box-shadow: -10px -10px var(--spread) 0px #5B51D8, 0 -10px var(--spread) 0px #833AB4, 10px -10px var(--spread) 0px #E1306C, 10px 0 var(--spread) 0px #FD1D1D, 10px 10px var(--spread) 0px #F77737, 0 10px var(--spread) 0px #FCAF45, -10px 10px var(--spread) 0px #FFDC80;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.custom-checkbox-container input:checked~.checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.custom-checkbox-container .checkmark:after {
    left: 0.45em;
    top: 0.25em;
    width: 0.25em;
    height: 0.5em;
    border: solid white;
    border-width: 0 0.15em 0.15em 0;
    transform: rotate(45deg);
}

/* =================================================================== */
/* 8. DESIGN SYSTEM (SITE-WIDE STANDARDIZATION)                        */
/* =================================================================== */

/* UTILITY: WRAPPERS & LAYOUT */
.u-dashboard-wrapper {
    padding: 30px 0;
    /* background-color: var(--bg-body); Default body bg is fine, mostly for padding standardization */
}

.u-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media(max-width:768px) {
    .u-grid-2 {
        grid-template-columns: 1fr;
    }
}

.u-bg-light-box {
    background: var(--color-light-gray);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.u-flex-row {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.u-btn-small {
    padding: 5px 10px !important;
    font-size: 0.85rem !important;
    height: auto;
}

.u-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.u-flex-gap {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* UTILITY: TYPOGRAPHY & BADGES */
.u-text-right {
    text-align: right;
}

.u-text-muted {
    color: var(--text-muted) !important;
}

.u-font-bold {
    font-weight: bold;
}

.u-text-small {
    font-size: 0.85rem;
}

.u-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.u-badge-primary {
    background: #eef2ff;
    color: #4f46e5;
}

.u-badge-secondary {
    background: var(--color-light-gray);
    color: var(--text-muted);
}

/* COMPONENT: CARDS */
.u-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.u-stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid var(--border-color);
}

.u-stat-num {
    margin: 0;
    font-size: 2rem;
    color: var(--color-dark);
}

.u-stat-label {
    color: var(--text-muted);
}

/* COMPONENT: BUTTONS (Standardized) */
.u-btn {
    padding: 10px 18px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.u-btn-primary {
    background: var(--color-primary);
    color: white !important;
    border-color: var(--color-primary);
}

.u-btn-primary:hover {
    background: var(--color-secondary);
    color: var(--color-dark) !important;
}

.u-btn-secondary {
    background: white;
    border-color: var(--color-primary);
    color: var(--color-primary) !important;
}

.u-btn-secondary:hover {
    background: var(--color-light-gray);
}

.u-btn-outline-dark {
    background: white;
    border-color: var(--color-dark-gray);
    color: var(--color-dark-gray) !important;
}

.u-btn-outline-dark:hover {
    background: var(--color-light-gray);
}

.u-btn-delete {
    background: #fee2e2;
    color: #b91c1c !important;
    border-color: #fecaca;
}

.u-btn-delete:hover {
    background-color: #fecaca;
}

.u-btn-action-primary {
    background: #e0f2fe;
    color: #0369a1 !important;
    border-color: #bae6fd;
}

.u-btn-action-primary:hover {
    background: #bae6fd;
}

.btn-action-cancel {
    /* Maps to: Secondary/Cancel Action */
    background-color: transparent;
    border: 1px solid #333;
    color: #333;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-action-cancel:hover {
    background-color: #f8f9fa;
    border-color: #000;
}

/* COMPONENT: FORMS */
.u-input,
.u-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-card);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.u-input:focus,
.u-textarea:focus {
    border-color: var(--color-primary);
}

.u-textarea {
    resize: vertical;
    min-height: 120px;
}

.u-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-dark);
    font-size: 0.95rem;
}

/* COMPONENT: INPUTS (Search Variant) */
.u-input-search {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    outline: none;
    font-size: 15px;
    background-color: var(--bg-card);
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.u-table {
    width: 100%;
    border-collapse: collapse;
}

.u-table th {
    background: var(--color-light-gray);
    text-align: left;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 12px;
    border-bottom: 2px solid var(--border-color);
}

.u-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

/* =================================================================== */
/* 14. PRODUCT FORM SPECIFICS & UTILITIES (NEW)                        */
/* =================================================================== */

/* Utilities */
.u-max-w-900 {
    max-width: 900px;
}

.u-mb-15 {
    margin-bottom: 15px;
}

.u-mb-20 {
    margin-bottom: 20px;
}

.u-mt-0 {
    margin-top: 0;
}

.u-mt-15 {
    margin-top: 15px;
}

.u-mt-20 {
    margin-top: 20px;
}

.u-mt-25 {
    margin-top: 25px;
}

.u-font-16 {
    font-size: 16px;
}

/* Product Form Components */
.product-edit-title {
    color: #9E7A65;
    margin-top: 0;
}

.tech-data-header {
    font-size: 1.1em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--color-dark);
}

.forensic-tags-wrapper {
    background: #f0f9ff;
    padding: 15px;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    margin-bottom: 20px;
}

.forensic-tags-title {
    margin-top: 0;
    color: #0369a1;
    font-size: 1rem;
    font-weight: 600;
}

.u-label-sm {
    font-size: 0.85em;
}

.u-label-sub {
    font-size: 0.9em;
    color: var(--text-muted);
}

.dynamic-list-group {
    margin-bottom: 20px;
}

.dynamic-list-input {
    padding: 8px !important;
}

/* =================================================================== */
/* 15. SMART AI BUILDER BUTTON (CUSTOM DESIGN)                         */
/* =================================================================== */
.btn-ai-sparkle {
    border: none;
    width: auto;
    min-width: 280px;
    height: 60px;
    border-radius: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    background: var(--color-dark);
    cursor: pointer;
    transition: all 450ms ease-in-out;
    padding: 0 30px;
    box-shadow: 0 4px 15px rgba(15, 57, 78, 0.2);
}

.btn-ai-sparkle .sparkle {
    fill: var(--color-secondary);
    transition: all 800ms ease;
}

.btn-ai-sparkle .text {
    font-weight: 600;
    color: var(--color-secondary);
    font-size: 1.1rem;
    font-family: var(--font-primary);
}

.btn-ai-sparkle:hover {
    background: linear-gradient(0deg, var(--color-primary), #c2a18d);
    box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4),
        inset 0px -4px 0px 0px rgba(0, 0, 0, 0.2),
        0px 0px 0px 4px rgba(255, 255, 255, 0.1),
        0px 0px 60px 0px rgba(158, 122, 101, 0.5);
    transform: translateY(-3px);
}

.btn-ai-sparkle:hover .text {
    color: white;
}

.btn-ai-sparkle:hover .sparkle {
    fill: white;
    transform: scale(1.2) rotate(15deg);
}


/* =================================================================== */
/* 16. CENTRALIZED UI ENGINE COMPONENTS                                */
/* =================================================================== */

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    background: #f9fafb;
    border-top: 1px solid #eee;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

/* Loader System */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loader-content {
    text-align: center;
}

.loader-text {
    margin-top: 15px;
    color: var(--color-primary);
    font-weight: 600;
}

.loader-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--color-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spinnerAnim 1s linear infinite;
}

@keyframes spinnerAnim {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Chat & UI Elements */
.u-input,
.u-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.u-input:focus,
.u-textarea:focus {
    border-color: var(--color-primary);
    outline: none;
}

.u-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-dark);
}