/* ============================================================
   RESPONSIVE.CSS — R.S. Rubber Industries
   Breakpoints:
     1024px  — small laptops / large tablets landscape
      900px  — tablets landscape / large phones landscape
      768px  — tablets portrait
      600px  — large phones
      480px  — standard phones
      360px  — small phones
   ============================================================ */

/* ── GLOBAL HELPERS ── */
img { max-width: 100%; height: auto; }
* { box-sizing: border-box; }

/* ============================================================
   1024px — SMALL LAPTOPS & LARGE TABLETS (landscape)
   ============================================================ */
@media (max-width: 1024px) {

  /* Header */
  .header-inner { padding: 12px 20px; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .logo-text-block .name { font-size: 17px; }

  /* Hero */
  .hero-content { gap: 36px; padding: 60px 20px; }
  .hero h1 { font-size: 40px; }
  .hero-stat-card .num { font-size: 30px; }
  .hero-stat-card { padding: 16px 12px; }

  /* About */
  .about-grid { gap: 40px; }

  /* Footer */
  .footer-grid { gap: 32px; padding: 0 20px; }

  /* Products */
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

  /* Compliance */
  .compliance-grid { gap: 20px; }
  .comp-left { min-width: 100px; }

  /* Carousel */
  .carousel-content { padding: 0 48px; }
  .carousel-content h2 { font-size: 34px; }
}

/* ============================================================
   900px — TABLETS LANDSCAPE / SMALL LAPTOPS
   ============================================================ */
@media (max-width: 900px) {

  /* ── TOP BAR ── */
  .topbar .inner {
    flex-direction: column;
    gap: 4px;
    padding: 6px 16px;
    text-align: center;
  }
  .topbar-left,
  .topbar-right {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  /* ── HEADER ── */
  .header-inner { position: relative; padding: 12px 16px; }
  .hamburger { display: block !important; }
  header nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: white;
    box-shadow: 0 8px 30px rgba(0,0,0,0.13);
    padding: 12px 20px 20px;
    gap: 0;
    z-index: 500;
    border-top: 2px solid var(--red);
  }
  header nav.mobile-open { display: flex; }
  .nav-item { width: 100%; }
  .nav-link {
    display: flex;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    font-size: 15px;
  }
  .nav-link svg { transition: transform .25s; }
  .nav-item.open .nav-link svg { transform: rotate(180deg); }
  .dropdown {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    border-top: none;
    background: var(--light-gray);
    border-radius: 8px;
    padding: 6px 12px;
    margin: 4px 0 8px;
  }
  .nav-item.open .dropdown { display: block; }
  .dropdown a { padding: 10px 8px; font-size: 14px; }
  .nav-cta { margin: 14px 0 0; display: inline-block; text-align: center; width: 100%; }

  /* ── HERO ── */
  .hero { min-height: auto; }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 56px 20px;
  }
  .hero-right { display: none; }
  .hero h1 { font-size: 38px; }
  .hero p { max-width: 100%; }
  .hero-btns { flex-direction: row; flex-wrap: wrap; }

  /* ── SECTION ── */
  section { padding: 56px 0; }
  .container { padding: 0 20px; }
  .sec-title { font-size: 30px; }

  /* ── ABOUT ── */
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-product-gallery { grid-template-columns: 1fr 1fr; }
  .about-product-gallery img:first-child { grid-column: span 2; }

  /* ── WHY US ── */
  .why-grid { grid-template-columns: 1fr; gap: 16px; }

  /* ── INDUSTRIES ── */
  .industries-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }

  /* ── PRODUCTS ── */
  .products-tabs { gap: 8px; }
  .prod-tab { padding: 8px 14px; font-size: 12px; }
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }

  /* ── FEATURE GRID ── */
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }

  /* ── DIAPHRAGM CLASSIFICATION ── */
  .diag-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* ── CERTIFICATIONS ── */
  .certs-grid { grid-template-columns: 1fr; }

  /* ── COMPLIANCE ── */
  .compliance-grid { grid-template-columns: 1fr; gap: 18px; }
  .comp-card { grid-template-columns: 90px 1fr; }
  .comp-left { padding: 16px 8px; }
  .comp-left .comp-icon { font-size: 24px; }

  /* ── CONTACT ── */
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-box { padding: 24px; }
  .form-card { padding: 28px 20px; }

  /* ── CTA BAND ── */
  .cta-band { padding: 48px 0; }
  .cta-band h2 { font-size: 30px; }

  /* ── FOOTER ── */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; padding: 0 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; padding: 20px; }
  .footer-about { max-width: 100%; }

  /* ── CAROUSEL ── */
  .carousel-wrapper { height: auto; min-height: 380px; }
  .carousel-slide { min-height: 380px; height: auto; }
  .carousel-visual { display: none !important; }
  .carousel-content { width: 100%; padding: 40px 24px 70px; }
  .carousel-content h2 { font-size: 28px; }
  .carousel-content p { font-size: 14px; }
  .c-highlights { gap: 8px; }
  .c-chip { font-size: 11px; padding: 5px 11px; }

  /* ── PAGE HERO ── */
  .page-hero { padding: 44px 0; }
  .page-hero h1 { font-size: 34px; }
}

/* ============================================================
   768px — TABLETS PORTRAIT
   ============================================================ */
@media (max-width: 768px) {

  /* Hero */
  .hero-content { padding: 48px 16px; }
  .hero h1 { font-size: 34px; }
  .hero-btns { gap: 10px; }
  .btn-primary, .btn-outline-white { padding: 12px 22px; font-size: 14px; }

  /* Products */
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

  /* Industries */
  .industries-grid { grid-template-columns: repeat(2, 1fr); }

  /* Diag */
  .diag-grid { grid-template-columns: repeat(2, 1fr); }

  /* Compliance card — stack on small tablets */
  .comp-card { grid-template-columns: 80px 1fr; }

  /* Form row stacks */
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Table */
  .table-wrapper { font-size: 11px; }
  thead th, tbody td { padding: 8px 7px; }

  /* Carousel */
  .carousel-wrapper { min-height: 340px; }
  .carousel-slide { min-height: 340px; }
  .carousel-content { padding: 36px 20px 65px; }
  .carousel-content h2 { font-size: 26px; }
  .carousel-prev { left: 10px; width: 36px; height: 36px; font-size: 15px; }
  .carousel-next { right: 10px; width: 36px; height: 36px; font-size: 15px; }

  /* Page hero */
  .page-hero { padding: 36px 0; }
  .page-hero h1 { font-size: 30px; }

  /* Section padding */
  section { padding: 48px 0; }
  .container { padding: 0 16px; }
}

/* ============================================================
   600px — LARGE PHONES (most Android flagship, iPhone Plus)
   ============================================================ */
@media (max-width: 600px) {

  /* Topbar — hide second phone on tiny screens */
  .topbar-left a:last-child { display: none; }
  .topbar { font-size: 11.5px; padding: 5px 0; }

  /* Logo — compact */
  .logo-badge { padding: 6px 10px; }
  .logo-badge .rsri { font-size: 18px; letter-spacing: 2px; }
  .logo-text-block .name { font-size: 15px; }
  .logo-text-block .tag { font-size: 9px; letter-spacing: 1.5px; }

  /* Hero */
  .hero-content { padding: 40px 16px; }
  .hero h1 { font-size: 30px; line-height: 1.15; }
  .hero p { font-size: 14.5px; }
  .hero-pill { font-size: 9.5px; padding: 6px 12px; letter-spacing: 2px; }
  .hero-btns { flex-direction: column; gap: 10px; }
  .btn-primary, .btn-outline-white { width: 100%; text-align: center; padding: 14px 20px; }

  /* Section titles */
  .sec-title { font-size: 26px; }
  .sec-sub { font-size: 14px; }
  section { padding: 40px 0; }
  .container { padding: 0 16px; }

  /* Product cards */
  .prod-grid { grid-template-columns: 1fr; gap: 16px; }
  .prod-card-top { height: 200px !important; }
  .products-tabs { flex-direction: column; gap: 6px; }
  .prod-tab { width: 100%; text-align: center; padding: 11px 14px; font-size: 13px; }

  /* Feature grid */
  .feature-grid { grid-template-columns: 1fr; }

  /* Industries */
  .industries-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ind-card { padding: 18px 12px; }
  .ind-icon { font-size: 28px; }
  .ind-card h3 { font-size: 12px; }

  /* Diag grid */
  .diag-grid { grid-template-columns: 1fr; }
  .diag-svg { height: 110px; }

  /* Why us */
  .why-card { padding: 20px 16px; }
  .why-num { font-size: 32px; min-width: 40px; }

  /* Compliance */
  .comp-card { grid-template-columns: 1fr; }
  .comp-left {
    flex-direction: row;
    justify-content: flex-start;
    padding: 14px 16px;
    gap: 12px;
  }

  /* About gallery */
  .about-product-gallery { grid-template-columns: 1fr; }
  .about-product-gallery img:first-child { grid-column: span 1; height: 180px; }
  .about-product-gallery img { height: 150px; }

  /* Value cards */
  .value-card { padding: 16px; }

  /* Stat pills */
  .stat-pill { min-width: 80px; padding: 8px 14px; }
  .stat-pill .n { font-size: 18px; }

  /* Contact */
  .contact-box { padding: 20px 16px; }
  .form-card { padding: 22px 16px; }
  .form-row { grid-template-columns: 1fr; }

  /* CTA */
  .cta-band { padding: 40px 0; }
  .cta-band h2 { font-size: 26px; }
  .cta-band p { font-size: 14px; }
  .btn-white { padding: 12px 28px; font-size: 14px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 0 16px; }
  .footer-bottom { padding: 16px; gap: 6px; font-size: 11.5px; }
  footer { padding: 44px 0 0; }
  .footer-about { max-width: 100%; }
  footer h4 { font-size: 13px; margin-bottom: 14px; }
  .footer-links a { font-size: 13px; }
  .fc-item { font-size: 13px; }

  /* Carousel */
  .carousel-wrapper { min-height: 300px; }
  .carousel-slide { min-height: 300px; }
  .carousel-content { padding: 28px 16px 60px; }
  .carousel-content h2 { font-size: 22px; }
  .carousel-content p { font-size: 13.5px; margin-bottom: 18px; }
  .c-tag { font-size: 9.5px; letter-spacing: 2px; padding: 5px 12px; }
  .c-btn { padding: 10px 20px; font-size: 13px; }
  .c-highlights { gap: 6px; margin-bottom: 18px; }
  .c-chip { font-size: 10.5px; padding: 4px 10px; }
  .carousel-prev { left: 8px; width: 34px; height: 34px; font-size: 14px; }
  .carousel-next { right: 8px; width: 34px; height: 34px; font-size: 14px; }
  .carousel-dots { bottom: 14px; }

  /* Page hero */
  .page-hero { padding: 30px 0; }
  .page-hero h1 { font-size: 26px; }
  .breadcrumb { font-size: 12px; }

  /* Table */
  .table-wrapper { border-radius: 6px; }
  thead th { font-size: 10px; padding: 8px 6px; }
  tbody td { font-size: 11px; padding: 8px 6px; }

  /* Home gallery grid inline-style override */
  section [style*="grid-template-columns:repeat(4"] ,
  section [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Home gallery items */
  .home-gallery-item img { height: 160px; }
  .home-gallery-label { font-size: 12px; padding: 18px 10px 10px; }
}

/* ============================================================
   480px — STANDARD PHONES (iPhone SE, Galaxy S-series, etc.)
   ============================================================ */
@media (max-width: 480px) {

  /* Topbar — hide entirely or shrink */
  .topbar-right { display: none; }
  .topbar-left { justify-content: center; }

  /* Logo */
  .logo-badge { padding: 5px 8px; }
  .logo-badge .rsri { font-size: 16px; letter-spacing: 1.5px; }
  .logo-text-block .name { font-size: 14px; }
  .logo-text-block .tag { display: none; }

  /* Hero */
  .hero h1 { font-size: 27px; }
  .hero-pill { display: none; }

  /* Section */
  .sec-title { font-size: 24px; }
  section { padding: 36px 0; }

  /* Industries — single column on very small phones */
  .industries-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ind-card { padding: 16px 8px; }

  /* Products */
  .prod-card-top { height: 180px !important; }

  /* Why card */
  .why-num { font-size: 28px; }
  .why-card h3 { font-size: 15px; }

  /* Carousel */
  .carousel-wrapper { min-height: 280px; }
  .carousel-slide { min-height: 280px; }
  .carousel-content h2 { font-size: 20px; }
  .carousel-content p { display: none; }
  .c-highlights { display: none; }
  .carousel-prev, .carousel-next { display: none; }

  /* Home gallery — single column */
  section [style*="grid-template-columns:repeat(4"] ,
  section [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* Footer */
  .footer-grid { gap: 20px; }
  .footer-brand { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Stat pills */
  .stat-pills { gap: 8px; }
  .stat-pill { min-width: 72px; padding: 7px 10px; }

  /* CTA */
  .btn-white { display: block; width: 100%; max-width: 280px; margin: 0 auto; text-align: center; }
  .cta-band h2 { font-size: 24px; }

  /* Contact */
  .ci { width: 38px; height: 38px; font-size: 15px; }

  /* Page hero */
  .page-hero h1 { font-size: 24px; }

  /* Table scroll hint */
  .table-wrapper::before {
    content: '← Scroll to see more →';
    display: block;
    text-align: center;
    font-size: 11px;
    color: var(--gray);
    padding: 6px;
    background: var(--light-gray);
    border-radius: 6px 6px 0 0;
  }
}

/* ============================================================
   360px — SMALL / OLDER PHONES
   ============================================================ */
@media (max-width: 360px) {

  /* Header */
  .header-inner { padding: 10px 12px; }
  .logo-text-block .name { font-size: 13px; }

  /* Hero */
  .hero h1 { font-size: 24px; }
  .hero-content { padding: 32px 12px; }

  /* Container */
  .container { padding: 0 12px; }

  /* Section */
  .sec-title { font-size: 22px; }

  /* Industries */
  .industries-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ind-card { padding: 14px 8px; }
  .ind-icon { font-size: 24px; margin-bottom: 8px; }
  .ind-card h3 { font-size: 11px; }

  /* Carousel */
  .carousel-content { padding: 24px 12px 56px; }
  .carousel-content h2 { font-size: 19px; }

  /* Products */
  .prod-tab { padding: 10px 10px; font-size: 12px; }
  .prod-card-body h3 { font-size: 17px; }

  /* Footer */
  .footer-grid { padding: 0 12px; }
  .footer-bottom { padding: 14px 12px; }

  /* Contact */
  .form-card { padding: 18px 12px; }
  .contact-box { padding: 16px 12px; }
}

/* ============================================================
   TOUCH DEVICES — disable hover effects that cause issues
   ============================================================ */
@media (hover: none) {
  .prod-card:hover { transform: none; box-shadow: none; }
  .ind-card:hover { transform: none; box-shadow: none; }
  .why-card:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
  .home-gallery-item:hover img { transform: none; }
  .prod-card:hover .prod-card-top img { transform: none; }
  .btn-primary:hover { transform: none; }
  .btn-white:hover { transform: none; box-shadow: none; }
}

/* ============================================================
   LANDSCAPE PHONES — prevent too-tall hero on rotated phones
   ============================================================ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .carousel-wrapper { min-height: 240px; }
  .carousel-slide { min-height: 240px; }
  .carousel-content { padding: 20px 24px 50px; }
  .carousel-content h2 { font-size: 20px; }
  .hero-content { padding: 30px 20px; }
  .hero { min-height: auto; }
  .page-hero { padding: 24px 0; }
}

/* ============================================================
   PRINT — clean print view
   ============================================================ */
@media print {
  .topbar, header nav, .carousel-wrapper, .carousel-prev,
  .carousel-next, .hamburger, .cta-band, footer,
  .hero-shape, .hero-shape2, .hero-diagonal { display: none !important; }
  .hero { background: white !important; }
  .hero h1, .hero p { color: black !important; }
  body { font-size: 12pt; }
  .container { max-width: 100%; padding: 0 12pt; }
}
