/* ============================================
   KELIBATMU V2 - RESPONSIVE SYSTEM
   Phase: Production Fix - Clean Media Query Structure
   Owner: responsive.css - All Media Queries Only
   ============================================ */
/* -------------------- TABLET BREAKPOINT -------------------- */
@media (max-width: 1023px) {
  /* Typography Adjustments */
  h1 {
    font-size: var(--text-2xl);
  }

  h2 {
    font-size: var(--text-xl);
  }

  h3 {
    font-size: var(--text-lg);
  }

  /* Grid Adjustments */
  .featured-grid,
  .music-grid,
  .blog-grid,
  .team-grid,
  .recent-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-md);
  }

  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  /* Hero Section */
  .hero-section {
    padding: var(--space-xl) 0;
  }

  .hero-section h1 {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-md);
  }

  /* Song Detail */
  .song-info {
    grid-template-columns: 240px 1fr;
    gap: var(--space-lg);
  }

  .song-metadata h1 {
    font-size: var(--text-2xl);
  }

  /* Blog Detail */
  .blog-detail-section {
    max-width: 90%;
  }

  .blog-post-header h1 {
    font-size: var(--text-2xl);
  }

  /* Contact Grid */
  .contact-grid {
    gap: var(--space-lg);
  }
}

/* -------------------- MOBILE BREAKPOINT -------------------- */
@media (max-width: 767px) {
  /* CRITICAL FIX: Remove artificial vertical spacing that breaks overlay alignment */
  .main-content {
    padding-top: 0;
    padding-bottom: var(--space-md);
  }

  section {
    margin-bottom: var(--space-lg);
  }

  /* Typography */
  h1 {
    font-size: var(--text-xl);
  }

  h2 {
    font-size: var(--text-lg);
  }

  h3 {
    font-size: var(--text-md);
  }

  /* Grids - Single Column */
  .featured-grid,
  .music-grid,
  .blog-grid,
  .team-grid,
  .recent-grid,
  .related-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  /* Hero Section */
  .hero-section {
    padding: var(--space-lg) 0;
  }

  .hero-section h1 {
    font-size: var(--text-2xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  /* Section Headers */
  .section-header {
    margin-bottom: var(--space-md);
  }

  .section-description {
    font-size: var(--text-sm);
  }

  /* Song Detail */
  .song-info {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .artwork-placeholder-large {
    max-width: 280px;
    margin: 0 auto;
  }

  .song-metadata {
    text-align: center;
  }

  .song-metadata h1 {
    font-size: var(--text-xl);
  }

  .artist-name {
    font-size: var(--text-md);
  }

  /* Song Lyrics */
  .song-lyrics h2 {
    font-size: var(--text-lg);
  }

  .lyrics-content {
    padding: var(--space-md);
    font-size: var(--text-sm);
  }

  /* Blog Detail */
  .blog-detail-section {
    max-width: 100%;
  }

  .blog-post-header h1 {
    font-size: var(--text-xl);
  }

  .blog-post-meta {
    flex-direction: column;
    gap: var(--space-xs);
    align-items: center;
  }

  .blog-post-content {
    font-size: var(--text-sm);
  }

  .tags-list {
    flex-wrap: wrap;
  }

  /* Contact Page */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .contact-info {
    text-align: center;
  }

  .social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
  }

  .contact-form-wrapper {
    text-align: center;
  }

  .form-placeholder {
    padding: var(--space-md);
  }

  /* Cards */
  .placeholder-card,
  .blog-card {
    padding: var(--space-md);
  }

  .placeholder-card h3,
  .blog-card h2 {
    font-size: var(--text-md);
  }

  /* Team Section */
  .team-member-placeholder {
    padding: var(--space-md);
  }

  .team-member-placeholder h3 {
    font-size: var(--text-sm);
  }

  /* Values List */
  .values-list li {
    font-size: var(--text-sm);
    padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
  }

  /* Back Link */
  .back-to-blog {
    margin-top: var(--space-lg);
    text-align: center;
  }

  /* Comments Section */
  .comments-section h3 {
    font-size: var(--text-md);
  }

  .comments-placeholder {
    padding: var(--space-md);
    font-size: var(--text-sm);
  }

  /* Filters */
  .music-filters {
    padding: var(--space-sm);
  }

  .filter-placeholder p {
    font-size: var(--text-sm);
  }

  /* Pagination */
  .pagination-placeholder {
    margin-top: var(--space-lg);
    font-size: var(--text-xs);
  }

  /* Navbar brand container - full width, centered logo */
  .navbar-brand {
    position: relative;
    width: 100%;
    justify-content: center;
  }

  /* Hamburger toggle - absolutely positioned on LEFT */
  .navbar-toggle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Ensure logo stays centered */
  .navbar-logo {
    position: relative;
    left: 0;
  }

  /* Mobile sidebar - reduced floating width */
  .mobile-nav-container {
    width: 64vw;
    max-width: 240px;
    min-width: 200px;
  }

  /* Homepage artwork density - 2x2 cinematic grid */
  .featured-grid,
  .recent-grid,
  .music-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  /* Content-first spacing - reduce header overhead */
  .featured-section,
  .recent-section {
    margin-top: 0;
    padding-top: 0;
  }

  .section-header {
    margin-bottom: var(--space-sm);
  }

  .section-header h2 {
    font-size: 1.25rem;
    margin-bottom: 2px;
  }

  .section-description {
    font-size: 0.7rem;
    margin-bottom: 0;
  }

  /* Mobile homepage - hide repeated artist */
  .featured-section .card-info p,
  .recent-section .card-info p {
    display: none;
  }

  .featured-section .card-info,
  .recent-section .card-info {
    text-align: center;
  }

  .featured-section .card-info h3,
  .recent-section .card-info h3 {
    font-size: 0.9rem;
    line-height: 1.3;
    margin-top: 8px;
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  /* Mobile first section spacing override */
  .featured-section:first-child {
    margin-top: var(--space-xs);
    padding-top: 0;
  }
}

/* -------------------- SMALL MOBILE BREAKPOINT -------------------- */
@media (max-width: 480px) {
  /* CRITICAL FIX: Clean padding without top spacing */
  .main-content {
    padding: 0 0 var(--space-md) 0;
  }

  section {
    margin-bottom: var(--space-md);
  }

  /* Hero Section */
  .hero-section {
    padding: var(--space-md) 0;
  }

  .hero-section h1 {
    font-size: var(--text-xl);
  }

  .hero-subtitle {
    font-size: var(--text-sm);
  }

  /* Cards */
  .placeholder-card,
  .blog-card {
    padding: var(--space-sm);
  }

  /* Buttons */
  .btn-submit {
    width: 100%;
  }

  /* Form Controls */
  .form-control {
    font-size: var(--text-sm);
    padding: var(--space-xs) var(--space-sm);
  }

  /* Lyrics */
  .lyrics-content {
    padding: var(--space-sm);
    font-size: var(--text-xs);
  }

  /* Blog Meta */
  .blog-meta {
    font-size: 10px;
  }

  /* Tags */
  .tags-list li {
    font-size: 10px;
    padding: 4px var(--space-sm);
  }

  /* Share Links */
  .share-links {
    justify-content: center;
  }

  /* Team */
  .team-member-placeholder {
    padding: var(--space-sm);
  }

  /* Values */
  .values-list li {
    font-size: var(--text-xs);
  }
}

/* -------------------- DESKTOP LARGE SCREENS -------------------- */
@media (min-width: 1024px) {
  /* Wide Screen Optimizations */
  .featured-grid,
  .music-grid,
  .blog-grid,
  .team-grid,
  .recent-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* -------------------- EXTRA LARGE SCREENS (STANDALONE) -------------------- */
@media (min-width: 1600px) {
  .container {
    max-width: 1400px;
  }

  .featured-grid,
  .music-grid,
  .blog-grid,
  .team-grid,
  .recent-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* -------------------- TOUCH DEVICE OPTIMIZATIONS -------------------- */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .player-btn,
  .volume-btn,
  .nav-link,
  .mobile-nav-link,
  .read-more,
  .back-link,
  .share-links a,
  .social-links a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Remove hover effects that don't work on touch */
  .placeholder-card:hover,
  .blog-card:hover,
  .team-member-placeholder:hover {
    transform: none;
  }

  /* Increase spacing between touch targets */
  .tags-list {
    gap: var(--space-md);
  }

  .share-links {
    gap: var(--space-lg);
  }
}

/* -------------------- REDUCED MOTION PREFERENCE -------------------- */
@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;
  }
}

/* -------------------- PRINT STYLES -------------------- */
@media print {
  /* Hide non-essential elements */
  .global-player,
  .navbar,
  .mobile-nav-overlay,
  .footer,
  .player-volume,
  .player-controls {
    display: none !important;
  }

  /* Adjust main content for print */
  .main-content {
    padding: 0 !important;
    margin: 0 !important;
  }

  body {
    padding-bottom: 0 !important;
    background-color: white;
    color: black;
  }

  /* Ensure links are visible */
  a {
    color: black;
    text-decoration: underline;
  }

  /* Show full URLs */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 10px;
  }

  /* Preserve card backgrounds for print */
  .placeholder-card,
  .blog-card {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}

/* -------------------- FULLSCREEN PLAYER - RESPONSIVE -------------------- */
@media (max-width: 768px) {
  .fullscreen-track-title {
    font-size: 1.5rem;
  }

  .fullscreen-artwork {
    width: min(85vw, 300px);
    height: min(85vw, 300px);
  }
}

@media (max-width: 480px) {
  .fullscreen-controls {
    gap: var(--space-md);
  }

  .fullscreen-control-btn {
    width: 48px;
    height: 48px;
  }

  .fullscreen-play-pause {
    width: 60px;
    height: 60px;
  }
}