/* HCAA Design System - Industrial Tech Archetype (Target: rbxprogramming.com) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;500;700&display=swap');

:root {
    /* Colors - Industrial Orange Palette */
    --primary: #FE3800;
    /* Bright Orange */
    --primary-hover: #D93000;

    --bg-dark: #000000;
    --bg-light: #FFFFFF;
    --bg-overlay: rgba(0, 0, 0, 0.6);

    --text-dark: #111111;
    --text-light: #FFFFFF;
    --text-muted: #666666;

    --border-light: #E5E5E5;
    --border-dark: #333333;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --space-16: 64px;
    --space-24: 96px;

    /* Typography */
    --font-main: 'DM Sans', sans-serif;

    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 2rem;
    /* 32px */
    --text-4xl: 3rem;
    /* 48px */
    --text-5xl: 4rem;
    /* 64px */

    /* Layout */
    --container-width: 1200px;
    --radius-sm: 4px;
    --radius-md: 8px;

    /* Breakpoints */
    --bp-tablet: 768px;
    --bp-desktop: 1024px;
    --bp-lg-desktop: 1440px;
}

/* Global Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-4);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

img {
    max-width: 100%;
    display: block;
}

/* Utility Classes */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-4);
    /* Mobile padding */
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-6);
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
}

.text-primary {
    color: var(--primary);
}

.text-white {
    color: var(--text-light);
}

.text-muted {
    color: var(--text-muted);
}

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

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

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

.section-spacing {
    padding: var(--space-24) 0;
}

/* Responsive Typography Classes */
.heading-lg {
    font-size: 2rem;
    /* Mobile default */
    line-height: 1.2;
}

.heading-xl {
    font-size: 2.5rem;
    /* Mobile default */
    line-height: 1.1;
}

@media (min-width: 768px) {
    .heading-lg {
        font-size: 2.5rem;
    }

    .heading-xl {
        font-size: 3rem;
    }
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    /* Slightly smaller padding on mobile if needed, but 12px 24px is good */
    font-weight: 700;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    min-height: 44px;
    /* Ensure minimum touch target */
    min-width: 44px;
}

/* Primary Button (Ghost Style per reference) */
.btn-primary {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary);
    color: #fff;
    transform: scale(1.05);
    /* Slight grow effect */
}

/* White Ghost Button (for Dark Backgrounds) */
.btn-white {
    background-color: transparent;
    border-color: #fff;
    color: #fff;
}

.btn-white:hover {
    background-color: #fff;
    color: #000;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-4) 0;
}

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

.logo {
    font-weight: 700;
    font-size: var(--text-xl);
    color: #000;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-toggle {
    cursor: pointer;
    display: flex;
    font-size: 24px;
}

/* Header Actions (Lang + Toggle) */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

/* Language Switcher */
.lang-switch {
    font-size: var(--text-sm);
    font-weight: 700;
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.lang-switch a {
    color: var(--text-muted);
}

.lang-switch a.active {
    color: #000;
}

.lang-switch a:hover {
    color: var(--primary);
}

.divider {
    color: var(--border-light);
}

/* Navigation Menu (Desktop) */
.nav-menu {
    display: none;
    /* Hidden on mobile by default */
}

@media (min-width: 1024px) {
    .nav-toggle {
        display: none;
        /* Hide hamburger on desktop */
    }

    .nav-menu {
        display: flex;
        gap: var(--space-6);
    }

    .nav-link {
        font-size: var(--text-sm);
        font-weight: 700;
        text-transform: uppercase;
        color: var(--text-dark);
        letter-spacing: 0.05em;
    }

    .nav-link:hover {
        color: var(--primary);
    }
}

.mobile-menu.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

/* Mobile Menu (Active State) */
.nav-menu.mobile-active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    gap: var(--space-4);
    /* Add gap for mobile links */
}

/* Ensure mobile links are big enough */
.nav-menu.mobile-active .nav-link {
    padding: var(--space-3) 0;
    display: block;
    font-size: var(--text-base);
    /* Larger font for mobile */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Separator */
}

.nav-menu.mobile-active .nav-link:last-child {
    border-bottom: none;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    /* Nearly full screen */
    display: flex;
    align-items: center;
    background-image: linear-gradient(var(--bg-overlay), var(--bg-overlay)), url('hero.png');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding-top: 80px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 5rem);
    /* Reduced min size for mobile safety */
    line-height: 1.1;
    margin-bottom: var(--space-6);
    max-width: 800px;
}

.hero-subtitle {
    font-size: var(--text-base);
    /* 16px default */
    margin-bottom: var(--space-8);
    max-width: 600px;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: var(--text-lg);
    }
}

/* Stats Ribbon ("In Figures") */
.stats-bar {
    background-color: var(--primary);
    color: #fff;
    padding: var(--space-12) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 columns on mobile for stats looks okay usually, or 1fr */
    gap: var(--space-4);
    text-align: center;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-8);
    }
}

.stat-number {
    font-size: var(--text-4xl);
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: var(--text-sm);
    text-transform: uppercase;
    opacity: 0.9;
}

/* Services Grid (Clean White Cards) */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-top: var(--space-8);
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
        margin-top: var(--space-12);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: #fff;
    padding: var(--space-8);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.service-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-6);
    color: var(--primary);
}

/* "Why Us" List with Big Numbers */
.why-us-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.why-item {
    display: flex;
    gap: var(--space-6);
    align-items: flex-start;
}

.big-number {
    font-size: 4rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 2px var(--primary);
    /* Hollow Number */
    line-height: 1;
    min-width: 100px;
}

.why-content h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}

/* About Us Lists */
.tech-list li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
    font-size: var(--text-lg);
}

.tech-list li i {
    color: var(--primary);
    min-width: 20px;
}

/* Contact Form */
.form-input {
    width: 100%;
    padding: var(--space-4);
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Footer (High Contrast) */
.footer {
    background-color: #000;
    color: #fff;
    padding: var(--space-16) 0 var(--space-8);
    position: relative;
    overflow: hidden;
}

/* Abstract Background Shapes for Footer */
.footer::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.2;
}

@media (min-width: 768px) {
    .footer::before {
        width: 300px;
        height: 300px;
    }
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Service Modals
   ========================================= */
.service-card {
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-dark);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 2.5rem;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: var(--text-light);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-body h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.modal-body p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.modal-body ul {
    list-style: none;
    padding: 0;
}

.modal-body ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.modal-body ul li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    margin-top: 10px;
    flex-shrink: 0;
}

/* Scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Usage: Modal Call to Action */
.modal-cta {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-dark);
    text-align: center;
}

.modal-cta p {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.btn-filled {
    background-color: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
}

.btn-filled:hover {
    background-color: transparent;
    color: var(--primary);
    transform: translateY(-2px);
}


/* Usage: News Section */
.news-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    padding: var(--space-8);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.news-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.news-date {
    font-size: var(--text-sm);
    color: var(--primary);
    font-weight: 700;
    margin-bottom: var(--space-4);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-card h3 {
    font-size: var(--text-xl);
    color: var(--text-light);
    margin-bottom: var(--space-4);
    line-height: 1.3;
}

.news-card p {
    color: var(--text-muted);
    margin-bottom: var(--space-6);
    flex-grow: 1;
}

.read-more {
    color: var(--text-light);
    font-weight: 700;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.read-more:hover {
    color: var(--primary);
}


/* Usage: Footer Redesign */
.footer-top {
    border-top: 2px solid var(--primary);
    padding: 64px 0 32px 0;
    font-size: 0.9rem;
}

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

.footer-col h4 {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: var(--text-light);
    opacity: 0.7;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
    opacity: 1;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}


/* Utility for hidden modal templates */
.hidden-modal-content {
    display: none !important;
}


/* Location Section */
.location-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
}

@media (min-width: 768px) {
    .location-grid {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }
}