/* ===== MODERN RESPONSIVE DESIGN ===== */

/* Large Desktop */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .hero h1 {
    font-size: var(--text-7xl);
  }

  .section-title {
    font-size: var(--text-6xl);
  }
}

/* Desktop */
@media (max-width: 1200px) {
  .container {
    padding: 0 var(--space-6);
  }

  .hero h1 {
    font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  }

  .service-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .section {
    padding: var(--space-18) 0;
  }

  .container {
    padding: 0 var(--space-6);
  }

  .header-inner {
    gap: var(--space-4);
  }

  .navbar ul {
    gap: var(--space-6);
  }

  .hero-logo {
    width: 100px;
  }

  .hero h1 {
    font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
  }

  .hero .sub {
    font-size: var(--text-lg);
  }

  .service-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-6);
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
  }

  .map-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  /* Projects slider containment + peek */
  .projects-slider {
    padding: 8px 48px;
  }

  .projects-slider .swiper-slide {
    flex: 0 0 46%;
  }
}

/* Mobile Landscape */
@media (max-width: 820px) {
  .section {
    padding: var(--space-16) 0;
  }

  .container {
    padding: 0 var(--space-4);
  }

  .navbar {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-drawer.open {
    width: 300px;
  }

  .drawer-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }

  .hero {
    min-height: 90vh;
  }

  .hero-semicircle {
    width: 500px;
    height: 250px;
    border-radius: 250px 250px 0 0;
  }

  .video-content {
    gap: 30px;
  }

  .engineer-icon,
  .hvac-icon,
  .gear-icon {
    font-size: 36px;
  }

  .company-name {
    font-size: var(--text-3xl);
  }

  .company-tagline {
    font-size: var(--text-xs);
  }

  .stat {
    min-width: 100px;
    padding: var(--space-3) var(--space-4);
  }

  .stat-number {
    font-size: 1.125rem !important;
    /* 18px - أصغر من العنوان */
    font-weight: 800 !important;
  }

  .stat-label {
    font-size: 0.6875rem !important;
    /* 11px */
  }

  .stat-1 {
    top: 15%;
    left: 5%;
  }

  .stat-2 {
    top: 5%;
    right: 10%;
  }

  .stat-3 {
    bottom: 25%;
    right: 2%;
  }

  .stat-4 {
    bottom: 15%;
    left: 2%;
  }

  .service-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  /* Projects slider mobile landscape */
  .projects-slider {
    padding: 6px 40px;
  }

  .projects-slider .swiper-slide {
    flex: 0 0 84%;
  }

  .contact-form .row {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    text-align: center;
  }

  .fb-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
  }
}

/* Mobile Portrait - الجوال فقط */
@media (max-width: 768px) {

  /* إخفاء السلايدر على الجوال */
  .projects-slider-desktop {
    display: none !important;
  }

  /* إظهار Grid على الجوال فقط */
  .projects-grid-mobile {
    display: grid !important;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-4);
  }

  .logo {
    width: 100px;
  }

  /* تحسين الفراغات العامة */
  .section {
    padding: var(--space-12) 0;
  }

  .section-header {
    margin-bottom: var(--space-8);
  }

  .section-title {
    font-size: 1.5rem !important;
    /* 24px - العنوان الرئيسي */
    font-weight: 800 !important;
    margin-bottom: var(--space-4);
    line-height: 1.3;
  }

  .section-subtitle {
    font-size: 0.875rem !important;
    /* 14px */
    margin-top: var(--space-2);
    line-height: 1.6;
  }

  /* Hero Section */
  .hero {
    min-height: 70vh;
    padding: var(--space-8) 0;
  }

  .hero-semicircle {
    width: 280px;
    height: 140px;
    border-radius: 140px 140px 0 0;
  }

  .video-content {
    gap: 16px;
  }

  .engineer-icon,
  .hvac-icon,
  .gear-icon {
    font-size: 24px;
  }

  .company-name {
    font-size: 1.25rem !important;
    /* 20px - أصغر من العناوين الرئيسية */
    font-weight: 800 !important;
    margin-bottom: var(--space-1);
  }

  .company-tagline {
    font-size: 0.75rem !important;
    /* 12px */
  }

  .hero-brand {
    bottom: 10px;
  }

  .hero-logo {
    width: 50px;
  }

  /* Stats Section */
  .stats-section {
    padding: var(--space-10) 0 !important;
  }

  .stats-section .section-title {
    margin-bottom: var(--space-6) !important;
    font-size: 1.5rem !important;
    /* 24px - نفس حجم العناوين الرئيسية */
  }

  .stats-grid {
    gap: var(--space-4) !important;
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .stat-card {
    padding: var(--space-4) !important;
  }

  .stat-number {
    font-size: 1.25rem !important;
    /* 20px - أصغر من العنوان */
    font-weight: 800 !important;
    margin-bottom: var(--space-1) !important;
  }

  .stat-label {
    font-size: 0.75rem !important;
    /* 12px */
  }

  /* Services Section */
  .services .section-header {
    margin-bottom: var(--space-8);
  }

  .service-grid {
    gap: var(--space-5);
  }

  .service-card {
    padding: var(--space-5);
  }

  .service-card h3 {
    font-size: 1.125rem !important;
    /* 18px - أصغر من العنوان الرئيسي */
    font-weight: 700 !important;
    margin-bottom: var(--space-2);
  }

  .service-card p {
    font-size: 0.875rem !important;
    /* 14px */
    line-height: 1.6;
    margin-bottom: var(--space-3);
  }

  .icon {
    width: 44px !important;
    height: 44px !important;
    margin-bottom: var(--space-3);
  }

  .icon img {
    width: 28px !important;
    height: 28px !important;
  }

  /* Projects Section */
  .projects {
    padding: var(--space-10) 0;
  }

  .projects .section-header {
    margin-bottom: var(--space-6);
  }

  .projects-grid-mobile {
    gap: var(--space-4);
  }

  .projects-grid-mobile .proj-image {
    height: 220px;
    width: 100%;
  }

  .projects-grid-mobile .proj-image .thumb {
    width: 100%;
    height: 100%;
  }

  .projects-grid-mobile .proj-image .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .projects-grid-mobile .proj-content {
    padding: var(--space-4);
  }

  .projects-grid-mobile .proj-content h3 {
    font-size: 1.125rem !important;
    /* 18px - أصغر من العنوان الرئيسي */
    font-weight: 700 !important;
    margin-bottom: var(--space-2);
  }

  .projects-grid-mobile .proj-content p {
    font-size: 0.875rem !important;
    /* 14px */
    margin-bottom: var(--space-3);
    line-height: 1.5;
  }

  .projects-grid-mobile .proj-tech {
    gap: var(--space-2);
  }

  .projects-grid-mobile .tech-tag {
    font-size: 10px;
    padding: 4px 10px;
  }

  .center {
    margin-top: var(--space-6);
  }

  /* Clients Section */
  .clients-section {
    padding: var(--space-10) 0 !important;
  }

  .clients-heading {
    font-size: 1.5rem !important;
    /* 24px - نفس حجم العناوين الرئيسية */
    font-weight: 800 !important;
    margin-bottom: var(--space-2) !important;
  }

  .clients-sub {
    font-size: 0.875rem !important;
    /* 14px */
    margin-bottom: var(--space-6) !important;
    opacity: 0.7 !important;
  }

  .logo-stream {
    margin-bottom: var(--space-4) !important;
  }

  /* Map & Contact Info */
  .map-info {
    padding: var(--space-10) 0;
  }

  .map-grid {
    gap: var(--space-5);
  }

  .info-card {
    padding: var(--space-5);
  }

  .info-card h3 {
    font-size: 1.125rem !important;
    /* 18px */
    font-weight: 700 !important;
    margin-bottom: var(--space-4);
  }

  .info-line {
    margin-bottom: var(--space-3);
  }

  .info-label {
    font-size: 0.75rem !important;
    /* 12px */
  }

  .info-value {
    font-size: 0.875rem !important;
    /* 14px */
  }

  .map-frame {
    height: 280px;
  }

  /* Contact Form */
  .contact-section {
    padding: var(--space-10) 0;
  }

  .contact-header {
    margin-bottom: var(--space-6);
  }

  .contact-title {
    font-size: 1.5rem !important;
    /* 24px - نفس حجم العناوين الرئيسية */
    font-weight: 800 !important;
    margin-bottom: var(--space-2);
  }

  .contact-subtitle {
    font-size: 0.875rem !important;
    /* 14px */
  }

  .contact-form {
    padding: var(--space-5);
  }

  .form-group {
    margin-bottom: var(--space-4);
  }

  .form-group label {
    font-size: 0.875rem !important;
    /* 14px */
    margin-bottom: var(--space-2);
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.875rem !important;
    /* 14px */
    padding: var(--space-3);
  }

  .submit-btn {
    padding: var(--space-3) var(--space-6);
    font-size: 0.875rem !important;
    /* 14px */
  }

  /* Footer */
  .footer-grid {
    gap: var(--space-5);
    padding: var(--space-8) 0;
  }

  .footer-grid h4 {
    font-size: 1rem !important;
    /* 16px */
    font-weight: 700 !important;
    margin-bottom: var(--space-3);
  }

  .footer-grid ul li {
    margin-bottom: var(--space-2);
  }

  .footer-grid a {
    font-size: 0.875rem !important;
    /* 14px */
  }

  .scroll-down {
    width: 36px;
    height: 36px;
    bottom: 15px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-3);
  }

  .logo {
    width: 90px;
  }

  /* تقليل الفراغات أكثر على الشاشات الصغيرة */
  .section {
    padding: var(--space-10) 0;
  }

  .section-header {
    margin-bottom: var(--space-6);
  }

  .section-title {
    font-size: 1.375rem !important;
    /* 22px - أصغر قليلاً على الشاشات الصغيرة */
    font-weight: 800 !important;
    margin-bottom: var(--space-3);
  }

  .section-subtitle {
    font-size: 0.8125rem !important;
    /* 13px */
  }

  /* Hero */
  .hero {
    min-height: 65vh;
    padding: var(--space-6) 0;
  }

  .hero-semicircle {
    width: 240px;
    height: 120px;
    border-radius: 120px 120px 0 0;
  }

  .company-name {
    font-size: 1.125rem !important;
    /* 18px */
    font-weight: 800 !important;
  }

  .company-tagline {
    font-size: 0.6875rem !important;
    /* 11px */
  }

  /* Stats */
  .stats-section {
    padding: var(--space-8) 0 !important;
  }

  .stats-grid {
    gap: var(--space-3) !important;
    grid-template-columns: 1fr !important;
  }

  .stat-card {
    padding: var(--space-3) !important;
  }

  .stat-number {
    font-size: var(--text-lg) !important;
  }

  .stat-label {
    font-size: 10px !important;
  }

  /* Services */
  .service-grid {
    gap: var(--space-4);
  }

  .service-card {
    padding: var(--space-4);
  }

  .service-card h3 {
    font-size: 1rem !important;
    /* 16px */
    font-weight: 700 !important;
  }

  .service-card p {
    font-size: 0.8125rem !important;
    /* 13px */
  }

  .icon {
    width: 40px !important;
    height: 40px !important;
  }

  .icon img {
    width: 24px !important;
    height: 24px !important;
  }

  /* Projects */
  .projects-grid-mobile {
    gap: var(--space-3);
  }

  .projects-grid-mobile .proj-image {
    height: 200px;
  }

  .projects-grid-mobile .proj-content {
    padding: var(--space-3);
  }

  .projects-grid-mobile .proj-content h3 {
    font-size: 1rem !important;
    /* 16px */
    font-weight: 700 !important;
  }

  .projects-grid-mobile .proj-content p {
    font-size: 0.8125rem !important;
    /* 13px */
  }

  /* Clients */
  .clients-section {
    padding: var(--space-8) 0 !important;
  }

  .clients-heading {
    font-size: 1.375rem !important;
    /* 22px */
    font-weight: 800 !important;
    margin-bottom: var(--space-1) !important;
  }

  .clients-sub {
    font-size: 0.8125rem !important;
    /* 13px */
    margin-bottom: var(--space-5) !important;
  }

  .logo-stream {
    margin-bottom: var(--space-3) !important;
  }

  /* Map & Info */
  .map-info {
    padding: var(--space-8) 0;
  }

  .info-card {
    padding: var(--space-4);
  }

  .map-frame {
    height: 250px;
  }

  /* Contact */
  .contact-section {
    padding: var(--space-8) 0;
  }

  .contact-form {
    padding: var(--space-4);
  }

  .form-group {
    margin-bottom: var(--space-3);
  }

  /* Footer */
  .footer-grid {
    gap: var(--space-4);
    padding: var(--space-6) 0;
  }

  .btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  .hero::before,
  .pattern::before {
    background-size: 50px 50px;
  }
}

/* Print Styles */
@media print {

  .page-dots,
  .mobile-drawer,
  .drawer-backdrop,
  .hero::before,
  .pattern::before {
    display: none;
  }

  .hero {
    background: white;
    color: black;
  }

  .hero h1 {
    color: black;
  }

  .service-card,
  .proj-card,
  .info-card,
  .contact-form {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}