/* ============================================
   RESPONSIVE STYLES - เจาะเกราะร้อย
   จัดเรียงตาม Breakpoint จากใหญ่ไปเล็ก
   ============================================ */

/* ====== LARGE SCREENS (max-width: 1200px) ====== */
@media (max-width: 1200px) {
  .hero-title { font-size: 3.5rem; }
  .hero-team-img { height: 480px; }
}

/* ====== TABLET (max-width: 992px) ====== */
@media (max-width: 992px) {
  /* --- Logo --- */
  .main-logo { height: 100px; transform: scale(1); margin-left: 0; }

  /* --- Navigation --- */
  .hamburger { display: block; }
  .nav-menu { 
    display: none; 
    position: absolute; top: 100%; left: 0; right: 0; 
    background: var(--color-dark); 
    flex-direction: column; padding: 20px; gap: 5px; 
    border-radius: 0 0 var(--radius-main) var(--radius-main); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.3); 
  }
  .nav-menu.mobile-open { display: flex; }
  .nav-menu li a { padding: 14px 20px; border-radius: var(--radius-main); font-size: 16px; }
  .nav-menu li a:hover { background: rgba(255,165,44,0.1); }
  .nav-container { position: relative; }

  /* --- Hero Section --- */
  .hero-section { padding-top: 140px; padding-bottom: 60px; min-height: auto; overflow: hidden; }
  .hero-container { flex-direction: column; text-align: center; gap: 15px; }
  .hero-left { padding-right: 0; display: flex; flex-direction: column; align-items: center; }
  .hero-subtitle { justify-content: center; }
  .hero-subtitle::before { display: none; }
  .hero-tagline { margin: 0 auto; text-align: center; max-width: 90%; }
  .hero-tagline::before { left: 50%; transform: translateX(-50%); }

  .hero-right { 
    height: auto; width: 100%; 
    display: flex; justify-content: center; 
    margin-top: 0; margin-left: 0;
  }
  .presenter-image { 
    position: relative; right: auto; bottom: 0; 
    transform: none; display: flex; justify-content: center; 
    width: 100%; height: auto; z-index: 10;
  }
  .hero-team-img { 
    height: auto; width: 90%; max-width: 600px; max-height: 60vh;
    object-fit: contain; object-position: bottom center; margin-bottom: 0; 
  }

  /* --- Atmosphere Slider --- */
  .atmosphere-slider-section { margin-top: 20px; padding-bottom: 30px; }
  .atmosphere-slide { height: 280px; }

  /* --- Grid Layouts --- */
  .about-container { flex-direction: column; }
  .product-grid, .portfolio-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-logos-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  /* --- Sub Pages --- */
  .contact-grid { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 2rem; }
  .page-header::before { 
    background-size: cover !important; 
    background-position: 35% center !important; 
  }
  .province-grid { grid-template-columns: repeat(2, 1fr); }
  .team-trust-grid { grid-template-columns: 1fr !important; }
}

/* ====== MOBILE (max-width: 768px) ====== */
@media (max-width: 768px) {
  /* --- Logo --- */
  .main-logo { height: 110px; transform: scale(1.45); transform-origin: left center; margin-left: -15px; }
  .logo { position: relative; padding-bottom: 0; }
  
  /* --- Mobile Phone Button --- */
  .desktop-nav-phone { display: none !important; }
  .mobile-nav-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--color-primary), #d48a20);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 30px;
    text-decoration: none;
    margin-left: 45px;
    box-shadow: 0 4px 10px rgba(255, 165, 44, 0.3);
    white-space: nowrap;
  }
  .mobile-nav-phone i {
    font-size: 0.9rem;
  }

  /* --- Hero Section --- */
  .hero-section { padding-top: 100px; padding-bottom: 0; min-height: auto; display: flex; flex-direction: column; overflow: hidden; }
  .hero-container { flex-grow: 1; display: flex; flex-direction: column; justify-content: flex-start; position: relative; width: 100%; }
  .hero-left { margin-top: 12vh; padding-bottom: 0; /* ขยับข้อความขึ้นไปนิดนึง */ }
  .hero-title { font-size: 4.8rem; line-height: 1.1; margin-top: 15px; margin-bottom: 25px; letter-spacing: 3px; text-align: center; }
  .hero-subtitle { font-size: 1.4rem; letter-spacing: 1px; margin-bottom: 10px; max-width: 320px; margin-left: auto; margin-right: auto; line-height: 1.4; text-align: center; }
  .hero-tagline { font-size: 1.6rem; padding-top: 25px; max-width: 95%; margin: 0 auto; line-height: 1.6; text-align: center; position: relative; }
  .hero-tagline::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 280px; max-width: 80vw; height: 2px; background: linear-gradient(to right, transparent 0%, #FAD961 20%, var(--color-primary) 50%, #FAD961 80%, transparent 100%); border-radius: 2px; display: block; box-shadow: 0 1px 8px rgba(255,165,44,0.6); }

  /* --- Presenter Image --- */
  .hero-right { width: 100%; margin-top: 30px; display: flex; justify-content: center; align-items: flex-end; position: relative !important; z-index: 10; }
  .presenter-image { width: 100%; display: flex; justify-content: center; align-items: flex-end; position: relative !important; bottom: -10px !important; right: auto !important; height: auto !important; margin-bottom: -10px; }
  .presenter-image img { height: auto !important; max-height: 60vh; width: 155%; max-width: 155%; margin-left: 5%; margin-bottom: 0; object-fit: contain; object-position: bottom center; display: block; }
  .hero-team-img { 
    height: auto; max-height: 75vh; width: 125%; max-width: 125%;
    margin-left: 5%; margin-bottom: -20px; 
    object-fit: contain; object-position: bottom center;
  }

  /* --- Warning Tab --- */
  .hero-warning-tab { max-width: 100%; width: 100%; padding: 8px 12px; border-radius: 8px 8px 0 0; }
  .hero-warning-tab .warning-text { 
    white-space: normal; 
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; 
    line-height: 1.4; font-size: 0.7rem; 
  }

  /* --- Atmosphere Slider --- */
  .atmosphere-slider-section { margin-top: 40px; padding-bottom: 20px; }
  .atmosphere-slide { height: 200px; }
  .atmosphere-slider-inner .swiper-button-next,
  .atmosphere-slider-inner .swiper-button-prev { width: 30px; height: 30px; }
  .atmosphere-slider-inner .swiper-button-next::after,
  .atmosphere-slider-inner .swiper-button-prev::after { font-size: 12px; }

  /* --- Grid Layouts --- */
  .product-grid, .why-grid, 
  .trust-logos-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 15px; }
  .f-brand-col, .f-col:last-child { grid-column: 1 / -1; padding-right: 0; }
  .f-menu a { font-size: 0.85rem; }
  .f-heading { font-size: 1.1rem; }
  
  .trust-badges-container {
      flex-direction: column;
      align-items: flex-start;
      gap: 18px;
  }
  .footer-bottom {
      padding-bottom: 25px;
  }
  .footer-bottom-container {
      align-items: flex-start;
      text-align: left;
  }

  .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }

  /* --- Sections --- */
  .section-heading h2 { font-size: 1.6rem; }
  .about-aesthetic-img { height: 300px; }

  /* --- Floating CTA --- */
  .floating-cta { bottom: 15px; right: 15px; }
  .float-btn { width: 40px; height: 40px; font-size: 18px; }
  .float-btn.top-float { width: 32px; height: 32px; font-size: 14px; }
  .float-btn::before { display: none; }
}

/* ====== SMALL MOBILE (max-width: 480px) ====== */
@media (max-width: 480px) {
  /* ปรับขนาดให้พอดี ไม่เล็กเกินและไม่ล้นจอ */
  .hero-title { font-size: 3.1rem; letter-spacing: 1px; margin-top: 15px; margin-bottom: 20px; }
  .hero-subtitle { font-size: 1.3rem; max-width: 330px; margin-left: auto; margin-right: auto; line-height: 1.4; }
  .hero-tagline { font-size: 1.15rem; line-height: 1.5; padding-top: 10px; }

  .atmosphere-slide { height: 170px; }
  .atmosphere-slider-inner { padding: 12px; }

  .section-heading h2 { font-size: 1.4rem; }
  .province-grid { grid-template-columns: 1fr; }
}