/* =====================================================
   Responsive Styles - Mobile First
   ===================================================== */

/* ========== Large Desktop (1440px+) ========== */
@media (min-width: 1440px) {
  .section {
    padding: var(--spacing-xl) 4rem;
  }
  
  .gallery-grid {
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 8rem;
  }
}

/* ========== Desktop (1024px - 1439px) ========== */
@media (min-width: 1024px) and (max-width: 1439px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== Laptop / Tablet Landscape (1024px) ========== */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .nav {
    padding: 1rem 1.5rem;
  }
  
  .hero-title {
    letter-spacing: 4px;
  }
  
  .section {
    padding: var(--spacing-lg) var(--spacing-md);
  }
}

/* ========== Tablet (768px - 1023px) ========== */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --spacing-xl: 4rem;
    --spacing-lg: 3rem;
  }
  
  .nav {
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  
  .nav-brand {
    font-size: 1.2rem;
  }
  
  .filter-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .hero-content {
    padding: 1.5rem;
  }
  
  .hero-links {
    gap: 1rem;
  }
  
  .hero-link {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .gallery-item {
    aspect-ratio: 4/3;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .lightbox-nav {
    padding: 1rem 1.2rem;
    font-size: 1.5rem;
  }
  
  .lightbox-prev {
    left: 1rem;
  }
  
  .lightbox-next {
    right: 1rem;
  }
  
  .lightbox-counter {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
  }
  
  .lightbox::before {
    display: none;
  }
}

/* ========== Mobile Large (480px - 767px) ========== */
@media (min-width: 480px) and (max-width: 767px) {
  :root {
    --spacing-xl: 3rem;
    --spacing-lg: 2.5rem;
    --spacing-md: 1.5rem;
  }
  
  /* Navigation */
  .nav {
    flex-direction: column;
    padding: 0.8rem 1rem;
    gap: 0.8rem;
  }
  
  .nav-brand {
    font-size: 1.1rem;
  }
  
  .brand-number {
    font-size: 1.4rem;
  }
  
  .nav-filters {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  
  .filter-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
  }
  
  /* Hero */
  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
    letter-spacing: 3px;
  }
  
  .subtitle-text {
    font-size: 1rem;
    letter-spacing: 3px;
  }
  
  .hero-links {
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
  }
  
  .hero-link {
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }
  
  /* Sections */
  .section {
    padding: var(--spacing-lg) var(--spacing-sm);
  }
  
  .section-title {
    font-size: 2rem;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-md);
  }
  
  .section-title::after {
    width: 40px;
    height: 3px;
  }
  
  /* About */
  .about-text p {
    font-size: 1rem;
  }
  
  .about-lead {
    font-size: 1.2rem !important;
  }
  
  /* Featured */
  .featured-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .gallery-item {
    aspect-ratio: 16/10;
  }
  
  .gallery-caption {
    opacity: 1;
    transform: translateY(0);
    padding: 1rem;
  }
  
  .caption-title {
    font-size: 1rem;
  }
  
  .caption-location {
    font-size: 0.8rem;
  }
  
  /* Contact */
  .contact-text {
    font-size: 1rem;
  }
  
  .contact-links {
    flex-direction: column;
    align-items: center;
  }
  
  .contact-btn {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }
  
  /* Footer */
  .footer {
    padding: 2rem 1rem;
  }
  
  .footer-links {
    gap: 1.5rem;
  }
  
  .footer-brand {
    font-size: 1rem;
  }
  
  /* Lightbox */
  .lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }
  
  .lightbox-nav {
    padding: 0.8rem 1rem;
    font-size: 1.2rem;
  }
  
  .lightbox-prev {
    left: 0.5rem;
  }
  
  .lightbox-next {
    right: 0.5rem;
  }
  
  .lightbox-counter {
    bottom: 1.5rem;
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
  }
  
  .lightbox-caption {
    bottom: 4rem;
  }
  
  .lightbox-caption .caption-title {
    font-size: 1rem;
  }
  
  .lightbox::before {
    display: none;
  }
}

/* ========== Mobile Small (320px - 479px) ========== */
@media (max-width: 479px) {
  :root {
    --spacing-xl: 2.5rem;
    --spacing-lg: 2rem;
    --spacing-md: 1rem;
    --spacing-sm: 0.5rem;
  }
  
  /* Nav */
  .nav {
    padding: 0.6rem;
  }
  
  .nav-brand {
    font-size: 1rem;
  }
  
  .brand-number {
    font-size: 1.2rem;
  }
  
  .filter-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
  }
  
  /* Hero */
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    letter-spacing: 2px;
  }
  
  .subtitle-text {
    font-size: 0.9rem;
    letter-spacing: 2px;
  }
  
  /* Sections */
  .section {
    padding: var(--spacing-lg) var(--spacing-sm);
  }
  
  .section-title {
    font-size: 1.7rem;
  }
  
  /* Gallery */
  .gallery-grid {
    gap: 0.8rem;
  }
  
  .gallery-item {
    aspect-ratio: 4/3;
  }
  
  /* Contact */
  .contact-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  /* Footer */
  .footer-content {
    gap: 1rem;
  }
  
  /* Lightbox */
  .lightbox-nav {
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
  }
  
  .lightbox-counter {
    font-size: 0.75rem;
  }
}

/* ========== Touch Device Optimizations ========== */
@media (hover: none) and (pointer: coarse) {
  /* Disable custom cursor on touch devices */
  .custom-cursor {
    display: none;
  }
  
  body {
    cursor: auto;
  }
  
  /* Larger touch targets */
  .filter-btn {
    padding: 0.6rem 1rem;
  }
  
  .gallery-item:hover img {
    transform: none;
  }
  
  /* Always show gallery captions on touch */
  .gallery-caption {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Show navigation buttons on touch */
  .lightbox-nav {
    opacity: 0.8;
  }
  
  /* Remove hover effects */
  .hero-link:hover,
  .contact-btn:hover,
  .filter-btn:hover {
    transform: none;
  }
}

/* ========== High DPI / Retina Displays ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp images */
  .gallery-item img,
  .featured-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ========== Print Styles ========== */
@media print {
  .nav,
  .lightbox,
  .loader,
  .custom-cursor,
  .scroll-indicator {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem;
  }
  
  .gallery-grid {
    display: block;
  }
  
  .gallery-item {
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }
}

/* ========== Landscape Orientation ========== */
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    min-height: 100vh;
    padding: 1rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vh, 3.5rem);
    margin-bottom: 0.5rem;
  }
  
  .hero-subtitle {
    margin-bottom: 1.5rem;
  }
  
  .scroll-indicator {
    bottom: 1rem;
  }
  
  .scroll-indicator span {
    display: none;
  }
}

/* ========== Ultra Wide Screens ========== */
@media (min-width: 2000px) {
  .section {
    max-width: 1800px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 10rem;
  }
}