/* =============================================
   HIGHTECH POLIMER — Responsive Styles
   ============================================= */

/* Tablet */
@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .hero-stats {
    flex-direction: row;
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    justify-content: center;
    margin-top: 40px;
  }
}

/* Small Tablet */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 26, 14, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: var(--z-overlay);
    padding: 100px 40px;
    gap: 8px;
  }

  .nav-links.open .nav-link {
    font-size: 18px;
    padding: 14px 20px;
  }

  .nav-links.open .nav-cta {
    margin-top: 20px;
    text-align: center;
    justify-content: center;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding-left: 20px;
    min-width: auto;
  }

  .hero-content {
    text-align: center;
  }

  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .story-grid .story-visual {
    max-width: 100%;
  }

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

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

  .topbar {
    gap: 16px;
    font-size: 11px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --nav-height: 60px;
    --topbar-height: 32px;
  }

  h1 {
    letter-spacing: -2px;
  }

  h2 {
    font-size: clamp(24px, 7vw, 36px);
  }

  .topbar .hide-mobile {
    display: none;
  }

  .topbar {
    gap: 10px;
    font-size: 10px;
    padding: 0 12px;
  }

  .topbar .lang-switch {
    font-size: 9px;
    padding: 2px 8px;
  }

  .container {
    padding: 0 16px;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-brand p {
    font-size: 13px;
  }

  .hero-stats {
    width: 100%;
  }

  .stat-box {
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 14px 24px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  /* Section padding reduction on mobile */
  .section {
    padding: 60px 0;
  }

  /* Label / monospace tags */
  .label {
    font-size: 10px;
    letter-spacing: 2px;
  }

  /* Nav mobile menu improvements */
  .nav-links.open {
    padding: 90px 24px 40px;
    gap: 4px;
    overflow-y: auto;
  }

  .nav-links.open .nav-link {
    font-size: 16px;
    padding: 12px 16px;
  }

  .nav-links.open .nav-dropdown-menu {
    padding-left: 16px;
  }

  .nav-links.open .nav-dropdown-item {
    padding: 8px 12px;
    font-size: 13px;
  }

  .nav-links.open .nav-dropdown-item small {
    font-size: 11px;
  }

  /* Footer on mobile */
  .footer {
    padding: 40px 0 20px;
  }

  .footer-title {
    font-size: 13px;
  }

  .footer-links li {
    font-size: 13px;
  }

  .footer-socials {
    justify-content: center;
  }

  /* Distributor badge */
  .distributor-badge {
    font-size: 10px !important;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  :root {
    --nav-height: 56px;
    --topbar-height: 28px;
  }

  h1 {
    font-size: clamp(32px, 9vw, 42px);
    letter-spacing: -1.5px;
  }

  .container {
    padding: 0 12px;
  }

  .topbar {
    font-size: 9px;
    gap: 8px;
  }
}

/* =============================================
   Mobile safety & polish — applied globally
   ============================================= */
@media (max-width: 900px) {
  html, body {
    overflow-x: hidden;
  }

  /* Prevent any nested block from creating horizontal scroll */
  img, video, iframe, svg {
    max-width: 100%;
    height: auto;
  }

  /* Lightbox padding for small screens */
  .lightbox {
    padding: 16px;
  }

  .lightbox-img {
    max-height: 82vh;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 600px) {
  /* LFT-G hero sizing on mobile */
  .lft-hero {
    min-height: auto;
  }

  .lft-hero .container {
    padding-top: 120px !important;
    padding-bottom: 60px !important;
  }

  .lft-hero-subtitle {
    font-size: 14px !important;
    line-height: 1.5;
  }

  .lft-hero-desc {
    font-size: 13px !important;
    line-height: 1.75;
  }

  /* Timeline hero photo — keep aspect ratio sensible on mobile */
  .timeline-photo--hero {
    aspect-ratio: 4 / 3;
  }

  /* Caption always visible on mobile (no hover) */
  .timeline-photo .timeline-photo-caption {
    opacity: 1;
    transform: translateY(0);
    font-size: 10px;
    padding: 22px 12px 10px;
  }

  /* Larger touch targets for CTA buttons */
  .btn,
  .btn-primary,
  .btn-secondary {
    min-height: 48px;
  }

  /* Ensure nav-cta readable on mobile drawer */
  .nav-links.open .nav-cta {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Lightbox tighter on narrow phones */
  .lightbox {
    padding: 12px;
  }

  .lightbox-caption {
    font-size: 11px;
    padding: 6px 12px;
    max-width: 90vw;
  }

  /* About hero visual height on mobile — don't dominate the viewport */
  .about-hero-visual {
    height: 360px !important;
  }

  /* Story/timeline cards paddings */
  .stat-box,
  .hero-stat-row .stat-box {
    padding: 16px 18px !important;
  }

  /* Footer brand image sizing */
  .footer-brand img {
    max-width: 200px;
  }
}

/* Ultra-wide imagery in hero on tablet should not get over-cropped */
@media (min-width: 601px) and (max-width: 1024px) {
  .lft-hero .container {
    padding-top: 150px;
    padding-bottom: 80px;
  }
}

/* =============================================
   MOBILE POLISH v2 — Addresses feedback docx:
   - photo too small / boxes too big
   - everything huge on homepage
   - menu opens messy
   - product cards thin & long
   - footer tilted left
   ============================================= */

/* --- Mobile nav drawer: cleaner dropdown styling --- */
@media (max-width: 900px) {
  /* Drawer now scrollable and padding-friendly */
  .nav-links.open {
    padding: 90px 20px 40px;
    gap: 2px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.open .nav-link {
    width: 100%;
    border-radius: 10px;
    justify-content: flex-start;
  }

  /* Parent dropdown label cleaner */
  .nav-links.open .nav-dropdown > .nav-link {
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(46,204,113,0.06);
    border: 1px solid rgba(46,204,113,0.14);
    margin-top: 8px;
  }

  /* Submenu items: indented with accent line, compact */
  .nav-links.open .nav-dropdown-menu {
    padding: 6px 0 6px 14px;
    margin: 4px 0 10px 14px;
    border-left: 2px solid rgba(46,204,113,0.35);
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .nav-links.open .nav-dropdown-item {
    padding: 10px 14px;
    font-size: 13.5px;
    border-radius: 8px;
    transition: background 0.15s ease;
  }

  .nav-links.open .nav-dropdown-item:hover,
  .nav-links.open .nav-dropdown-item:active {
    background: rgba(46,204,113,0.10);
    padding-left: 18px;
  }

  .nav-links.open .nav-dropdown-item small {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.4;
  }

  /* CTA "Teklif Al" stands out */
  .nav-links.open .nav-cta {
    margin-top: 18px;
    background: var(--grad-green);
    color: #0a1a10;
    font-weight: 700;
  }
}

/* --- Product cards: force 1 column on small phones --- */
@media (max-width: 600px) {
  .products-detailed-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Product card image not too tall */
  .product-detailed-img {
    aspect-ratio: 16 / 9 !important;
  }

  .product-detailed-body {
    padding: 20px 18px 18px !important;
  }

  .product-detailed-name {
    font-size: 16px !important;
  }

  .product-detailed-desc {
    font-size: 13px !important;
    line-height: 1.6;
  }

  /* Secondary/small product grids inside industries, printing */
  .printing-materials,
  .sectors-grid,
  .services-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --- Products page: hero & category header on mobile --- */
@media (max-width: 600px) {
  .products-hero {
    padding: 100px 0 40px !important;
  }

  .products-hero h1 {
    font-size: clamp(30px, 9vw, 42px) !important;
    letter-spacing: -1.5px !important;
    line-height: 1.05 !important;
    margin-bottom: 18px !important;
  }

  .products-hero .lead,
  .products-hero p {
    font-size: 13.5px !important;
    line-height: 1.6 !important;
  }

  .products-hero-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-top: 28px !important;
  }

  .products-hero-stat {
    padding: 16px 14px !important;
  }

  .products-hero-stat-value {
    font-size: 22px !important;
  }

  .products-hero-stat-label {
    font-size: 10.5px !important;
    line-height: 1.4;
  }

  .category-header {
    gap: 16px !important;
    margin-bottom: 32px !important;
  }

  .category-icon-wrap {
    width: 52px !important;
    height: 52px !important;
  }

  .category-icon-wrap svg {
    width: 28px !important;
    height: 28px !important;
  }

  .category-header h2 {
    font-size: clamp(22px, 7vw, 30px) !important;
    line-height: 1.15 !important;
    margin-bottom: 10px !important;
  }

  .category-header p {
    font-size: 13.5px !important;
    line-height: 1.65 !important;
  }

  /* Sticky category tab strip: compact */
  .category-tab {
    font-size: 11px !important;
    padding: 8px 12px !important;
  }
}

/* --- Technology page: hero tighter on mobile --- */
@media (max-width: 600px) {
  .tech-hero {
    padding: 100px 0 50px !important;
  }

  .tech-hero h1 {
    font-size: clamp(30px, 9vw, 44px) !important;
    line-height: 1.05 !important;
    letter-spacing: -1.5px !important;
    margin-bottom: 18px !important;
  }

  .tech-hero-lead {
    font-size: 13.5px !important;
    line-height: 1.65 !important;
    margin-bottom: 24px !important;
  }

  .tech-facts {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .tech-fact {
    padding: 16px 14px !important;
  }

  .tech-hero-visual {
    max-width: 100% !important;
    margin-top: 20px;
  }
}

/* --- Homepage hero & sections: more compact on mobile --- */
@media (max-width: 600px) {
  .hero {
    padding-top: 110px !important;
  }

  .hero h1 {
    font-size: clamp(30px, 9vw, 44px) !important;
    letter-spacing: -1.5px !important;
    line-height: 1.05 !important;
  }

  .hero .lead,
  .hero-sub,
  .hero-desc {
    font-size: 13.5px !important;
    line-height: 1.65 !important;
  }

  .hero-stats {
    gap: 10px !important;
  }

  .stat-box {
    padding: 14px 16px !important;
  }

  .stat-num {
    font-size: 22px !important;
  }

  .stat-label {
    font-size: 10.5px !important;
  }

  /* Section titles */
  .section h2 {
    font-size: clamp(24px, 7.5vw, 34px) !important;
    line-height: 1.15 !important;
  }

  .section .section-desc,
  .section-desc {
    font-size: 13.5px !important;
    line-height: 1.65 !important;
  }

  /* Service cards / glass cards: compact */
  .service-card,
  .glass-card {
    padding: 20px 18px !important;
  }

  /* Printing section stack */
  .printing-intro,
  .printing-hero {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .printing-visual img {
    border-radius: 12px;
  }
}

/* --- Footer: center brand on mobile, align everything --- */
@media (max-width: 600px) {
  .footer {
    padding: 50px 20px 24px !important;
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-brand img {
    max-width: 220px;
    height: auto;
  }

  .footer-brand p {
    margin: 14px auto 0 !important;
    max-width: 320px;
    font-size: 13px;
    line-height: 1.65;
  }

  .footer-brand .distributor-badge {
    margin: 14px auto 0 !important;
    display: inline-flex;
    justify-content: center;
  }

  .footer-links {
    align-items: center;
  }

  .footer-title {
    text-align: center;
    margin-bottom: 14px !important;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
    margin-top: 36px !important;
  }

  .footer-socials {
    justify-content: center;
  }
}

/* --- Industries / sector cards: 1 col on small phones --- */
@media (max-width: 600px) {
  .industries-grid,
  .sector-highlights {
    grid-template-columns: 1fr !important;
  }
}

/* --- Blog cards on mobile: full-width single column --- */
@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* --- About hero: photo does not dominate on mobile --- */
@media (max-width: 600px) {
  .about-hero {
    padding: 100px 0 60px !important;
  }

  .about-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }

  .about-hero-content h1 {
    font-size: clamp(30px, 9.5vw, 46px) !important;
    letter-spacing: -1.5px !important;
    line-height: 1.02 !important;
  }

  .about-hero-content .lead {
    font-size: 13.5px !important;
    line-height: 1.65 !important;
  }

  .hero-stat-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  .hero-stat-row .stat-box {
    padding: 12px 10px !important;
  }

  .hero-stat-row .stat-num {
    font-size: 20px !important;
  }

  .hero-stat-row .stat-cap {
    font-size: 10px !important;
  }
}

/* --- Safety: prevent oversized buttons on mobile --- */
@media (max-width: 600px) {
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    font-size: 13px !important;
    padding: 13px 22px !important;
  }

  .hero-cta-group,
  .lft-cta-buttons,
  .tech-cta-actions {
    flex-direction: column !important;
    width: 100%;
    gap: 10px !important;
  }
}

/* --- Fix: image placeholder (loading/broken) doesn't show as giant icon --- */
@media (max-width: 900px) {
  img {
    color: transparent;
  }
  img[alt]::before {
    content: "";
    display: none;
  }
}
