/* =============================================
   FOCUS LASER - GLOBAL STYLES (Modular System)
   Theme: Premium Industrial (Dark & Gold)
============================================= 
*/

/* استيراد خط Cairo */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    /* 🎨 بالتة الألوان المستخرجة من اللوجو */
    --bg-main: #141424;        /* الخلفية الأساسية (كحلي عميق) */
    --bg-secondary: #23232C;   /* خلفية الأقسام الفرعية والكروت */
    --bg-darker: #040404;      /* أسود صريح (للـ Footer مثلاً) */

    --accent-gold: #EC9C04;    /* الذهبي الأساسي (للعناوين والأزرار) */
    --accent-light: #F4B557;   /* ذهبي فاتح للـ Hover */
    
    --text-primary: #D3C9BE;   /* بيج فاتح للنصوص الأساسية (بدل الأبيض) */
    --text-secondary: #e0e0e0; /* Improved contrast for accessibility (was #948C92) */
    
    /* ✨ مؤثرات */
    --shadow-gold: 0 5px 15px rgba(236, 156, 4, 0.2); /* توهج ذهبي خفيف */
    --border-radius: 8px;
}

/* التأسيس العام */
html {
    overflow-x: hidden;
}
body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #fff; /* العناوين الرئيسية تبقى أبيض لزيادة التباين */
}

.text-gold { color: var(--accent-gold) !important; }
.text-beige { color: var(--text-primary) !important; }
.bg-secondary-theme { background-color: var(--bg-secondary) !important; }

/* --- تصميم الأزرار (Custom Buttons) --- */
.btn-gold {
    background-color: var(--accent-gold);
    color: #000; /* النص أسود عشان يوضح على الذهبي */
    font-weight: 700;
    border: none;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background-color: var(--accent-light);
    color: #000;
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.btn-outline-gold {
    background-color: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
    font-weight: 700;
    padding: 10px 28px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-outline-gold:hover {
    background-color: var(--accent-gold);
    color: #000;
}

/* =========================================
   FIX: Select option text color (visible on all browsers)
   ========================================= */
.form-control option,
.form-select option,
select option {
  background-color: #141424;
  color: #ffffff;
}

select.form-control,
select.form-select {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

select.form-control option:hover,
select.form-control option:checked,
select.form-select option:hover,
select.form-select option:checked {
  background-color: var(--accent-gold);
  color: #000;
}

/* --- تنسيقات عامة للأقسام --- */
section {
    padding: 80px 0;
}

.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}
.section-title h2 span {
    color: var(--accent-gold);
}
.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- تحسينات الموبايل --- */
@media (max-width: 767.98px) {
    section {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .section-title p {
        font-size: 0.95rem;
    }
    
    /* تحسين الأزرار للموبايل */
    .btn-gold,
    .btn-outline-gold {
        padding: 12px 24px;
        font-size: 0.9rem;
        /* Only standalone buttons get centered; inline groups keep natural width */
        width: auto;
        max-width: none;
    }
    
    /* تحسين النافبار للموبايل */
    .navbar {
        padding: 10px 0;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    .navbar-nav {
        text-align: center;
        background: rgba(0, 0, 0, 0.9);
        padding: 20px;
        border-radius: 10px;
        margin-top: 10px;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 0;
        font-size: 0.95rem;
    }
}


  /* تنسيقات خاصة بالصفحة الرئيسية فقط */
        
        /* Navbar */
        .navbar { 
            background-color: rgba(20, 20, 36, 0.98) !important; 
            -webkit-backdrop-filter: blur(15px); 
            backdrop-filter: blur(15px); 
            border-bottom: 2px solid rgba(236, 156, 4, 0.2);
            padding: 15px 0;
            transition: all 0.3s ease;
        }
        .navbar.scrolled { 
            background-color: rgba(20, 20, 36, 1) !important;
            padding: 10px 0;
        }
        .navbar-brand span { color: var(--accent-gold); font-weight: 900; }
        .navbar-logo { 
            height: 50px; 
            width: auto; 
            transition: transform 0.3s ease, height 0.3s ease;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
        }
        .navbar-logo:hover { transform: scale(1.05); }
        .navbar.scrolled .navbar-logo {
            height: 40px;
        }
        .nav-link { 
            color: var(--text-primary) !important; 
            font-weight: 600; 
            margin: 0 5px;
            padding: 6px 10px !important;
            border-radius: 6px;
            transition: all 0.3s ease;
            position: relative;
            white-space: nowrap;
        }
        .nav-link:hover, .nav-link.active { 
            color: var(--accent-gold) !important;
            background-color: rgba(236, 156, 4, 0.1);
        }
        .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 50%;
            transform: translateX(50%);
            width: 0;
            height: 2px;
            background-color: var(--accent-gold);
            transition: width 0.3s ease;
        }
        .nav-link:hover::after,
        .nav-link.active::after {
            width: 80%;
        }
        .navbar-nav {
            gap: 5px;
            align-items: center;
        }
        .navbar .btn {
            margin: 0 3px;
            font-weight: 600;
            white-space: nowrap;
        }
        .navbar-collapse {
            align-items: center;
        }
        .navbar-nav.me-auto {
            margin-left: auto !important;
        }

        /* Hero Slider */
        .hero-slider { overflow: hidden; }
        .hero-slider .carousel-item { height: 90vh; min-height: 600px; position: relative; }
        .hero-slider img { object-fit: cover; height: 100%; width: 100%; filter: brightness(0.4); /* تغميق الصور عشان النص يظهر */ }
        .hero-caption { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 2; width: 80%; max-width: 100vw; }
        .hero-caption h1 { font-size: 3.5rem; font-weight: 900; margin-bottom: 20px; }
        .hero-caption p { font-size: 1.5rem; color: var(--text-primary); margin-bottom: 30px; }

        /* Machine Card */
        .machine-card { background-color: var(--bg-secondary); border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s ease; height: 100%; }
        .machine-card:hover { border-color: var(--accent-gold); transform: translateY(-5px); }
        .machine-card img { height: 250px; object-fit: cover; }

        /* Stats Section */
        .stat-box { padding: 30px; background-color: var(--bg-secondary); border-radius: var(--border-radius); border-bottom: 3px solid var(--accent-gold); }
        .stat-number { font-size: 3rem; font-weight: 900; color: var(--accent-gold); display: block; }

        /* Clients Section */
        .client-logo-box {
            background-color: var(--bg-secondary);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--border-radius);
            padding: 20px;
            height: 180px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            overflow: hidden;
        }
        .client-logo-box:hover {
            border-color: var(--accent-gold);
            transform: translateY(-5px);
            box-shadow: var(--shadow-gold);
        }
        .client-logo {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            filter: grayscale(100%) brightness(0.8);
            transition: all 0.3s ease;
        }
        .client-logo-box:hover .client-logo {
            filter: grayscale(0%) brightness(1);
        }


        .about-content {
            padding: 20px 0;
        }
        .feature-card-about {
            background-color: var(--bg-secondary);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--border-radius);
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 15px;
            transition: all 0.3s ease;
            height: 100%;
        }
        .feature-card-about:hover {
            border-color: var(--accent-gold);
            transform: translateY(-5px);
            box-shadow: var(--shadow-gold);
        }
        .feature-icon-about {
            width: 50px;
            height: 50px;
            background: rgba(236, 156, 4, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .feature-icon-about i {
            font-size: 1.5rem;
            color: var(--accent-gold);
        }
        .feature-content-about {
            flex: 1;
        }
      

        /* --- Footer Styles --- */
.bg-gold {
  background-color: var(--accent-gold) !important;
}

.transition {
  transition: all 0.3s ease;
}

/* أزرار السوشيال ميديا */
.social-btn {
  width: 40px;
  height: 40px;
  background-color: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-btn:hover {
  background-color: var(--bg-main);
  color: var(--text-primary);
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(236, 156, 4, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--accent-light);
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(236, 156, 4, 0.6);
}

/* ============================================
   RESPONSIVE DESIGN - Media Queries
   ============================================ */

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Large Devices (Desktops, 992px and up) */
@media (max-width: 1199.98px) {
    .section-title h2 {
        font-size: 2.2rem;
    }
}

/* Medium Devices (Tablets, 768px and up) */
@media (max-width: 991.98px) {
    /* Sections Padding */
    section {
        padding: 60px 0;
    }

    /* Navbar */
    .navbar {
        padding: 12px 0;
    }
    .navbar-logo {
        height: 40px;
    }
    .navbar.scrolled .navbar-logo {
        height: 35px;
    }
    .nav-link {
        margin: 0 5px;
        font-size: 0.9rem;
        padding: 6px 10px !important;
    }
    .navbar .btn {
        margin: 0 2px;
        padding: 6px 12px !important;
        font-size: 0.85rem;
    }

    /* Hero Slider */
    .hero-slider .carousel-item {
        height: 70vh;
        min-height: 500px;
    }
    .hero-caption {
        width: 90%;
        padding: 20px;
    }
    .hero-caption h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    .hero-caption p {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    .hero-caption .btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }

    /* Section Titles */
    .section-title h2 {
        font-size: 2rem;
    }
    .section-title p {
        font-size: 1rem;
    }

    /* About Section */
    .about-content h3 {
        font-size: 2rem;
    }
    .about-content p {
        font-size: 1rem;
    }

    /* Stats */
    .stat-box {
        padding: 25px 20px;
    }
    .stat-number {
        font-size: 2.5rem;
    }

    /* Footer */
    .footer {
        text-align: center;
    }
}

/* Small Devices (Landscape Phones, 576px and up) */
@media (max-width: 767.98px) {
    /* Sections Padding */
    section {
        padding: 50px 0;
    }

    /* Navbar */
    .navbar {
        padding: 10px 0;
    }
    .navbar-logo {
        height: 35px;
    }
    .navbar.scrolled .navbar-logo {
        height: 30px;
    }
    .navbar-nav {
        text-align: right;
        margin-top: 15px;
        gap: 3px;
    }
    .nav-link {
        padding: 8px 10px !important;
        margin: 0;
        font-size: 0.9rem;
    }
    .navbar .btn {
        margin: 2px;
        padding: 8px 15px !important;
        font-size: 0.85rem;
    }

    /* Hero Slider */
    .hero-slider .carousel-item {
        height: 60vh;
        min-height: 400px;
    }
    .hero-caption {
        width: 95%;
        padding: 15px;
    }
    .hero-caption h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    .hero-caption p {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    .hero-caption .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 250px;
    }

    /* Section Titles */
    .section-title {
        margin-bottom: 30px;
    }
    .section-title h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    .section-title p {
        font-size: 0.95rem;
        padding: 0 15px;
    }

    /* About Section */
    .about-content {
        padding: 15px 0;
        text-align: center;
    }
    .about-content h3 {
        font-size: 1.75rem;
        margin-bottom: 20px;
    }
    .about-content p {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    .feature-card-about {
        margin-bottom: 15px;
    }

    /* Machine Cards */
    .machine-card {
        margin-bottom: 20px;
    }
    .machine-card img {
        height: 200px;
    }

    /* Stats */
    .stat-box {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    .stat-number {
        font-size: 2rem;
    }
    .stat-box p {
        font-size: 0.9rem;
    }

    /* Clients Section */
    .client-logo-box {
        height: 150px;
        padding: 15px;
        margin-bottom: 15px;
    }

    /* Contact Section */
    #contact .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Footer */
    .footer {
        padding: 30px 0 20px;
    }
    .footer .row > div {
        margin-bottom: 30px;
    }
    .footer h5 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    .social-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* Back to Top Button */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        left: 20px;
        font-size: 1rem;
    }

    /* Buttons */
    .btn-gold,
    .btn-outline-gold {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Container Padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Sections Padding */
    section {
        padding: 40px 0;
    }

    /* Navbar */
    .navbar-logo {
        height: 30px;
    }
    .navbar.scrolled .navbar-logo {
        height: 25px;
    }
    .navbar-brand {
        font-size: 0.95rem;
    }
    .navbar .btn {
        margin: 1px;
        padding: 6px 12px !important;
        font-size: 0.8rem;
    }

    /* Hero Slider */
    .hero-slider .carousel-item {
        height: 50vh;
        min-height: 350px;
    }
    .hero-caption h1 {
        font-size: 1.5rem;
    }
    .hero-caption p {
        font-size: 0.9rem;
    }

    /* Section Titles */
    .section-title h2 {
        font-size: 1.5rem;
    }
    .section-title p {
        font-size: 0.9rem;
    }

    /* About Section */
    .about-content h3 {
        font-size: 1.5rem;
    }
    .about-content p {
        font-size: 0.9rem;
    }

    /* Stats */
    .stat-box {
        padding: 15px 10px;
    }
    .stat-number {
        font-size: 1.75rem;
    }
    .stat-box p {
        font-size: 0.85rem;
    }

    /* Machine Cards */
    .machine-card img {
        height: 180px;
    }
    .card-body {
        padding: 15px !important;
    }

    /* Clients */
    .client-logo-box {
        height: 120px;
        padding: 10px;
    }

    /* Footer */
    .footer {
        padding: 25px 0 15px;
    }
    .footer p {
        font-size: 0.85rem;
    }

    /* Buttons */
    .btn-gold,
    .btn-outline-gold {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
}

/* Landscape Orientation (Mobile) */
@media (max-width: 991.98px) and (orientation: landscape) {
    .hero-slider .carousel-item {
        height: 100vh;
        min-height: 500px;
    }
    .hero-caption h1 {
        font-size: 2rem;
    }
}

/* Video Card Styles */
.video-card {
    transition: all 0.3s ease;
    border: 2px solid var(--accent-gold);
    overflow: hidden;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(236, 156, 4, 0.3);
    border-color: var(--accent-light);
}

.ratio-16x9 {
    background: #000;
    border-radius: 4px;
}

.ratio-16x9 iframe {
    border-radius: 4px;
}

/* ============================================
   HERO SLIDER RESPONSIVE
============================================ */
.hero-slide-img {
    height: 600px;
    object-fit: cover;
}

@media (max-width: 991.98px) {
    .hero-slide-img {
        height: 450px;
    }
}

@media (max-width: 767.98px) {
    .hero-slide-img {
        height: 350px;
    }
    
    /* Hero caption text scaling */
    .hero-caption h1.display-4 {
        font-size: 1.6rem !important;
    }
    .hero-caption .lead {
        font-size: 0.9rem;
    }
    .hero-caption .btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .hero-slide-img {
        height: 250px;
    }
    
    .hero-caption h1.display-4 {
        font-size: 1.3rem !important;
    }
    .hero-caption .lead {
        font-size: 0.8rem;
        margin-bottom: 10px !important;
    }
    .hero-caption .btn {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
}

/* ============================================
   NAVBAR AUTH BUTTONS MOBILE FIX
============================================ */
@media (max-width: 991.98px) {
    #authButtons {
        justify-content: center !important;
        margin-top: 15px;
    }
    #authButtons .btn {
        width: auto;
        max-width: none;
        display: inline-flex;
    }
}

/* ============================================
   CTA SECTION MOBILE FIX
============================================ */
@media (max-width: 767.98px) {
    #contact .display-5 {
        font-size: 1.5rem !important;
    }
    #contact .fs-5 {
        font-size: 0.95rem !important;
    }
    #contact .btn-lg {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    /* =====================================
       FOOTER - MOBILE COMPACT LAYOUT
    ====================================== */
    footer {
        padding-top: 1.5rem !important;
        padding-bottom: 1rem !important;
        margin-top: 2rem !important;
    }
    footer .row.g-5 {
        --bs-gutter-y: 0.75rem;
        --bs-gutter-x: 0.75rem;
    }

    /* Make the 4 footer columns sit 2 per row on mobile */
    footer .col-lg-3,
    footer .col-lg-2,
    footer .col-md-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Hide long description para and logo on mobile to save space */
    footer .col-lg-3:first-child p.text-secondary { display: none !important; }
    footer .col-lg-3:first-child .mb-4 img { height: 40px !important; }

    /* Compress list items spacing */
    footer ul.list-unstyled li { margin-bottom: 0.3rem !important; }
    footer ul.list-unstyled li a,
    footer ul.list-unstyled li span { font-size: 0.82rem; }

    /* Section headings */
    footer h5 {
        font-size: 0.95rem;
        margin-bottom: 0.6rem !important;
    }

    /* Social icons row */
    footer .d-flex.gap-3 { gap: 0.5rem !important; margin-top: 0.5rem; }

    /* Contact list items */
    footer li.mb-4 { margin-bottom: 0.4rem !important; }

    /* Copyright bar */
    footer .border-top.pt-4 { padding-top: 0.75rem !important; margin-top: 0.5rem; }
    footer .border-top p { font-size: 0.78rem; }
}

/* ============================================
   STAT BOX MOBILE FIX
============================================ */
@media (max-width: 575.98px) {
    .stat-box .display-4 {
        font-size: 2rem !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .back-to-top,
    .btn,
    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }
    section {
        page-break-inside: avoid;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .navbar-logo,
    .client-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        image-rendering: pixelated;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   NAVBAR TOGGLER POSITION FIX
============================================ */
.navbar-toggler {
    /* Auto layout for RTL will naturally place it on the left (end) */
    margin-left: 0 !important;
}

/* ============================================
   NAVBAR COMPACT FOR TABLETS & LAPTOPS
============================================ */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .navbar-expand-lg .navbar-nav .nav-link {
        padding-right: 0.5rem !important;
        padding-left: 0.5rem !important;
        font-size: 0.9rem;
    }
    .navbar-brand img {
        height: 35px !important;
    }
    #authButtons .btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-expand-lg .navbar-nav .nav-link {
        padding-right: 0.35rem !important;
        padding-left: 0.35rem !important;
        font-size: 0.85rem;
    }
}
