/* ==========================================================================
   EMERSONFORT TECHNOLOGIES (OPC) PRIVATE LIMITED
   Responsive Adaptations - Mobile, Tablet, Laptop, Desktop
   ========================================================================== */

/* --- 1. LARGE LAPTOPS & DESKTOPS (Max 1200px) --- */
@media (max-width: 1200px) {
  :root {
    --container-padding: 1.25rem;
  }

  .sectors-nav-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }

  .tech-divisions-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
    gap: 2rem;
  }
}

/* --- 2. TABLETS & SMALL LAPTOPS (Max 1024px) --- */
@media (max-width: 1024px) {
  :root {
    --space-2xl: 3.75rem;
    --space-xl: 2.5rem;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.9rem; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-content {
    max-width: 100%;
    text-align: center;
  }

  .hero-lead-mockup {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-eyebrow::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .hero-actions-mockup {
    justify-content: center;
  }

  .hero-stat-row-mockup {
    justify-content: center;
  }

  .tech-divisions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }

  .sectors-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-catalog-wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .services-catalog-wrap .service-detail-card:only-child,
  .services-catalog-wrap .service-detail-card:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .about-intro-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* --- 3. TABLETS & MOBILE SCREENS (Max 992px) --- */
@media (max-width: 992px) {
  :root {
    --header-height: 64px;
    --space-2xl: 2.75rem;
    --space-xl: 2rem;
  }

  .header-inner {
    height: 64px;
  }

  .brand-logo-img {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    font-size: 0.65rem;
  }

  /* Hide desktop navigation & desktop header CTA button on mobile */
  .desktop-nav,
  .header-cta-btn {
    display: none !important;
  }

  /* Display clean hamburger button */
  .mobile-nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    color: var(--color-dark);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(11, 19, 43, 0.05);
    transition: all var(--transition-fast);
  }

  .mobile-nav-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-subtle);
  }

  /* Mobile Slide-Out Drawer Component */
  .mobile-nav-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1050;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .mobile-nav-drawer.open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
  }

  .drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 19, 43, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
  }

  .drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85%;
    max-width: 340px;
    height: 100%;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 35px rgba(11, 19, 43, 0.2);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    z-index: 2;
  }

  .mobile-nav-drawer.open .drawer-panel {
    transform: translateX(0);
  }

  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: #FAFBFD;
  }

  .drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .drawer-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }

  .drawer-brand-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-dark);
    display: block;
    line-height: 1.1;
  }

  .drawer-brand-name span {
    color: var(--color-secondary);
  }

  .drawer-brand-sub {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 500;
  }

  .drawer-close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: #FFFFFF;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
  }

  .drawer-close-btn:hover {
    color: #EF4444;
    border-color: #EF4444;
    background: #FEF2F2;
  }

  .drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
  }

  .drawer-menu {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0 1.25rem;
    gap: 0.4rem;
    width: 100%;
  }

  .drawer-menu li {
    width: 100%;
  }

  .drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all var(--transition-fast);
  }

  .drawer-link:hover {
    background: rgba(0, 173, 239, 0.08);
    color: var(--color-primary-dark);
    transform: translateX(3px);
  }

  .drawer-link.active {
    background: linear-gradient(135deg, rgba(0, 173, 239, 0.12) 0%, rgba(101, 45, 146, 0.08) 100%);
    color: var(--color-primary-dark);
    font-weight: 700;
    border-left: 3.5px solid var(--color-primary);
  }

  .drawer-arrow {
    display: inline-block;
    font-size: 1.15rem;
    color: #94A3B8;
    transition: transform var(--transition-fast);
  }

  .drawer-link:hover .drawer-arrow {
    color: var(--color-primary);
    transform: translateX(2px);
  }

  .drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--color-border);
    background: #FAFBFD;
  }

  .drawer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #64748B;
  }

  .drawer-contact-info a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--color-primary-dark);
    font-weight: 600;
    text-decoration: none;
  }

  .mission-vision-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-section {
    padding: 2.25rem 0 2.5rem 0;
  }

  .hero-title-mockup {
    font-size: 2.15rem;
  }

  .hero-stat-row-mockup {
    gap: 1.25rem;
  }

  .hero-stat-item-mockup strong {
    font-size: 1.2rem;
  }

  .tech-divisions-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .sectors-nav-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: 1.75rem 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  .services-filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    flex: 0 0 auto;
  }
}

/* --- 4. SMALL MOBILE SCREENS (Max 480px) --- */
@media (max-width: 480px) {
  .brand-subtitle {
    display: none;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .brand-logo-img {
    width: 34px;
    height: 34px;
  }

  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }

  .hero-actions-mockup {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions-mockup .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stat-row-mockup {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .hero-stat-sep-mockup {
    display: none;
  }

  .service-detail-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .tech-division-card {
    padding: 1.35rem 1.15rem;
  }
}
