/* ==========================================================================
   NORNACO — Responsive Stylesheet
   Breakpoints: 1200 / 992 / 768 / 576 / 480 / 414 / 390 / 360
   Everything in this file is scoped inside @media (max-width) queries,
   so nothing here changes the desktop experience.
   ========================================================================== */

/* ----- Large desktop tune ----- */
@media (max-width:1200px){
  .service-grid{ grid-template-columns:repeat(3,1fr); }
  .cat-grid{ grid-template-columns:repeat(3,1fr); }
  .equipment-grid{ grid-template-columns:repeat(3,1fr); }
  .cat-col{ border-bottom:1px solid var(--gray-200); }
}

/* ----- Tablet ----- */
@media (max-width:992px){
  .container{ padding:0 20px; }
  .section{ padding:64px 0; }

  .topbar-left{ display:none; }
  .nav-toggle{ display:flex; }
  .nav-links{
    position:fixed;
    top:0; right:-100%;
    height:100vh;
    width:82%;
    max-width:340px;
    background:var(--white);
    flex-direction:column;
    align-items:stretch;
    padding:100px 26px 26px;
    box-shadow:var(--shadow-lg);
    transition:right .4s ease;
    z-index:600;
    overflow-y:auto;
  }
  .nav-links.open{ right:0; }
  .nav-links a{ padding:14px 10px; border-bottom:1px solid var(--gray-100); }
  .nav-cta{ display:none; }
  .nav-overlay{
    position:fixed; inset:0;
    background:rgba(8,21,39,.55);
    z-index:550;
    opacity:0; visibility:hidden;
    transition:var(--transition);
  }
  .nav-overlay.show{ opacity:1; visibility:visible; }
  .nav-close{
    display:none;
    position:absolute; top:24px; left:24px;
    width:36px; height:36px;
    border-radius:50%;
    background:var(--gray-100);
    align-items:center; justify-content:center;
    border:none;
  }
  .nav-close svg{ width:18px; height:18px; color:var(--navy-800); }
  .nav-links.open .nav-close{ display:flex; }

  .hero-content h1{ font-size:36px; }
  .hero-slide, .hero-slide.active{ min-height:520px; }

  .about-grid{ grid-template-columns:1fr; }
  .about-highlights{ grid-template-columns:1fr 1fr; }

  .service-grid{ grid-template-columns:repeat(2,1fr); }
  .cat-grid{ grid-template-columns:repeat(2,1fr); }
  .equipment-grid{ grid-template-columns:repeat(3,1fr); }
  .quality-grid{ grid-template-columns:repeat(2,1fr); }
  .stats-grid{ grid-template-columns:repeat(2,1fr); }
  .transport-grid{ grid-template-columns:1fr; }
  .transport-features{ grid-template-columns:1fr 1fr; }
  .supplier-benefits{ grid-template-columns:1fr; }

  .contact-grid{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
  .doc-grid{ grid-template-columns:1fr; }

  .cta-band{ flex-direction:column; text-align:center; padding:38px 26px; }
  .cta-band .txt{ max-width:none; }
}

/* ----- Large mobile / small tablet (phablets, 768 and down) ----- */
@media (max-width:768px){
  /* ---- Topbar: shorter, compact, everything on one line ---- */
  .topbar{ font-size:11.5px; }
  .topbar .container{
    padding-top:7px;
    padding-bottom:7px;
    flex-wrap:nowrap;
    justify-content:center;
    gap:14px;
  }
  .topbar-right{ gap:12px; }
  .topbar-socials{ gap:8px; }
  .topbar-socials a{ width:24px; height:24px; }
  .topbar-socials svg{ width:11px; height:11px; }
  .lang-switch{ gap:5px; }
  .lang-switch button{ font-size:12px; padding:2px 3px; }

  /* ---- Header: compact, vertically centered, comfortable tap target ---- */
  .navbar{ padding:10px 0; gap:12px; }
  .brand img{ height:38px; width:auto; }
  .nav-toggle{
    width:46px; height:46px;
    padding:0;
    align-items:center;
    justify-content:center;
  }
  .nav-toggle span{ width:22px; }

  /* ---- Mobile navigation drawer: premium touches ---- */
  .nav-links{
    border-inline-start:3px solid var(--gold-500);
    gap:2px;
  }
  .nav-links a{
    font-size:15.5px;
    border-radius:8px;
  }
  .nav-links a.active{ background:var(--gold-100); }
  .nav-links a.active::after{ display:none; }
  .nav-links-cta{
    display:flex;
    justify-content:center;
    margin-top:18px;
    width:100%;
    text-align:center;
  }

  /* ---- Breathing room before the first section after the hero ---- */
  .hero + section{ padding-top:56px; }

  /* ==========================================================================
     Service detail sections (services.html, transportation.html,
     equipment.html, careers.html) — collapse the desktop two-column
     layout into a clean single column: image, then heading, then
     description, then feature list. This mirrors the DOM order already
     used across all four files (image div is always the first child),
     so a simple order reset achieves it without any HTML restructuring.
     ========================================================================== */
  .two-col{
    grid-template-columns:1fr;
    gap:22px;
  }
  .two-col > *:nth-child(1),
  .two-col--rev > *:nth-child(1){ order:1; }
  .two-col > *:nth-child(2),
  .two-col--rev > *:nth-child(2){ order:2; }

  .two-col img{ width:100%; height:auto; border-radius:18px; }

  .service-heading{
    flex-direction:column;
    align-items:center;
    text-align:center;
    gap:8px;
    margin-bottom:16px;
  }
  .service-title,
  .service-title.service-title--sm{
    font-size:32px;
    line-height:1.3;
    text-align:center;
    margin-inline-start:0 !important;
    position:relative;
    padding-bottom:14px;
  }
  /* Small gold accent under every service heading — a recurring premium
     brand marker used throughout the mobile layout. */
  .service-title::after{
    content:"";
    position:absolute;
    bottom:0; left:50%;
    transform:translateX(-50%);
    width:44px; height:3px;
    background:var(--gold-500);
    border-radius:3px;
  }
  .service-desc{
    font-size:18px;
    line-height:1.8;
    text-align:center;
  }

  /* ---- Feature checklist: presented as a soft, elevated card rather
     than raw list text, so it reads as a designed UI component ---- */
  .service-feature-list{
    grid-template-columns:1fr;
    gap:0;
    background:var(--gray-50);
    border:1px solid var(--gray-200);
    border-radius:16px;
    padding:6px 18px;
  }
  .service-feature-list li{
    font-size:16.5px;
    line-height:1.6;
    padding:13px 0;
    border-bottom:1px solid var(--gray-200);
  }
  .service-feature-list li:last-child{ border-bottom:none; }
  .service-feature-list li svg{
    width:20px;
    height:20px;
  }

  /* ---- Transportation banner image: let it size naturally when the
     grid collapses to one column instead of relying on height:100% ---- */
  .transport-media{ height:auto; }
  .transport-media img{ height:auto; aspect-ratio:16/10; }

  /* ==========================================================================
     Footer — compact, premium, centered hierarchy:
     logo → description → socials → services (2-col) → contact → copyright.
     Safe-area padding keeps content clear of the iPhone home indicator.
     ========================================================================== */
  .footer-top{ padding:40px 0 8px; }
  .footer-grid{ grid-template-columns:1fr; gap:0; }
  .footer-brand{
    text-align:center;
    padding-bottom:28px;
    margin-bottom:28px;
    border-bottom:1px solid rgba(255,255,255,.08);
  }
  .footer-brand img{
    max-width:190px;
    width:auto;
    height:auto;
    margin:0 auto 14px;
  }
  .footer-brand p{ max-width:420px; margin-inline:auto; font-size:13px; }
  .footer-socials{ justify-content:center; margin-top:16px; }
  .footer-socials a{ width:42px; height:42px; }
  .footer-socials svg{ width:17px; height:17px; }

  .footer-col{
    text-align:center;
    padding-bottom:26px;
    margin-bottom:26px;
    border-bottom:1px solid rgba(255,255,255,.08);
  }
  .footer-col:last-child{ border-bottom:none; margin-bottom:0; padding-bottom:0; }
  .footer-col h4{ font-size:14.5px; letter-spacing:.3px; }
  .footer-col h4::after{ right:50%; transform:translateX(50%); }

  /* Services column becomes a compact 2-column grid so 6 items don't
     stretch into a long single-file list. */
  .footer-col:nth-child(2) ul{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:4px 10px;
  }
  .footer-col ul li{ margin-bottom:6px; }
  .footer-col:nth-child(2) ul li{ margin-bottom:0; }
  .footer-col ul li a{ justify-content:center; font-size:13.5px; }
  .footer-contact li{ justify-content:center; }
  .footer-btn{ margin-top:4px; }

  .footer-bottom{
    padding-bottom:calc(20px + env(safe-area-inset-bottom));
  }

  /* ---- Stats strip: turn each stat into a small premium card instead
     of plain icon+number in a row, and separate it visually from the
     white Equipment section that follows it. ---- */
  .stats-strip{ background:var(--gray-50); border-bottom:none; }
  .stats-grid{ gap:14px; padding:32px 0; }
  .stat-item{
    background:var(--white);
    border:1px solid var(--gray-200);
    border-radius:14px;
    padding:16px;
    box-shadow:var(--shadow-sm);
    justify-content:flex-start;
  }

  /* ==========================================================================
     SECOND MOBILE DESIGN PASS — premium visual rhythm
     ========================================================================== */

  /* ---- About: cards get a visible shadow by default (mobile has no
     hover to reveal .highlight-card's existing hover-only shadow) ---- */
  .highlight-card{ box-shadow:var(--shadow-sm); }

  /* A thin gold line at the top of alternating/dark sections marks each
     scroll transition as intentional rather than an abrupt color change. */
  .section--gray,
  .transport-banner{
    position:relative;
  }
  .section--gray::before,
  .transport-banner::before{
    content:"";
    position:absolute;
    top:0; left:50%;
    transform:translateX(-50%);
    width:56px; height:3px;
    background:var(--gold-500);
    border-radius:3px;
    z-index:2;
  }

  /* ---- Transportation banner: turn the 3 feature callouts into small
     bordered cards so the section reads as designed, not plain text on
     a dark background — and matches the feature-card treatment used in
     the service detail pages for a consistent premium language. ---- */
  .tfeat{
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.12);
    border-radius:12px;
    padding:14px;
  }

  /* ---- Service detail images: consistent aspect ratio so every section
     reads as a uniform, designed card rather than varying wildly with
     each photo's native proportions. object-fit:cover crops gently,
     never stretches. ---- */
  .two-col img{
    aspect-ratio:4/3;
    object-fit:cover;
  }
  .transport-media img{ aspect-ratio:4/3; }

  /* ---- Buttons: subtle premium press feedback ---- */
  .btn:active{ transform:scale(0.97); }
}

/* Touch-device active feedback (progressive enhancement — desktop
   keeps its existing :hover lift untouched, this is additive). */
@media (hover:none){
  .equipment-card:active,
  .quality-card:active,
  .highlight-card:active,
  .contact-card:active,
  .cat-col:active{
    transform:scale(0.98);
    transition:transform .15s ease;
  }
}

/* ----- Mobile ----- */
@media (max-width:640px){
  .section{ padding:48px 0; }
  .section-head h2{ font-size:26px; }
  .page-hero{ padding:130px 0 50px; }
  .page-hero h1{ font-size:28px; }

  /* ---- Hero: fit naturally, reduce crowding ---- */
  .hero{ min-height:auto; }
  .hero-slide, .hero-slide.active{ min-height:560px; }
  .hero-content{
    padding:24px 0 88px;
    max-width:100%;
    padding-inline:52px;
  }
  .hero-content .eyebrow{ font-size:14px; margin-bottom:10px; }
  .hero-content h1{ font-size:32px; margin-bottom:12px; }
  .hero-content .sub{ font-size:16px; margin-bottom:8px; }
  .hero-content .motto{ font-size:15px; margin-bottom:20px; }
  .hero-actions{ gap:10px; }
  .hero-actions .btn{
    padding:13px 20px;
    font-size:14px;
    flex:1 1 auto;
    justify-content:center;
  }

  /* Slightly stronger, more even overlay so text stays readable
     across the full width of the mobile hero, without darkening
     the image itself. */
  .hero-slide .overlay{
    background:linear-gradient(180deg, rgba(8,21,39,.55) 0%, rgba(8,21,39,.72) 55%, rgba(8,21,39,.82) 100%);
  }

  /* ---- Hero arrows: smaller, kept clear of the text column ---- */
  .hero-arrows{ padding:0 10px; top:auto; bottom:20px; transform:none; }
  .hero-arrow{ width:40px; height:40px; }
  .hero-arrow svg{ width:16px; height:16px; }

  /* ---- Dots: smaller, safely above the bottom edge ---- */
  .hero-dots{ bottom:20px; gap:8px; }
  .hero-dots button{ width:8px; height:8px; }
  .hero-dots button.active{ width:22px; }

  .brand img{ height:34px; }

  .about-highlights{ grid-template-columns:1fr; }
  .about-media .badge{ right:10px; bottom:-18px; padding:12px 16px; }

  .service-grid{ grid-template-columns:1fr; }
  .cat-grid{ grid-template-columns:1fr; }
  .equipment-grid{ grid-template-columns:repeat(2,1fr); }
  .quality-grid{ grid-template-columns:1fr; }
  .stats-grid{ grid-template-columns:1fr 1fr; }
  .transport-features{ grid-template-columns:1fr; }

  .form-grid{ grid-template-columns:1fr; }
  .footer-bottom{ flex-direction:column; text-align:center; }

  .doc-grid{ grid-template-columns:1fr; }
  .cta-band h3{ font-size:21px; }
}

/* ----- 576px ----- */
@media (max-width:576px){
  .hero-content{ padding-inline:46px; }
  .hero-content h1{ font-size:30px; }
}

/* ----- 480px ----- */
@media (max-width:480px){
  .container{ padding:0 16px; }

  .topbar .container{ gap:10px; }
  .topbar-right{ gap:10px; }
  .topbar-socials{ gap:6px; }
  .topbar-socials a{ width:22px; height:22px; }
  .topbar-socials svg{ width:10px; height:10px; }

  .hero-slide, .hero-slide.active{ min-height:600px; }
  .hero-content{ padding-inline:44px; }
  .hero-content h1{ font-size:28px; }
  .hero-content .sub{ font-size:15px; }
  .hero-actions .btn{ padding:12px 16px; font-size:13.5px; }

  .hero-arrows{ padding:0 8px; }
  .hero-arrow{ width:38px; height:38px; }

  .stats-grid{ grid-template-columns:1fr; }
  .equipment-grid{ grid-template-columns:1fr; }

  .service-title,
  .service-title.service-title--sm{ font-size:30px; }
  .service-desc{ font-size:17px; }
}

/* ----- 414px (iPhone Plus/Max widths) ----- */
@media (max-width:414px){
  .hero-content{ padding-inline:40px; }
  .hero-content h1{ font-size:27px; }
  .hero-content .eyebrow{ font-size:13.5px; }
}

/* ----- 390px (iPhone 12/13/14 standard) ----- */
@media (max-width:390px){
  .brand img{ height:30px; }

  .hero-content{ padding-inline:36px; }
  .hero-content h1{ font-size:25px; line-height:1.3; }
  .hero-content .sub{ font-size:14px; }
  .hero-content .motto{ font-size:14px; }

  /* Buttons can't comfortably sit side by side at this width with
     long Arabic labels — stack them full-width instead. */
  .hero-actions{ flex-direction:column; }
  .hero-actions .btn{ width:100%; }

  .service-title,
  .service-title.service-title--sm{ font-size:28px; }
  .service-desc{ font-size:16.5px; }
  .footer-brand img{ max-width:170px; }
}

/* ----- 360px (smallest commonly supported width) ----- */
@media (max-width:360px){
  .hero-content{ padding-inline:30px; }
  .hero-content h1{ font-size:23px; }
  .hero-arrow{ width:36px; height:36px; }
  .hero-dots button{ width:7px; height:7px; }
  .hero-dots button.active{ width:18px; }

  .service-title,
  .service-title.service-title--sm{ font-size:26px; }
  .service-desc{ font-size:16px; }
  .footer-brand img{ max-width:160px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

/* Organizational Chart - Mobile */
@media (max-width: 768px) {
  .org-chart-image {
    margin: 25px auto 35px;
    padding: 8px;
    border-radius: 12px;
  }

  .org-chart-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
}
