/* ==========================================================================
   GENERILIFE - 100% RESPONSIVE MOBILE-FIRST ADAPTIVE STYLESHEET
   Supports all screen widths: 320px to 4K Ultra-Wide
   ========================================================================== */

/* Global Fluid Resets */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

img, svg, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Base Container */
.container {
  width: 100%;
  padding-right: 1.5rem;
  padding-left: 1.5rem;
  margin-right: auto;
  margin-left: auto;
}

/* Tablet & Mobile Navigation Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: min(320px, 85vw);
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
  box-shadow: -6px 0 30px rgba(0, 0, 0, 0.2);
  z-index: 2147483645;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer.active,
.mobile-drawer.open {
  right: 0 !important;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.drawer-close-btn {
  background: var(--bg-alt);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.drawer-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.drawer-nav {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}

.drawer-link {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.03);
  text-decoration: none;
  transition: all 0.2s ease;
}

.drawer-link:hover, .drawer-link.active {
  background: #f0f9ff;
  color: var(--primary);
  padding-left: 1.75rem;
}

.drawer-dropdown-list {
  background: #f8fafc;
  display: none;
  padding: 0.5rem 0;
  border-left: 3px solid var(--primary);
}

.drawer-dropdown-list.show {
  display: block;
}

.drawer-sublink {
  padding: 0.65rem 2rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  display: block;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.drawer-sublink:hover, .drawer-sublink.active {
  color: var(--primary);
  padding-left: 2.25rem;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2147483640;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.active,
.drawer-backdrop.open {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ==========================================================================
   Breakpoints: Large Screens & Laptops (max-width: 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  .hero-title {
    font-size: 2.75rem;
  }
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .about-team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* ==========================================================================
   Breakpoints: Tablets & Small Laptops (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .container {
    max-width: 960px;
  }
  .nav-menu,
  .navbar-actions .btn {
    display: none;
  }
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .top-contact-info li:nth-child(1) {
    display: none; /* Clean up top bar on tablet */
  }
  
  /* Hero Section Stacking */
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-content .hero-badge,
  .hero-btn-group,
  .hero-highlights {
    justify-content: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
    max-width: 650px;
  }
  .hero-image-wrapper {
    max-width: 600px;
    margin: 0 auto;
  }
  .floating-badge-1 {
    left: 10px;
  }
  .floating-badge-2 {
    right: 10px;
  }
  
  /* Feature Ribbon */
  .quick-info-ribbon {
    margin-top: 2rem;
  }
  .quick-info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Grids & Cards */
  .about-grid,
  .specialist-grid,
  .map-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem;
  }
  
  .specialist-image-card,
  .video-container-card {
    width: 100% !important;
    max-width: 640px;
    margin: 0 auto;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .support-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .support-card.card-span-full {
    grid-column: 1 / -1;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* ==========================================================================
   Breakpoints: Medium Tablets (max-width: 992px)
   ========================================================================== */
@media (max-width: 992px) {
  .container {
    max-width: 720px;
  }
  
  .product-layout-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .distributor-grid-layout {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }

  .mvf-card {
    grid-template-columns: 1fr !important;
  }

  .about-welcome-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .about-mission-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .about-team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }

  .franchise-faq-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .contact-main-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .video-feature-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

/* ==========================================================================
   Breakpoints: Mobile Landscape & Small Tablets (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .container {
    max-width: 540px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .top-bar {
    display: none; /* Keep mobile header clean & uncluttered */
  }
  
  .section-padding {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 1.85rem;
  }

  .section-desc {
    font-size: 0.95rem;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-highlights {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  
  .hero-floating-badge {
    position: static;
    margin-top: 0.75rem;
    animation: none;
    justify-content: center;
    width: 100%;
  }

  .page-banner {
    padding: 3.5rem 1rem !important;
  }

  .page-banner h1,
  .page-banner .page-banner-title {
    font-size: 2rem !important;
  }
  
  .services-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .support-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonial-card {
    flex: 0 0 100%;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .cta-banner {
    padding: 2.5rem 1.5rem;
  }
  .cta-banner h2 {
    font-size: 1.75rem;
  }

  .about-cta-bar {
    flex-direction: column !important;
    text-align: center !important;
    justify-content: center !important;
    gap: 1.25rem !important;
  }
  .about-cta-bar h2 {
    font-size: 1.35rem !important;
  }
  .about-cta-bar .btn {
    width: 100%;
  }
  
  .about-feature-list {
    grid-template-columns: 1fr;
  }
  
  .about-exp-badge {
    position: static;
    margin-top: 1.25rem;
  }

  .about-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .about-team-grid {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
  }

  .distributor-grid-layout {
    grid-template-columns: 1fr !important;
  }

  .franchise-step-card {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .gallery-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 1.25rem !important;
  }

  .media-photo-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

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

/* ==========================================================================
   Breakpoints: Standard Mobile Phones (max-width: 576px)
   ========================================================================== */
@media (max-width: 576px) {
  .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-btn-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-btn-group .btn {
    width: 100%;
    text-align: center;
  }

  .page-banner {
    padding: 2.75rem 0.75rem !important;
  }

  .page-banner h1,
  .page-banner .page-banner-title {
    font-size: 1.75rem !important;
  }

  .gallery-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem !important;
  }

  .gallery-tab-btn {
    padding: 0.45rem 1rem !important;
    font-size: 0.8rem !important;
  }

  .gallery-photo-grid {
    grid-template-columns: 1fr !important;
  }

  .about-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .form-card {
    padding: 1.5rem 1.15rem !important;
  }

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

  .floating-actions {
    bottom: 85px !important;
    right: 18px !important;
  }

  .site-logo img {
    max-height: 40px;
    max-width: 170px;
  }
}

/* ==========================================================================
   Breakpoints: Small & Compact Mobile Phones (max-width: 380px)
   ========================================================================== */
@media (max-width: 380px) {
  html {
    font-size: 14px;
  }

  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.55rem;
  }

  .page-banner h1,
  .page-banner .page-banner-title {
    font-size: 1.5rem !important;
  }

  .about-stats-grid {
    grid-template-columns: 1fr !important;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .site-logo img {
    max-height: 34px;
    max-width: 140px;
  }

  .floating-actions {
    bottom: 80px !important;
    right: 14px !important;
  }

  .btn-floating {
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   Responsive Modals & Lightbox
   ========================================================================== */
.modal {
  padding: 1rem;
}

#galleryLightbox > div {
  max-width: 95vw !important;
  width: 100% !important;
}

#galleryLightbox img {
  max-height: 70vh !important;
  width: auto !important;
  max-width: 100% !important;
}

@media (max-width: 480px) {
  #closeLightbox {
    top: -38px !important;
    right: 4px !important;
    font-size: 1.75rem !important;
  }
}

/* ==========================================================================
   Image & Card Responsive Polish
   ========================================================================== */
.hero-image-card img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.about-main-img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
}

.specialist-image-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.about-director-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-director-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14) !important;
}

.about-director-card img {
  transition: transform 0.4s ease;
}

.about-director-card:hover img {
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .hero-image-card img {
    max-height: 320px;
  }
  .about-main-img {
    max-height: 320px;
  }
  .specialist-image-card img {
    height: 340px;
  }
}
