/* Digital Fashion Details Page - Mobile Responsive Fixes */
/* Optimized mobile layout for better user experience */

/* Hide mobile menu toggle on desktop */
.mobile-menu-toggle {
  display: none;
}

/* Enhanced Visual Hierarchy Styles */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  margin: 20px 0 40px 0;
}

/* Enhanced Typography Hierarchy */
@media (max-width: 768px) {
  /* Section headers with gradient dividers */
  .section-header h2 {
    position: relative;
    font-size: 1.3rem !important;
    font-weight: 300 !important;
    margin-bottom: 16px !important;
    text-align: center !important;
    letter-spacing: 0.03em !important;
  }

  /* Remove decorative underlines and use gradient dividers */
  .section-header h2::after {
    display: none;
  }

  .section-divider {
    display: none !important;
  }

  /* Service cards enhanced hierarchy */
  .service-card {
    position: relative;
    overflow: hidden;
  }

  .service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .service-card:hover::before {
    opacity: 1;
  }

  /* Enhanced service numbers */
  .service-number {
    position: relative;
    display: inline-block;
  }

  .service-number::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(204, 204, 204, 0.3);
    transform: scaleX(0);
    transition: transform 0.3s ease;
  }

  .service-card:hover .service-number::after {
    transform: scaleX(1);
  }

  /* Contact section enhanced styling */
  .contact-content h2 {
    position: relative;
    text-align: center !important;
  }

  .contact-content h2::before {
    display: none !important;
  }

  /* Enhanced contact items */
  .contact-item {
    position: relative;
    transition: all 0.3s ease;
  }

  .contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
  }

  .contact-item:hover::before {
    opacity: 1;
  }

  .contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  }
}

/* Scroll-based highlighting for bottom navigation */
.bottom-nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px) !important;
}

.bottom-nav-link.active::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

/* Mobile-first approach with progressive enhancement */
@media (max-width: 768px) {
  /* Global mobile optimizations */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Enhanced Navigation for Digital Fashion Page */
  nav {
    padding: 12px 20px !important;
    height: 60px !important;
    backdrop-filter: blur(20px) !important;
    position: fixed !important;
    top: 0 !important;
    z-index: 1000 !important;
  }

  .logo img {
    height: 24px !important;
  }

  .nav-links {
    display: none !important;
  }

  /* Add mobile menu toggle button */
  .mobile-menu-toggle {
    display: flex !important;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
  }

  .mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  /* Hero Section Mobile Optimization */
  .hero {
    height: 100vh !important;
    min-height: 600px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 60px !important; /* Account for fixed nav */
  }

  /* Fix hero video for mobile - remove problematic rotation */
  .hero-video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 1 !important;
    /* Remove rotation transform that was causing issues */
    transform: none !important;
  }

  /* Hero content positioning - hide text on mobile */
  .hero-content {
    display: none !important;
  }

  /* Scroll indicator mobile optimization */
  .scroll-indicator {
    position: absolute !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 16px !important;
    z-index: 2 !important;
    padding: 10px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Portfolio Showcase Mobile Grid */
  .showcase-section {
    padding: 40px 0 0 0 !important;
  }

  .showcase-section .section-header {
    padding: 0 20px !important;
    margin-bottom: 30px !important;
  }

  .showcase-section h2 {
    font-size: 1.3rem !important;
    font-weight: 300 !important;
    line-height: 1.25 !important;
    letter-spacing: 0.03em !important;
    margin-bottom: 16px !important;
  }

  /* Portfolio grid: 4 columns, each showing 6 items vertically */
  .showcase-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(6, 1fr) !important;
    grid-auto-flow: column !important;
    gap: 2px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 4px !important;
    height: auto !important;
  }

  .showcase-item {
    aspect-ratio: 3/4 !important;
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: transform 0.3s ease !important;
    border: 1px solid #222 !important;
    border-radius: 2px !important;
  }

  .showcase-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease-out !important;
  }

  /* Improved overlay for mobile - hidden by default, shown on touch */
  .showcase-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(transparent, rgba(0,0,0,0.9)) !important;
    color: white !important;
    padding: 15px !important;
    opacity: 0 !important; /* Hidden by default on mobile */
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
  }

  /* Show overlay on touch/active state */
  .showcase-item:active .showcase-overlay,
  .showcase-item.touched .showcase-overlay {
    opacity: 1 !important;
  }

  /* Add touch feedback for the item itself */
  .showcase-item:active {
    transform: scale(0.98) !important;
  }

  .showcase-overlay h3 {
    margin: 0 0 2px 0 !important;
    font-size: 0.55rem !important;
    font-weight: 600 !important;
  }

  .showcase-overlay p {
    margin: 0 !important;
    font-size: 0.45rem !important;
    opacity: 0.9 !important;
    line-height: 1.1 !important;
  }

  /* Services Grid Mobile Layout - Dropdown Style */
  .services-overview, #packages {
    padding: 30px 0 0 0 !important;
  }

  .services-overview .section-header {
    padding: 0 20px !important;
    margin-bottom: 30px !important;
  }

  .services-overview h2 {
    font-size: 1.3rem !important;
    font-weight: 300 !important;
    line-height: 1.25 !important;
    letter-spacing: 0.03em !important;
    margin-bottom: 16px !important;
  }

  .services-overview .section-header p {
    font-size: 0.75rem !important;
    font-weight: 300 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 12px !important;
    max-width: 100% !important;
  }

  .services-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Mobile Dropdown Service Cards */
  .service-card {
    border-left: 1px solid #000000 !important;
    border-right: 1px solid #000000 !important;
    border-top: 1px solid #000000 !important;
    border-bottom: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
  }

  .service-card:last-child {
    border-bottom: 1px solid #000000 !important;
  }

  /* Service Header - Always Visible */
  .service-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 20px 0px 20px !important;
    cursor: pointer !important;
    min-height: 28px !important;
    transition: background-color 0.3s ease !important;
  }

  .service-header:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
  }

  .service-header:active {
    background-color: rgba(0, 0, 0, 0.1) !important;
  }

  /* Service Number and Title Container */
  .service-header .service-number {
    font-size: 1.2rem !important;
    margin-bottom: 0 !important;
    margin-right: 15px !important;
    font-weight: 200 !important;
    color: #666666 !important;
    flex-shrink: 0 !important;
  }

  .service-header h3 {
    font-size: 0.9rem !important;
    font-weight: 300 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 0 !important;
    flex-grow: 1 !important;
    color: #000000 !important;
  }

  /* Dropdown Indicator */
  .dropdown-indicator {
    font-size: 1.5rem !important;
    font-weight: 300 !important;
    color: #666666 !important;
    transition: transform 0.3s ease !important;
    flex-shrink: 0 !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.05) !important;
  }

  .service-card.expanded .dropdown-indicator {
    transform: rotate(45deg) !important;
    background: rgba(0, 0, 0, 0.1) !important;
  }

  /* Service Content - Hidden by Default */
  .service-content {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease, padding 0.4s ease !important;
    padding: 0 20px !important;
  }

  .service-card.expanded .service-content {
    max-height: 200px !important;
    padding: 0 20px 20px 20px !important;
  }

  .service-content p {
    font-size: 0.8rem !important;
    font-weight: 300 !important;
    line-height: 1.5 !important;
    letter-spacing: 0.01em !important;
    margin-bottom: 20px !important;
    color: #666666 !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s !important;
  }

  .service-card.expanded .service-content p {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .service-link {
    font-size: 0.7rem !important;
    font-weight: 300 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.02em !important;
    padding: 12px 0 !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    text-transform: uppercase !important;
    color: #000000 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #cccccc !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s, border-bottom-color 0.3s ease !important;
  }

  .service-card.expanded .service-link {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .service-link:hover {
    border-bottom-color: #000000 !important;
  }

  /* Enhanced Active State */
  .service-card.expanded {
    background: #f8f8f8 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  }

  .service-card.expanded .service-header {
    background-color: transparent !important;
  }

  .service-card.expanded .service-number {
    color: #333333 !important;
  }

  .service-card.expanded h3 {
    color: #000000 !important;
    font-weight: 400 !important;
  }

  /* Video Showcase Mobile Layout */
  .video-showcase-section {
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .video-showcase-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .video-showcase-item {
    aspect-ratio: 4/5 !important;
    background: #111 !important;
    border: 1px solid #222 !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .video-showcase-item video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
  }

  .video-showcase-item:hover video {
    transform: scale(1.02) !important;
  }

  /* Contact Section Mobile */
  .contact-section {
    padding: 80px 20px !important;
  }

  .contact-content h2 {
    font-size: 1.2rem !important;
    font-weight: 300 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 30px !important;
  }

  .contact-info {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    margin-bottom: 40px !important;
  }

  .contact-item {
    text-align: center !important;
    padding: 20px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .contact-item h4 {
    font-size: 0.75rem !important;
    font-weight: 300 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 10px !important;
    color: #999 !important;
  }

  .contact-item p {
    font-size: 0.85rem !important;
    font-weight: 300 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.01em !important;
  }

  .contact-item a {
    min-height: 44px !important;
    min-width: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    transition: background-color 0.3s ease !important;
  }

  .contact-item a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
  }

  /* Footer Mobile */
  footer {
    padding: 30px 20px !important;
    font-size: 0.8rem !important;
    margin-bottom: 100px !important; /* Account for bottom nav */
  }

  /* Enhanced Bottom Navigation */
  .bottom-nav {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    max-width: calc(100% - 40px) !important;
    background: rgba(145, 145, 145, 0.30) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    padding: 8px !important;
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
    z-index: 1000 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 12px !important;
  }

  .bottom-nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    padding: 8px 28px !important;
    margin: 0 4px !important;
    transition: all 0.3s ease !important;
    border-radius: 8px !important;
    min-height: 36px !important;
    min-width: 90px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    flex: 1 !important;
    max-width: 110px !important;
  }

  .bottom-nav-link:hover,
  .bottom-nav-link:active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-1px) !important;
  }

  .bottom-nav-link span {
    display: block !important;
    text-align: center !important;
    line-height: 1.2 !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.3px !important;
    text-transform: uppercase !important;
    margin-top: 2px !important;
  }

  /* Lightbox Modal Mobile Optimization */
  .lightbox-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.95) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2000 !important;
    padding: 20px !important;
  }

  .lightbox-content {
    position: relative !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    text-align: center !important;
  }

  .lightbox-content img {
    max-width: 100% !important;
    max-height: 70vh !important;
    object-fit: contain !important;
    border-radius: 8px !important;
  }

  .lightbox-close {
    position: absolute !important;
    top: -50px !important;
    right: 0 !important;
    color: white !important;
    font-size: 28px !important;
    cursor: pointer !important;
    z-index: 2001 !important;
    padding: 10px !important;
    min-height: 44px !important;
    min-width: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transition: background-color 0.3s ease !important;
  }

  .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
  }

  .lightbox-info {
    color: white !important;
    margin-top: 20px !important;
    padding: 0 10px !important;
  }

  .lightbox-info h3 {
    margin: 0 0 10px 0 !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
  }

  .lightbox-info p {
    margin: 0 0 10px 0 !important;
    opacity: 0.8 !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
  }

  .lightbox-counter {
    font-size: 0.8rem !important;
    opacity: 0.6 !important;
  }
}

/* Small mobile devices (≤480px) */
@media (max-width: 480px) {
  /* Keep 4 columns, 6 rows layout even on small screens */
  .showcase-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(6, 1fr) !important;
    grid-auto-flow: column !important;
    gap: 1px !important;
    padding: 0 2px !important;
  }

  .showcase-item {
    aspect-ratio: 3/4 !important;
  }

  .showcase-overlay {
    padding: 4px !important;
  }

  .showcase-overlay h3 {
    font-size: 0.45rem !important;
  }

  .showcase-overlay p {
    font-size: 0.35rem !important;
  }

  /* Adjust hero content for small screens */
  .hero-content h1 {
    font-size: 2rem !important;
  }

  .hero-content p {
    font-size: 0.9rem !important;
  }

  /* Smaller service cards */
  .service-card {
    padding: 25px 15px !important;
  }

  .service-number {
    font-size: 1.8rem !important;
  }

  /* Compact bottom navigation */
  .bottom-nav-link {
    min-width: 50px !important;
    padding: 8px 4px !important;
  }

  .bottom-nav-link span {
    font-size: 0.6rem !important;
  }

  /* Contact section adjustments */
  .contact-section {
    padding: 60px 15px !important;
  }

  .contact-item {
    padding: 20px 15px !important;
  }

  .contact-item a {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 12px 16px !important;
  }
}

/* Landscape orientation optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    height: 100vh !important;
    min-height: 500px !important;
  }

  .hero-content h1 {
    font-size: 2.2rem !important;
  }

  .hero-content p {
    font-size: 0.95rem !important;
  }
}

/* Performance optimizations */
.showcase-item,
.video-showcase-item,
.service-card,
.bottom-nav-link {
  will-change: transform !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .showcase-item,
  .video-showcase-item,
  .service-card,
  .bottom-nav-link,
  .lightbox-modal {
    transition: none !important;
    animation: none !important;
  }
  
  .bottom-nav-link:hover {
    transform: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bottom-nav {
    background: rgba(0, 0, 0, 0.95) !important;
    border: 2px solid #fff !important;
  }
  
  .bottom-nav-link {
    color: #fff !important;
  }
  
  .bottom-nav-link:hover {
    background: rgba(255, 255, 255, 0.3) !important;
  }

  .showcase-overlay {
    background: linear-gradient(transparent, rgba(0,0,0,1)) !important;
  }

  .contact-item {
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
  }
}
