/* ==========================================
   STUDIO VITALITE - RESPONSIVE DESIGN
   Mobile-First Responsive Layout System
   ========================================== */

/* ==========================================
   BREAKPOINTS SYSTEM
   ========================================== */
/* Mobile First Approach:
   xs: 0-575px     (Mobile)
   sm: 576-767px   (Mobile Large)
   md: 768-991px   (Tablet)
   lg: 992-1199px  (Desktop)
   xl: 1200px+     (Large Desktop)
*/

/* ==========================================
   MOBILE STYLES (Default - Mobile First)
   ========================================== */

/* Navigation Mobile */
@media (max-width: 991px) {
  .nav-container {
    padding: 0 20px;
    height: 90px;
  }
  
  .nav-menu {
    position: fixed;
    top: 90px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 90px);
    background: linear-gradient(135deg, rgba(47, 51, 62, 0.98) 0%, rgba(45, 74, 123, 0.95) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 2rem 0;
    border-left: 1px solid rgba(205, 155, 96, 0.2);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    z-index: 1002;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    text-align: center;
    padding: 1rem 2rem;
    margin-top: 1rem;
  }
  
  .nav-link {
    font-size: 1.1rem;
    padding: 1.2rem 2rem;
    border-radius: 16px;
    width: 100%;
    display: block;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(205, 155, 96, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    font-weight: 500;
    letter-spacing: 0.5px;
  }
  
  .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(205, 155, 96, 0.2), transparent);
    transition: left 0.5s ease;
  }
  
  .nav-link:hover::before {
    left: 100%;
  }
  
  .nav-link:hover,
  .nav-link.active {
    background: rgba(205, 155, 96, 0.2);
    border-color: rgba(205, 155, 96, 0.4);
    color: var(--accent-gold);
  }
  
  .nav-actions {
    position: absolute;
    bottom: 3rem;
    flex-direction: column;
    gap: 1.5rem;
    width: 80%;
  }
  

  
  .cta-button {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 1rem;
  }
  
  .hamburger {
    display: flex !important;
  }
  
  /* Ensure navbar is always visible on mobile */
  .navbar.navbar-hidden {
    transform: translateY(0) !important;
  }
}

/* Hero Section Mobile */
@media (max-width: 768px) {
  .hero {
    height: 100vh;
    padding: 0 15px;
    padding-top: 90px;
  }
  
  .hero-content {
    max-width: 100%;
    padding: 0 20px;
  }
  
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .cta-primary,
  .cta-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 16px 24px;
    font-size: 0.9rem;
  }

  /* Mobile hero background override */
  .hero-bg::before {
    background-image: url('../assets/images/anasayfam.jpg');
  }
}

/* ==========================================
   SMALL MOBILE (max-width: 575px)
   ========================================== */
@media (max-width: 575px) {
  .container {
    padding: 0 15px;
  }
  
  /* Typography Mobile */
  .section-title {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  .logo-text {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }
  
  /* Hero Mobile */
  .hero-title {
    font-size: 2rem;
    letter-spacing: 1px;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  /* Loading Screen Mobile */
  .loading-content .logo-text {
    font-size: 2rem;
  }
  
  .loading-bar {
    width: 250px;
  }
}

/* ==========================================
   LARGE MOBILE (576px - 767px)
   ========================================== */
@media (min-width: 576px) and (max-width: 767px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
}

/* ==========================================
   TABLET (768px - 991px)
   ========================================== */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-content {
    max-width: 700px;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.15rem;
  }
  
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
  
  .cta-primary,
  .cta-secondary {
    width: auto;
  }
  
  /* Services Grid Tablet */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  /* Navigation Tablet */
  .nav-container {
    padding: 0 30px;
  }
}

/* ==========================================
   DESKTOP (992px - 1199px)
   ========================================== */
@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
  
  .hero-title {
    font-size: 3.8rem;
  }
  
  .nav-links {
    gap: 1.2rem;
  }
  
  .nav-link {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
}

/* ==========================================
   LARGE DESKTOP (1200px+)
   ========================================== */
@media (min-width: 1200px) {
  .container {
    max-width: var(--container-max-width);
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .section-title {
    font-size: 3.2rem;
  }
}

/* ==========================================
   ULTRA WIDE SCREENS (1400px+)
   ========================================== */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .hero-title {
    font-size: 4.5rem;
  }
  
  .hero-content {
    max-width: 900px;
  }
}

/* ==========================================
   SERVICES GRID RESPONSIVE
   ========================================== */
.services-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

/* Mobile - Single Column */
@media (max-width: 767px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
}

/* Tablet - Two Columns */
@media (min-width: 768px) and (max-width: 991px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop - Four Columns */
@media (min-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================
   MODAL RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    padding: 1.5rem;
    margin: 0 10px;
  }
  
  .modal-content h3 {
    font-size: 1.3rem;
  }
  
  .map-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .map-button {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================
   BOOKING FORM RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .booking-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .booking-form-container {
    padding: 2rem 1.5rem;
  }
  
  .booking-form h2 {
    font-size: 1.8rem;
  }
  
  .form-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .booking-form-container {
    padding: 1.5rem 1rem;
    margin: 0 10px;
    border-radius: 15px;
  }
  
  .booking-form h2 {
    font-size: 1.6rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px 16px;
    font-size: 1rem;
  }
  
  .submit-btn {
    padding: 16px 20px;
    font-size: 1rem;
  }
}

/* ==========================================
   FOOTER RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .footer-content {
    text-align: center;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-brand,
  .footer-column {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (min-width: 769px) and (max-width: 991px) {
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 992px) {
  .footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

/* ==========================================
   BUTTON RESPONSIVE
   ========================================== */
@media (max-width: 575px) {
  .cta-button {
    padding: 10px 20px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
  }
  
  .cta-primary {
    padding: 14px 24px;
    font-size: 0.9rem;
  }
  
  .cta-secondary {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}

/* ==========================================
   SCROLL INDICATOR RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .scroll-indicator {
    bottom: 20px;
  }
  
  .scroll-text {
    font-size: 0.8rem;
  }
  
  .scroll-arrow {
    font-size: 1rem;
  }
}

/* ==========================================
   LOADING SCREEN RESPONSIVE
   ========================================== */
@media (max-width: 575px) {
  .loading-content {
    padding: 0 20px;
  }
  
  .loading-bar {
    width: 250px;
  }
  
  .power-text {
    font-size: 1rem;
  }
  
  .power-loading {
    gap: 1rem;
  }

  /* New loader adjustments */
  .loader-brand {
    font-size: 1.6rem;
  }
  .loader-spinner {
    width: 44px;
    height: 44px;
    border-width: 3px;
  }

  /* Energy loader responsive */
  .energy-header .logo-text { font-size: 1.6rem; }
  .energy-caption { font-size: 0.9rem; }
  .energy-bar { height: 12px; }
}

@media (min-width: 576px) and (max-width: 767px) {
  .loader-brand { font-size: 1.8rem; }
  .loader-spinner { width: 52px; height: 52px; }

  /* Energy loader tablet-sm */
  .energy-header .logo-text { font-size: 1.8rem; }
  .energy-bar { height: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .loader-spinner { animation-duration: 2s; }
}

/* ==========================================
   STAIR ANIMATION RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .stair-step[data-step="2"] {
    margin-left: 1rem;
  }
  
  .stair-step[data-step="3"] {
    margin-left: 2rem;
  }
  
  .stair-step[data-step="4"] {
    margin-left: 3rem;
  }
  
  .power-loading {
    gap: 1rem;
  }
  
  .loading-bar {
    width: 300px;
  }
  
  /* Creative Shapes Tablet Adjustments */
  .letter-shape {
    font-size: 0.95em;
  }
  
  .shape-diamond .letter-shape:nth-child(1) { transform: translateY(-15px) translateX(-30px) rotateY(12deg); }
  .shape-diamond .letter-shape:nth-child(2) { transform: translateY(-12px) translateX(-15px) rotateY(9deg); }
  .shape-diamond .letter-shape:nth-child(9) { transform: translateY(-12px) translateX(15px) rotateY(-9deg); }
  .shape-diamond .letter-shape:nth-child(10) { transform: translateY(-15px) translateX(30px) rotateY(-12deg); }
  
  .shape-zigzag .letter-shape:nth-child(odd) {
    transform: translateY(-10px) rotateZ(4deg);
  }
  
  .shape-zigzag .letter-shape:nth-child(even) {
    transform: translateY(10px) rotateZ(-4deg);
  }
}

@media (max-width: 480px) {
  .stair-step[data-step="2"] {
    margin-left: 0.5rem;
  }
  
  .stair-step[data-step="3"] {
    margin-left: 1rem;
  }
  
  .stair-step[data-step="4"] {
    margin-left: 1.5rem;
  }
  
  .loading-bar {
    width: 250px;
  }
  
  .power-text {
    font-size: 0.9rem;
  }
  
  /* Creative Shapes Mobile Adjustments */
  .letter-shape {
    font-size: 0.9em;
    margin: 0 1px;
  }
  
  .shape-arch .letter-shape:nth-child(1),
  .shape-arch .letter-shape:nth-child(10) {
    transform: translateY(10px) scale(0.95);
  }
  
  .shape-arch .letter-shape:nth-child(2),
  .shape-arch .letter-shape:nth-child(9) {
    transform: translateY(5px) scale(0.97);
  }
  
  .shape-diamond .letter-shape:nth-child(1) { transform: translateY(-10px) translateX(-20px) rotateY(10deg); }
  .shape-diamond .letter-shape:nth-child(2) { transform: translateY(-8px) translateX(-10px) rotateY(8deg); }
  .shape-diamond .letter-shape:nth-child(3) { transform: translateY(-5px) translateX(-5px) rotateY(5deg); }
  .shape-diamond .letter-shape:nth-child(8) { transform: translateY(-5px) translateX(5px) rotateY(-5deg); }
  .shape-diamond .letter-shape:nth-child(9) { transform: translateY(-8px) translateX(10px) rotateY(-8deg); }
  .shape-diamond .letter-shape:nth-child(10) { transform: translateY(-10px) translateX(20px) rotateY(-10deg); }
  
  .shape-zigzag .letter-shape:nth-child(odd) {
    transform: translateY(-8px) rotateZ(3deg);
  }
  
  .shape-zigzag .letter-shape:nth-child(even) {
    transform: translateY(8px) rotateZ(-3deg);
  }
}

/* ==========================================
   ANIMATION PERFORMANCE ON MOBILE
   ========================================== */
@media (max-width: 768px) {
  /* Reduce heavy animations on mobile for better performance */
  .floating-element {
    animation-duration: 4s;
  }
  
  .particle {
    display: none; /* Hide particles on mobile */
  }
  
  .energy-waves::before,
  .energy-waves::after {
    display: none; /* Hide energy waves on mobile */
  }
  
  .morphing-shape {
    animation: none; /* Disable morphing on mobile */
  }
}

/* ==========================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================== */
@media (hover: none) and (pointer: coarse) {
  /* Touch device specific styles */
  .hover-lift:hover {
    transform: none;
  }
  
  .hover-scale:hover {
    transform: none;
  }
  
  .hover-rotate:hover {
    transform: none;
  }
  
  /* Increase touch targets */
  .nav-link {
    padding: 1rem;
    min-height: 44px;
  }
  
  .cta-button {
    min-height: 44px;
    padding: 12px 24px;
  }
  
  .social-link {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ==========================================
   HIGH DPI DISPLAYS
   ========================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* High DPI optimizations */
  .logo-text {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  .hero-title {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ==========================================
   LANDSCAPE MOBILE OPTIMIZATIONS
   ========================================== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    height: 100vh;
    min-height: 500px;
  }
  
  .hero-content {
    padding: 1rem 20px;
  }
  
  .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-buttons {
    gap: 1rem;
  }
  
  .nav-menu {
    height: calc(100vh - 90px);
    top: 90px;
  }
  
  .nav-container {
    height: 90px;
  }
}

/* ==========================================
   MOBILE SPECIFIC RESPONSIVE FIXES
   ========================================== */

/* Fix for mobile devices */
@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  /* Better touch targets */
  .nav-link,
  .cta-button,
  .social-link,
  button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Mobile menu improvements */
  .nav-menu.active {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix body scrolling when menu is open */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}

/* Very small screens - improve readability */
@media (max-width: 360px) {
  .container {
    padding: 0 12px;
  }
  
  .nav-container {
    padding: 0 16px;
  }
  
  .nav-logo .logo-text {
    font-size: 1.6rem;
    letter-spacing: 1.5px;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 0.85rem;
  }
  
  .cta-primary,
  .cta-secondary {
    padding: 14px 20px;
    font-size: 0.85rem;
  }
}

/* ==========================================
   ABOUT PAGE RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .about-text .section-title {
    text-align: center;
  }
  
  .about-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .about-features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================
   DETAILED SERVICES RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
    .service-item,
    .service-item.reverse {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .service-item .service-image,
    .service-item.reverse .service-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .service-text .section-title {
        text-align: center;
    }

    .service-text .service-icon {
        margin: 0 auto 1.5rem;
    }

    .service-text ul {
        text-align: left;
    }
}

/* ==========================================
   TRAINERS PAGE RESPONSIVE
   ========================================== */
@media (max-width: 480px) {
    .trainers-grid {
        gap: 1.5rem;
    }

    .trainer-card {
        max-width: 320px;
        margin: 0 auto;
    }
}

/* ==========================================
   GALLERY PAGE RESPONSIVE
   ========================================== */
@media (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-item.wide,
    .gallery-item.tall {
        grid-column: unset;
        grid-row: unset;
    }
}

/* ==========================================
   CONTACT PAGE RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 2rem;
    }

    .contact-form-container .section-title,
    .contact-info-container .section-title,
    .contact-form-container .section-subtitle {
        text-align: center;
    }

    .contact-image-container {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* ==========================================
   FOUNDERS PAGE RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
    .founders-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }

    .founder-card {
        max-width: 500px;
        margin: 0 auto;
        padding: 2rem;
        min-height: 200px; /* Base minimum height */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .founders-grid {
        gap: 1.5rem;
    }

    .founder-card {
        padding: 3.5rem;
        max-width: 320px;
        min-height: 180px; /* Base minimum height for smaller screens */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .founder-info h3 {
        font-size: 1.5rem;
    }

    .founder-title {
        font-size: 1rem;
    }

    .founder-specialty {
        font-size: 0.9rem;
    }
}

/* Mobile-specific fixes per requests */
@media (max-width: 991px) {
  /* 1) Hakkımızda / Kurucular kartlarının aynı yükseklikte olması */
  .founders-grid .founder-card {
    height: 220px; /* Equal fixed height on mobile */
  }

  /* 2) Antrenmanlar / tik işaretlerinin hizalanması */
  .service-text { --label-col-width: 14ch; }

  .service-text ul li {
    display: flex;
    align-items: flex-start; /* ensure the icon aligns to the first line */
    gap: 0.6rem;
  }

  .service-text ul li i {
    margin-top: 0.2rem; /* subtle vertical align tweak */
    width: 1.25rem; /* fixed icon column for alignment */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.25rem;
    line-height: 1;
  }

  /* Fix label column to a consistent width so descriptions align */
  .service-text ul li strong {
    display: inline-block;
    flex: 0 0 var(--label-col-width);
    max-width: var(--label-col-width);
  }
}