/* Mobile-specific styles - Higher specificity to ensure they're not overridden */
@media only screen and (max-width: 768px) {
  /* Use the same background color as desktop */
  body {
    background-color: var(--background-color) !important; /* Using CSS variable for consistent background */
    background-image: none !important; /* Remove any background images */
    color: var(--text-color) !important;
    font-family: 'Times New Roman', Times, serif !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    /* Ensure background extends to the bottom of the page */
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  /* Ensure html and body cover the entire viewport with background */
  html, body {
    background-color: var(--background-color) !important; /* Use olive green background from CSS variable */
    min-height: 100% !important;
    height: 100% !important;
  }

  /* Override grid pattern to be invisible on mobile */
  body::before {
    background-image: none;
  }

  body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(107, 142, 35, 0.15) 0%, transparent 70%);
    background-size: 200% 200%;
    z-index: -2;
    pointer-events: none;
    animation: move-background 30s linear infinite;
  }
  
  /* Add diagonal pattern for mobile */
  .landing-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg, 
      rgba(107, 142, 35, 0.1) 0px, 
      rgba(107, 142, 35, 0.1) 20px, 
      rgba(85, 107, 47, 0.15) 20px, 
      rgba(85, 107, 47, 0.15) 40px);
    z-index: -1;
    pointer-events: none;
    animation: backgroundMove 30s linear infinite;
  }

  /* Use simple flexbox layout with padding for the fixed footer */
  .landing-page {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    align-items: center !important;
    text-align: center !important;
    position: relative !important;
    z-index: 1 !important;
    padding: 1rem !important;
    padding-bottom: 6rem !important; /* Add padding to account for fixed footer */
    box-sizing: border-box !important;
    width: 100% !important;
  }
  
  /* No spacer needed with fixed footer */

  .header {
    margin-bottom: 2rem !important;
    padding: 0.8rem !important;
    padding-bottom: 1.5rem !important; /* Add extra padding at the bottom to accommodate the line */
    position: relative !important;
    overflow: visible !important; /* Allow content to be visible outside the header */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  
  /* Add green line beneath the header with higher specificity */
  html body .landing-page .header::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 25% !important;
    right: 25% !important;
    height: 5px !important; /* Increased height for visibility */
    background: linear-gradient(90deg, var(--highlight-color), var(--primary-color), var(--highlight-color)) !important;
    display: block !important;
    z-index: 5 !important;
  }

  .title-image {
    max-width: 90%;
  }
  
  .button {
    width: 80%;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
  }
  
  /* Ensure merchandise button has white text on mobile */
  .button.outline {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  }
  
  .button-container {
    flex-direction: column;
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
  }

  /* Position footer fixed to the bottom of the viewport on mobile - with higher specificity */
  html body .landing-page .footer-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding-bottom: 1rem !important;
    padding-top: 1rem !important;
    /* Fixed positioning */
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    /* Set background color to match the olive green theme */
    background-color: var(--background-color) !important; /* Olive green background */
    /* Add subtle top border for visual separation */
    border-top: 1px solid var(--primary-color) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2) !important;
    /* Remove blur effects */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 9999 !important; /* Very high z-index to ensure it's on top */
  }

  .gmc-star {
    width: 60px;
    margin: 0.3rem 0;
  }
  
  .rust-note {
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }
  
  .copyright {
    font-size: 1rem;
    padding: 0 1rem;
    margin-top: 0.3rem;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .title-image {
    max-width: 95%;
  }
  
  .button {
    width: 90%;
    margin: 0.3rem 0;
    font-size: 0.85rem;
    padding: 0.6rem 0.7rem;
  }
  
  .gmc-star {
    width: 40px;
    margin: 0.2rem 0;
  }
  
  .rust-note, .copyright {
    font-size: 0.8rem;
    margin: 0.2rem 0;
  }
  
  .header {
    margin-bottom: 0.3rem;
    padding: 0.5rem;
  }
  
  .header::after {
    left: 15%;
    right: 15%;
    height: 3px;
  }
  
  .button-container {
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
  }
  
  /* Maintain fixed footer on small screens with adjusted padding - with higher specificity */
  html body .landing-page .footer-container {
    padding-bottom: 0.7rem !important;
    padding-top: 0.7rem !important;
  }
}
