/* ============================================
   LIFTSTRONG GYM - RESPONSIVE STYLES
   Mobile-First Responsive Design System
   Version: 3.0.0 | Optimized for All Devices
   ============================================ */

/* ===== CSS VARIABLES FOR RESPONSIVE DESIGN ===== */
:root {
  /* Fluid Typography Scale */
  --fs-h1: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  --fs-h2: clamp(2rem, 4vw + 1rem, 3.5rem);
  --fs-h3: clamp(1.5rem, 3vw + 0.5rem, 2.5rem);
  --fs-h4: clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
  --fs-h5: clamp(1.125rem, 1.5vw + 0.5rem, 1.5rem);
  --fs-h6: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  --fs-body: clamp(0.875rem, 2vw, 1.125rem);
  --fs-small: clamp(0.75rem, 1.5vw, 0.875rem);
  
  /* Fluid Spacing */
  --space-unit: 0.25rem;
  --space-xs: calc(var(--space-unit) * 1);
  --space-sm: calc(var(--space-unit) * 2);
  --space-md: calc(var(--space-unit) * 4);
  --space-lg: calc(var(--space-unit) * 6);
  --space-xl: calc(var(--space-unit) * 8);
  --space-2xl: calc(var(--space-unit) * 12);
  
  /* Container Widths */
  --container-xs: 100%;
  --container-sm: 540px;
  --container-md: 720px;
  --container-lg: 960px;
  --container-xl: 1140px;
  --container-xxl: 1320px;
  
  /* Touch-Friendly Sizes */
  --touch-min: 44px;
  --touch-md: 48px;
  --touch-lg: 56px;
}

/* ===== MOBILE-FIRST BASE STYLES ===== */
html {
  font-size: 14px;
}

body {
  font-size: var(--fs-body);
  line-height: 1.6;
}

.container {
  padding-right: 1rem;
  padding-left: 1rem;
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
h1, .hero-title {
  font-size: var(--fs-h1);
}

h2, .section-title {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

h4 {
  font-size: var(--fs-h4);
}

p, .hero-subtitle, .section-subtitle {
  font-size: var(--fs-body);
}

/* ===== RESPONSIVE NAVIGATION ===== */
@media (max-width: 1024px) {
  #main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    padding: 6rem 2rem 2rem;
    transition: var(--transition-medium);
    z-index: var(--z-modal);
    border-left: 1px solid var(--glass-border);
  }
  
  #main-nav.active {
    right: 0;
  }
  
  #main-nav ul {
    flex-direction: column;
    gap: 0;
  }
  
  .nav-link {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    justify-content: flex-start;
  }
  
  .header-actions {
    display: none;
  }
  
  #mobile-menu-toggle {
    display: block;
  }
  
  .logo-text {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  #site-header .container {
    padding: 1rem;
  }
  
  .logo-icon {
    width: 35px;
    height: 35px;
  }
}

/* ===== RESPONSIVE HERO SECTION ===== */
@media (max-width: 1024px) {
  .hero-slider {
    min-height: 700px;
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    text-align: center; 
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    text-align: center;  
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;  
    gap: 10px;            
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .hero-slider {
    min-height: 600px;
    margin-top: 70px;
    padding: 2rem 0;  
  }
    
  }
  .slide-content {
    padding: 0 1.5rem;
  }
  
   .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;  
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;  
  }
  
  .slider-controls {
    bottom: 2rem;
    gap: 1rem;
  }
  
  .slider-arrow {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

    .hero-actions {
    flex-direction: column;     
    align-items: center;
    gap: 10px;
  }
  
  .scroll-indicator {
    display: none;
}

@media (max-width: 480px) {
  .hero-slider {
    min-height: 500px;
    padding: 2rem 0;  
  }
  
  .hero-title {
    font-size: 2rem;
    text-align: center;  
  }
  
  .hero-subtitle {
    font-size: 1rem;
    text-align: center;  
  }
  
  .hero-actions .btn {
    padding: 12px 25px;  
    font-size: 0.9rem;
  }
}

/* ===== RESPONSIVE GRID SYSTEMS ===== */
@media (max-width: 1024px) {
  .stats-grid,
  .about-grid,
  .services-grid,
  .plans-grid,
  .trainers-grid,
  .gallery-grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .stats-grid,
  .about-grid,
  .services-grid,
  .plans-grid,
  .trainers-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .plan-card.featured {
    transform: none;
  }
  
  .plan-card.featured:hover {
    transform: translateY(-10px);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .footer-links li a {
    justify-content: center;
  }
}

/* ===== RESPONSIVE CARDS ===== */
@media (max-width: 768px) {
  .stat-card,
  .about-card,
  .service-card,
  .plan-card,
  .trainer-card,
  .contact-card {
    padding: 1.5rem;
  }
  
  .service-icon,
  .about-icon,
  .stat-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .plan-price {
    font-size: 3rem;
  }
}

/* ===== RESPONSIVE TIMETABLE ===== */
@media (max-width: 1024px) {
  .timetable-class {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    text-align: center;
  }
  
  .timetable-tabs {
    flex-wrap: wrap;
  }
  
  .timetable-tab {
    min-width: 80px;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .timetable-wrapper {
    margin: 1rem 0;
  }
  
  .timetable-content {
    padding: 1rem;
  }
  
  .class-book {
    width: 100%;
  }
}

/* ===== RESPONSIVE TESTIMONIALS ===== */
@media (max-width: 768px) {
  .testimonials-slider {
    padding: 1.5rem;
    margin-top: 1rem;
  }
  
  .testimonial-text {
    font-size: 1.1rem;
  }
  
  .testimonial-author {
    flex-direction: column;
    text-align: center;
  }
  
  .author-info h4,
  .author-info p {
    text-align: center;
  }
}

/* ===== RESPONSIVE FORMS ===== */
@media (max-width: 768px) {
  .contact-form {
    padding: 1.5rem;
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    padding: 1rem;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-form button {
    width: 100%;
  }
}

/* ===== RESPONSIVE BUTTONS ===== */
@media (max-width: 768px) {
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  .btn-3d:hover {
    transform: translateY(-3px);
  }
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }
  
  .section-header {
    margin-bottom: 3rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .section-subtitle {
    font-size: 1.1rem;
  }
  
  .d-none-mobile {
    display: none !important;
  }
  
  .d-block-mobile {
    display: block !important;
  }
  
  .text-center-mobile {
    text-align: center !important;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .container {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover effects on touch devices */
  .btn:hover,
  .card:hover,
  .nav-link:hover,
  .service-card:hover,
  .trainer-card:hover,
  .plan-card:hover,
  .contact-card:hover {
    transform: none !important;
  }
  
  /* Increase tap targets */
  a,
  button,
  .btn,
  .nav-link,
  .slider-dot,
  .timetable-tab,
  .class-book {
    min-height: var(--touch-min);
    min-width: var(--touch-min);
  }
  
  /* Prevent sticky hover on mobile */
  *:hover {
    transform: none !important;
  }
}

/* ===== REDUCED MOTION PREFERENCES ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .slide {
    transition: none;
  }
  
  .btn::before,
  .stat-card::before {
    display: none;
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  /* Already dark theme, so minimal changes needed */
  :root {
    --color-primary: #0a0a0a;
    --color-secondary: #121212;
    --color-tertiary: #1a1a1a;
  }
}

/* ===== LANDSCAPE MODE OPTIMIZATIONS ===== */
@media (max-height: 600px) and (orientation: landscape) {
  .hero-slider {
    min-height: 500px;
    height: 100vh;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .hero-actions {
    margin-top: 1rem;
  }
  
  .hero-actions .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* ===== HIGH-DPI SCREENS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ===== VERY LARGE SCREENS ===== */
@media (min-width: 1600px) {
  .container {
    max-width: 1500px;
  }
  
  .hero-slider {
    min-height: 900px;
  }
  
  .hero-title {
    font-size: 5.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

/* ===== FIX FOR IOS SAFARI ===== */
@supports (-webkit-touch-callout: none) {
  .hero-slider {
    height: -webkit-fill-available;
  }
  
  input,
  select,
  textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
}

/* ===== FIX FOR ANDROID CHROME ===== */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select,
  textarea,
  input {
    font-size: 16px;
  }
}

/* ===== PRINT STYLES ENHANCEMENT ===== */
@media print {
  .whatsapp-float,
  #back-to-top,
  .slider-controls,
  .hero-actions,
  .testimonial-controls,
  .btn,
  .footer-social,
  .newsletter-form,
  .map-placeholder,
  .timetable-tabs,
  .class-book,
  .trainer-social,
  .gallery-overlay,
  .service-link,
  .plan-badge {
    display: none !important;
  }
  
  body {
    color: #000 !important;
    background: #fff !important;
    font-size: 12pt !important;
    line-height: 1.4 !important;
  }
  
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  .section {
    padding: 1cm 0 !important;
    page-break-inside: avoid;
  }
  
  .hero-slider {
    height: auto !important;
    min-height: auto !important;
  }
  
  .slide {
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    background: none !important;
    page-break-after: always;
  }
  
  .slide-content {
    position: static !important;
    color: #000 !important;
  }
  
  .hero-title {
    color: #000 !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
  }
  
  .stats-grid,
  .about-grid,
  .services-grid,
  .plans-grid,
  .trainers-grid,
  .gallery-grid {
    display: block !important;
  }
  
  .stat-card,
  .about-card,
  .service-card,
  .plan-card,
  .trainer-card,
  .gallery-item {
    break-inside: avoid;
    margin-bottom: 1cm;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
    color: #666;
  }
  
  #site-header,
  footer {
    position: static !important;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
}