/* ==========================================================================
   Starpack Premium Design System & UI Stylesheet
   ========================================================================== */

/* 1. Imports & Core Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Noto+Kufi+Arabic:wght@300;400;500;600;700;800;900&display=swap');

/* 2. Custom CSS Variables */
:root {
    /* Emerald Primary Scale */
    --primary-hsl: 147, 76%, 42%;
    --primary: hsl(var(--primary-hsl));
    --primary-rgb: 30, 215, 118;
    --primary-dark: hsl(147, 75%, 34%);
    --primary-light: hsl(132, 60%, 60%);
    --primary-soft: rgba(30, 215, 118, 0.08);

    /* Gold Accent Scale (for premium metallic accents) */
    --accent-gold: hsl(46, 75%, 58%);
    --accent-gold-dark: hsl(46, 75%, 48%);
    --accent-gold-light: hsl(46, 90%, 70%);

    /* Background and Card Colors (Premium Dark Emerald Theme with Fixed Wave Design) */
    --background-solid: hsl(147, 30%, 8%);
    --background: rgba(10, 22, 16, 0.45); /* Translucent section overlays to show the wave background */
    --card-bg: rgba(18, 28, 22, 0.82); /* Glassmorphic translucent card background */
    --border-color: rgba(30, 215, 118, 0.15); /* Clean neon emerald translucent borders */
    --bg-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('/assets/images/bg-wave.png');

    /* Text Colors */
    --text-dark: hsl(120, 15%, 95%);
    --text-medium: hsl(120, 10%, 75%);
    --text-light: hsl(120, 5%, 55%);
    
    /* Layout & System Values */
    --max-width: 1200px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
    
    /* Transition Defaults */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Header & Footer Custom Backgrounds */
    --header-bg: rgba(10, 22, 16, 0.85);
    --footer-bg: hsl(147, 30%, 4%);
}

/* 2b. Light Theme Variable Overrides */
[data-theme="light"] {
    --primary-hsl: 147, 76%, 34%;
    --primary: hsl(var(--primary-hsl));
    --primary-rgb: 21, 154, 82;
    --primary-dark: hsl(147, 75%, 24%);
    --primary-light: hsl(132, 51%, 55%);
    --primary-soft: rgba(21, 154, 82, 0.08);

    /* Gold Accent Scale */
    --accent-gold: hsl(46, 65%, 52%);
    --accent-gold-dark: hsl(46, 65%, 42%);
    --accent-gold-light: hsl(46, 80%, 65%);

    /* Background and Card Colors */
    --background-solid: hsl(120, 15%, 98%);
    --background: hsl(120, 15%, 98%);
    --card-bg: hsl(0, 0%, 100%);
    --border-color: hsl(135, 12%, 90%);
    --bg-image: none;

    /* Text Colors */
    --text-dark: hsl(135, 14%, 12%);
    --text-medium: hsl(135, 10%, 35%);
    --text-light: hsl(135, 5%, 55%);

    /* Header & Footer Custom Backgrounds */
    --header-bg: rgba(250, 251, 250, 0.85);
    --footer-bg: var(--text-dark);

    /* Shadows adapted for light theme */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 20px rgba(15, 106, 58, 0.06);
    --shadow-lg: 0 20px 40px rgba(15, 106, 58, 0.1);
}

/* 2c. Mobile Responsive Background Wave Override */
@media (max-width: 768px) {
    :root:not([data-theme="light"]) {
        --bg-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('/assets/images/bg-wave-mobile.png');
    }
}

/* 3. Base Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--background-solid);
    background-image: var(--bg-image);
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Conditional font assignment based on HTML lang direction */
html[dir="ltr"], html[dir="ltr"] button, html[dir="ltr"] input, html[dir="ltr"] textarea {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}
html[dir="rtl"], html[dir="rtl"] button, html[dir="rtl"] input, html[dir="rtl"] textarea {
    font-family: 'Noto Kufi Arabic', 'Outfit', system-ui, -apple-system, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* 4. Global Structural Components */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent-gold));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-top: 1.5rem;
}

/* 5. Sticky Glassmorphism Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-wrapper img {
    height: 48px;
    width: auto;
}

.logo-wrapper .logo-light {
    display: none;
}
.logo-wrapper .logo-dark {
    display: block;
}

[data-theme="light"] .logo-wrapper .logo-light {
    display: block;
}
[data-theme="light"] .logo-wrapper .logo-dark {
    display: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition-fast);
}

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

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

.right-nav-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Lang Switcher dropdown styling */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    background-color: var(--card-bg);
}

.lang-switcher a {
    color: var(--text-medium);
}

.lang-switcher a:hover,
.lang-switcher a.active {
    color: var(--primary);
}

.lang-separator {
    color: var(--border-color);
    user-select: none;
}

/* Call to Action Button */
.btn-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(21, 154, 82, 0.2);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(21, 154, 82, 0.3);
}

/* 6. Dynamic Hero Slider / Banner */
.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(21, 154, 82, 0.08), transparent 50%),
                radial-gradient(circle at bottom left, rgba(212, 175, 55, 0.05), transparent 50%),
                var(--card-bg);
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.15;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--primary-dark);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary);
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background-color: var(--primary-soft);
}

.hero-image-wrapper {
    position: relative;
}

.hero-image-wrapper img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
    background-color: var(--background);
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-gold));
    top: 20px;
    left: 20px;
    z-index: 1;
    border-radius: var(--radius-lg);
    opacity: 0.15;
    filter: blur(10px);
}

/* 7. Numbers Section */
.stats-section {
    background-color: var(--primary-dark);
    color: white;
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--accent-gold-light);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.85;
}

/* 8. Step-by-Step Production Process Timeline */
.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--border-color);
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 2rem 3rem;
    box-sizing: border-box;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 4px solid var(--primary);
    top: 2.5rem;
    z-index: 1;
    transition: var(--transition-fast);
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-item.left::after {
    right: -10px;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.timeline-content p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

.timeline-item:hover::after {
    background-color: var(--accent-gold);
    transform: scale(1.3);
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* 9. Product Catalog & Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.category-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background-color: var(--background);
}

.category-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.category-card:hover .category-image-wrapper img {
    transform: scale(1.08);
}

.category-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.category-card-content p {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.category-card-link {
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.category-card-link::after {
    content: '→';
    transition: var(--transition-fast);
}

html[dir="rtl"] .category-card-link::after {
    content: '←';
}

.category-card:hover .category-card-link::after {
    transform: translateX(5px);
}
html[dir="rtl"] .category-card:hover .category-card-link::after {
    transform: translateX(-5px);
}

/* 10. Why Choose Us / Quality Standards Section */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: center;
}

.why-us-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.why-us-features.col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.why-us-features.col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.why-us-features.col-4 {
    grid-template-columns: repeat(4, 1fr);
}

.feature-box {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon-wrapper {
    width: 50px;
    height: 50px;
    background-color: var(--primary-soft);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.feature-box h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.feature-box p {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* 11. FAQ Component */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition-fast);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    color: var(--primary-dark);
    user-select: none;
    transition: var(--transition-fast);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    color: var(--text-medium);
}

.faq-item.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-item.active .faq-answer {
    padding: 0 2rem 1.5rem;
    max-height: 500px;
}

/* 12. Contact Form & Map Styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
}

.contact-card {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.contact-form-group {
    margin-bottom: 1.5rem;
}

.contact-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.contact-form-group input,
.contact-form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--background);
    color: var(--text-dark);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.contact-form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 1.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

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

/* 13. QR Verification Panel Designs */
.qr-container {
    max-width: 600px;
    margin: 4rem auto;
    text-align: center;
}

.qr-search-card {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.qr-search-form {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
}

.qr-search-form input {
    flex-grow: 1;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--background);
    outline: none;
    transition: var(--transition-fast);
}

.qr-search-form input:focus {
    border-color: var(--primary);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.qr-search-form button {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
}

.qr-result-box {
    margin-top: 3rem;
    border-radius: var(--radius-md);
    border-width: 1px;
    border-style: solid;
    padding: 2.5rem;
    text-align: left;
}
html[dir="rtl"] .qr-result-box {
    text-align: right;
}

.qr-result-box.success {
    background-color: hsl(147, 40%, 97%);
    border-color: var(--primary);
}

.qr-result-box.error {
    background-color: hsl(0, 50%, 98%);
    border-color: hsl(0, 76%, 60%);
    color: hsl(0, 76%, 35%);
}

.qr-result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 1rem;
}

.qr-result-header h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.qr-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2rem;
}

.qr-detail-item {
    display: flex;
    flex-direction: column;
}

.qr-detail-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.qr-detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* 14. Modern Footer Layouts */
footer {
    background-color: var(--footer-bg);
    color: white;
    padding: 5rem 0 2rem;
    border-top: 5px solid var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-about h3 {
    color: var(--accent-gold-light);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.footer-about p {
    opacity: 0.75;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--primary);
    bottom: 0;
    left: 0;
}
html[dir="rtl"] .footer-links h4::after,
html[dir="rtl"] .footer-contact h4::after {
    left: auto;
    right: 0;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links-list a {
    opacity: 0.75;
}

.footer-links-list a:hover {
    opacity: 1;
    color: var(--primary-light);
    padding-left: 5px;
}
html[dir="rtl"] .footer-links-list a:hover {
    padding-left: 0;
    padding-right: 5px;
}

.footer-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    opacity: 0.75;
    font-size: 0.95rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* 15. Mobile Hamburger Button & Navigation Drawer */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.hamburger-btn .bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 3px;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

/* Morph to 'X' when active */
.hamburger-btn.is-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-btn.is-active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.is-active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Drawer Overlay */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1150;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.drawer-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Drawer Container */
.mobile-drawer {
    position: fixed;
    top: 0;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for notched mobile browsers */
    background: rgba(12, 48, 27, 0.96); /* Premium dark emerald theme */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1200;
    display: block; /* Changed from flex to block for bulletproof mobile scrolling */
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Bi-directional drawer animations */
html[dir="ltr"] .mobile-drawer {
    right: 0;
    transform: translateX(100%);
    border-left: 2px solid var(--accent-gold);
}

html[dir="rtl"] .mobile-drawer {
    left: 0;
    transform: translateX(-100%);
    border-right: 2px solid var(--accent-gold);
}

html[dir="ltr"] .mobile-drawer.is-open {
    transform: translateX(0);
}

html[dir="rtl"] .mobile-drawer.is-open {
    transform: translateX(0);
}

/* Drawer UI Elements */
.drawer-header {
    padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 2rem 1.5rem; /* Extra top padding for mobile notches */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.drawer-header .logo-wrapper img {
    height: 40px;
    width: auto;
}

.drawer-close {
    font-size: 2.5rem;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-fast);
}

.drawer-close:hover {
    color: var(--accent-gold-light);
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 88px - env(safe-area-inset-top, 0px)); /* Fallback min-height */
    min-height: calc(100dvh - 88px - env(safe-area-inset-top, 0px)); /* Adjust for notch */
    justify-content: space-between;
    padding: 1.75rem 1.5rem calc(3rem + env(safe-area-inset-bottom, 0px)); /* Extra bottom padding for home indicator */
    box-sizing: border-box;
}

.drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.drawer-links a {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    display: block;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-smooth);
}

.drawer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: var(--transition-smooth);
}

html[dir="ltr"] .drawer-links a::after {
    left: 0;
}

html[dir="rtl"] .drawer-links a::after {
    right: 0;
}

.drawer-links a:hover,
.drawer-links a.active {
    color: white;
}

.drawer-links a:hover::after,
.drawer-links a.active::after {
    width: 50px;
}

.drawer-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-lang-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.drawer-lang-switcher a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition-fast);
}

.drawer-lang-switcher a:hover,
.drawer-lang-switcher a.active {
    color: var(--accent-gold);
}

body.drawer-open {
    overflow: hidden;
}

/* 16. Responsive Adaptations */
@media (max-width: 1024px) {
    .hero-grid, .why-us-grid, .contact-grid, .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-us-features.col-4,
    .why-us-features.col-3 {
        grid-template-columns: repeat(2, 1fr); /* Collapse 4 & 3 columns to 2 columns on tablets */
    }

    .nav-links {
        display: none;
    }

    .right-nav-group {
        display: none;
    }

    .hamburger-btn {
        display: flex;
    }
    
    .timeline-container::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 5rem;
        padding-right: 2rem;
        text-align: left !important;
    }
    
    .timeline-item::after {
        left: 20px !important;
        right: auto !important;
    }
    
    .timeline-item.right {
        left: 0%;
    }
}

@media (max-width: 768px) {
    .stats-grid, .why-us-features, .categories-grid,
    .why-us-features.col-2, .why-us-features.col-3, .why-us-features.col-4 {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Responsive QR page layout */
    .qr-search-card {
        padding: 2rem 1.25rem;
    }

    .qr-search-form {
        flex-direction: column;
        gap: 1rem;
    }

    .qr-search-form button {
        width: 100%;
    }

    .qr-result-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Team Card hover effect */
.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
    border-color: var(--primary) !important;
}

/* BiDi layout override for phone numbers and emails */
.phone-number, .email-address {
    direction: ltr !important;
    display: inline-block !important;
    unicode-bidi: embed !important;
}

html[dir="rtl"] .qr-details-table-wrapper {
    text-align: right !important;
}

/* Gallery hover zoom & slide overlays */
.gallery-item-card:hover img {
    transform: scale(1.08);
}
.gallery-item-card:hover .gallery-item-overlay {
    transform: translateY(0) !important;
}

/* Product Detail Page Responsive Grid */
.product-detail-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
    align-items: flex-start;
}

@media (max-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Machinery & Capabilities Section */
.home-specs-section {
    padding: 6rem 0;
    background-color: var(--background);
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.home-specs-section::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 53, 34, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.specs-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    position: relative;
    z-index: 5;
}

.specs-intro h2 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.specs-intro p {
    font-size: 1.15rem;
    color: var(--text-medium);
    line-height: 1.7;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 5;
}

.spec-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.spec-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent-gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.spec-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(11, 76, 43, 0.25), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.spec-card:hover::before {
    opacity: 1;
}

.spec-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(14, 53, 34, 0.8) 0%, rgba(2, 44, 34, 0.9) 100%);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--accent-gold);
    margin-bottom: 1.75rem;
    transition: transform 0.3s ease;
}

.spec-card:hover .spec-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--primary);
    color: var(--accent-gold-light);
}

.spec-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.85rem;
    transition: color 0.3s ease;
}

.spec-card:hover h3 {
    color: var(--primary);
}

.spec-card p {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .specs-intro h2 {
        font-size: 2.25rem;
    }
    .home-specs-section {
        padding: 4rem 0;
    }
    .spec-card {
        padding: 2rem 1.5rem;
    }
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    padding: 0;
    margin-left: 1.25rem;
}

html[dir="rtl"] .theme-toggle-btn {
    margin-left: 0;
    margin-right: 1.25rem;
}

.theme-toggle-btn:hover {
    background-color: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.theme-toggle-btn svg {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle-btn:hover svg {
    transform: rotate(15deg);
}

/* Theme active icons visibility toggle */
html[data-theme="light"] .theme-toggle-btn .sun-icon {
    display: none;
}
html[data-theme="light"] .theme-toggle-btn .moon-icon {
    display: block;
}
html:not([data-theme="light"]) .theme-toggle-btn .sun-icon {
    display: block;
}
html:not([data-theme="light"]) .theme-toggle-btn .moon-icon {
    display: none;
}

/* Mobile Drawer specific theme toggle overrides */
.theme-toggle-btn.mobile-toggle {
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.theme-toggle-btn.mobile-toggle:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-gold);
    color: var(--accent-gold-light);
}


