/**
 * Responsive Styles
 * Battlefield REDSEC Guide Website
 * 
 * Mobile-first responsive design
 * Breakpoints: Mobile (default), Tablet (768px+), Desktop (1024px+)
 */

/* ============================================
   BASE (Mobile First - 320px to 767px)
   ============================================ */

/* Mobile is the default - styles in main.css and components.css */

/* Hero Section - Mobile: Stack vertically */
.hero-content {
  grid-template-columns: 1fr !important;
  gap: var(--spacing-8) !important;
  text-align: center;
}

.hero-cta {
  justify-content: center !important;
}

.hero-image {
  min-height: 300px !important;
}

/* ============================================
   TABLET (768px and up)
   ============================================ */

@media (min-width: 768px) {
  
  /* Typography */
  h1 {
    font-size: var(--text-6xl);
  }
  
  h2 {
    font-size: var(--text-5xl);
  }
  
  h3 {
    font-size: var(--text-4xl);
  }
  
  /* Container */
  .container {
    padding-left: var(--spacing-8);
    padding-right: var(--spacing-8);
  }
  
  /* Grid */
  .grid-cols-md-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cols-md-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Hero Section - Tablet: Switch to horizontal layout */
  .hero-section {
    padding: var(--spacing-2xl) var(--spacing-8);
  }
  
  .hero-content {
    grid-template-columns: 1fr 1fr !important;
    gap: var(--spacing-10) !important;
    text-align: left !important;
  }
  
  .hero-cta {
    gap: var(--spacing-6);
    justify-content: flex-start !important;
  }
  
  .hero-image {
    min-height: 450px !important;
  }
  
  /* Card Grid */
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* FAQ */
  .faq-item {
    padding: var(--spacing-8);
  }
  
  /* Table */
  table {
    font-size: var(--text-base);
  }
  
  /* Footer */
  .footer-links {
    gap: var(--spacing-8);
  }
}

/* ============================================
   DESKTOP (1024px and up)
   ============================================ */

@media (min-width: 1024px) {
  
  /* Header */
  .site-header {
    height: var(--header-height);
  }
  
  .nav-menu {
    padding: 0 var(--spacing-8);
  }
  
  .logo {
    font-size: var(--text-2xl);
  }
  
  .nav-list {
    gap: var(--spacing-4);
  }
  
  .nav-item {
    padding: var(--spacing-3) var(--spacing-6);
  }
  
  /* Hero Section */
  .hero-section {
    min-height: 600px;
  }
  
  .hero-title {
    font-size: var(--text-6xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-2xl);
  }
  
  /* Grid */
  .grid-cols-lg-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-cols-lg-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Card Grid */
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Content Sections */
  .content-section {
    padding: var(--spacing-2xl) 0;
  }
  
  /* Tables */
  th, td {
    padding: var(--spacing-6);
  }
  
  /* Footer */
  .site-footer {
    padding: var(--spacing-2xl) var(--spacing-8);
  }
  
  /* Tier List */
  .tier-label {
    width: 100px;
    font-size: var(--text-4xl);
  }
  
  .tier-items {
    padding: var(--spacing-6);
  }
}

/* ============================================
   LARGE DESKTOP (1440px and up)
   ============================================ */

@media (min-width: 1440px) {
  
  /* Container */
  .container {
    max-width: var(--max-width-wide);
  }
  
  /* Hero */
  .hero-section {
    min-height: 650px;
  }
  
  /* Card Grid */
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   MOBILE SPECIFIC (< 768px)
   ============================================ */

@media (max-width: 767px) {
  
  /* Header */
  .site-header {
    height: var(--header-height-mobile);
  }
  
  .nav-list {
    display: none; /* Will be shown as mobile menu */
  }
  
  /* Play Free Button - Mobile */
  .nav-menu .btn-primary {
    padding: var(--spacing-1) var(--spacing-3) !important;
    font-size: 0.75rem !important;
    margin-right: var(--spacing-2) !important;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  /* Mobile Menu (when open) */
  .nav-list.mobile-menu-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    right: 0;
    background-color: var(--color-dark);
    border-bottom: 2px solid var(--color-primary);
    padding: var(--spacing-4);
    gap: 0;
    z-index: var(--z-dropdown);
    box-shadow: var(--shadow-xl);
  }
  
  .nav-item {
    width: 100%;
    height: auto;
    padding: var(--spacing-4);
    border-bottom: 1px solid var(--border-color);
    border-bottom-width: 0 0 1px 0;
  }
  
  .nav-item.active {
    border-bottom-width: 0 0 1px 0;
    border-left: 3px solid var(--color-primary);
  }
  
  /* Hero */
  .hero-section {
    padding: var(--spacing-xl) var(--spacing-4);
    min-height: 350px;
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-base);
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  
  /* Typography */
  h1 {
    font-size: var(--text-3xl);
  }
  
  h2 {
    font-size: var(--text-2xl);
  }
  
  h3 {
    font-size: var(--text-xl);
  }
  
  /* Container */
  .container {
    padding-left: var(--spacing-4);
    padding-right: var(--spacing-4);
  }
  
  /* Section */
  .content-section {
    padding: var(--spacing-xl) 0;
  }
  
  /* Cards */
  .card-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-4);
  }
  
  .guide-card img {
    height: 180px;
  }
  
  /* Tables - Scroll horizontally */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  thead, tbody, tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }
  
  th, td {
    padding: var(--spacing-3);
    font-size: var(--text-sm);
  }
  
  /* FAQ */
  .faq-item {
    padding: var(--spacing-4);
  }
  
  .faq-item h3 {
    font-size: var(--text-base);
  }
  
  /* Footer */
  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-4);
  }
  
  .footer-social {
    gap: var(--spacing-3);
  }
  
  /* Tier List */
  .tier-row {
    flex-direction: column;
  }
  
  .tier-label {
    width: 100%;
    padding: var(--spacing-4);
  }
  
  .tier-items {
    padding: var(--spacing-3);
  }
  
  /* Breadcrumb */
  .breadcrumb-nav ol {
    font-size: var(--text-xs);
  }
  
  .breadcrumb-nav {
    padding: var(--spacing-2) 0;
  }
}

/* ============================================
   SMALL MOBILE (< 375px)
   ============================================ */

@media (max-width: 374px) {
  
  .hero-title {
    font-size: var(--text-2xl);
  }
  
  .logo {
    font-size: var(--text-lg);
  }
  
  h2 {
    font-size: var(--text-xl);
  }
  
  .btn-primary,
  .btn-secondary {
    padding: var(--spacing-3) var(--spacing-6);
    font-size: var(--text-sm);
  }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */

@media (max-height: 500px) and (orientation: landscape) {
  
  .hero-section {
    min-height: auto;
    padding: var(--spacing-xl) var(--spacing-4);
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  
  /* Larger tap targets */
  .nav-item,
  .btn-primary,
  .btn-secondary,
  .card-link {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch */
  .hover-lift:hover {
    transform: none;
  }
  
  /* Tap highlight */
  * {
    -webkit-tap-highlight-color: rgba(255, 70, 85, 0.2);
  }
}

/* ============================================
   HIGH RESOLUTION DISPLAYS
   ============================================ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  
  /* Sharper borders and shadows */
  .card,
  .guide-card,
  .faq-item {
    box-shadow: var(--shadow-md);
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

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

/* ============================================
   DARK MODE SUPPORT (for systems that support it)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Already dark by default - no changes needed */
  /* But keeping this for future light/dark toggle */
}

/* ============================================
   PRINT MEDIA
   ============================================ */

@media print {
  
  .site-header,
  .site-footer,
  .hero-cta,
  .mobile-menu-toggle,
  .copy-button,
  .btn-primary,
  .btn-secondary {
    display: none !important;
  }
  
  .hero-section {
    background: none !important;
    border: none !important;
    padding: var(--spacing-4) 0;
  }
  
  .hero-title {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
  }
  
  a {
    text-decoration: underline;
    color: #000 !important;
  }
  
  .content-section {
    page-break-inside: avoid;
  }
}

