/*
 * COMPLETE DESKTOP FIX for 21days.dc.one
 * 
 * - Reduces header image height by 1/3
 * - Fixes header-content scrollbar issue
 * - Shrinks footer logo to a reasonable size on desktop (75%)
 * - Maintains all other desktop enhancements
 */

/* ===== DESKTOP HEADER IMAGE FIX ===== */

@media (min-width: 768px) {
  
  /* Target the header image and make it smaller */
  #headerIMG,
  .header img,
  img[src*="21daystitle.png"] {
    max-height: 133px !important; /* Reduced by 1/3 from 200px */
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 auto !important;
  }
  
  /* Ensure header container adjusts to the smaller image */
  .header {
    min-height: auto !important;
    height: auto !important;
    padding: 1rem 2rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
  }
  
  /* Fix header-content scrollbar issue specifically */
  .header-content {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
    max-width: 100% !important;
    width: auto !important;
  }
  
  /* Hide webkit scrollbars on header-content */
  .header-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  
  /* Also fix progress indicator elements just in case */
  .progress-indicator {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    width: auto !important;
    max-width: none !important;
  }
  
  .progress-grid {
    overflow: visible !important;
    width: auto !important;
    justify-content: center !important;
  }
  
  .grid-row {
    overflow: visible !important;
    white-space: nowrap !important;
  }
  
  /* Adjust content positioning for the smaller header */
  .main-content {
    padding-top: 180px !important; /* Adjusted for smaller header */
    max-width: 800px !important;
    margin: 0 auto !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Make content sections visible and well-spaced */
  .day-section {
    margin-bottom: 2.5rem !important;
    padding: 1.5rem !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s ease !important;
  }
  
  .day-section:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    background: rgba(255, 255, 255, 0.95) !important;
  }
  
  /* Optimize typography for desktop reading */
  .day-header h2 {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.75rem !important;
  }
  
  .day-date {
    font-size: 0.95rem !important;
    margin-bottom: 1rem !important;
  }
  
  .devotional-text {
    font-size: 1.1rem !important;
    line-height: 1.65 !important;
    max-width: 65ch !important;
  }
  
  /* Better day markers */
  .day-marker {
    width: 60px !important;
    margin-right: 1.25rem !important;
  }
  
  .day-number {
    width: 45px !important;
    height: 45px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
  }
  
  .day-section:hover .day-number {
    transform: scale(1.05) !important;
  }
  
  /* Enhanced buttons */
  .toggle-btn {
    padding: 0.65rem 1.3rem !important;
    font-size: 0.9rem !important;
    border-radius: 22px !important;
    min-height: auto !important;
    transition: all 0.3s ease !important;
  }
  
  .toggle-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(204, 166, 44, 0.25) !important;
  }
  
  /* ===== FOOTER LOGO FIX (More reasonable size) ===== */
  
  /* Shrink footer logo to 75% on desktop - much more reasonable */
  .footer img,
  img[src*="dc-logo-black-alt.png"] {
    width: 85% !important;
    height: auto !important;
    max-width: 400px !important; /* Reasonable max size */
    object-fit: contain !important;
  }
  
  /* Center the footer logo */
  .footer {
    text-align: center !important;
  }
  
  .footer p {
    margin: 0 auto !important;
    display: inline-block !important;
  }
  
  .footer a {
    display: inline-block !important;
  }
}

/* ===== LARGER DESKTOP SCREENS ===== */

@media (min-width: 1024px) {
  
  /* Slightly larger header image for big screens, but still compact */
  #headerIMG,
  .header img,
  img[src*="21daystitle.png"] {
    max-height: 167px !important; /* 1/3 reduction from 250px */
  }
  
  .header {
    padding: 1.5rem 3rem !important;
  }
  
  /* Adjust content positioning */
  .main-content {
    padding-top: 220px !important;
    max-width: 900px !important;
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }
  
  /* Enhanced content styling */
  .day-section {
    margin-bottom: 3rem !important;
    padding: 2rem !important;
  }
  
  .day-header h2 {
    font-size: 1.8rem !important;
  }
  
  .devotional-text {
    font-size: 1.15rem !important;
  }
  
  .day-marker {
    width: 70px !important;
    margin-right: 1.5rem !important;
  }
  
  .day-number {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.2rem !important;
  }
  
  /* Footer logo slightly smaller on larger screens */
  .footer img,
  img[src*="dc-logo-black-alt.png"] {
    width: 80% !important;
    max-width: 350px !important;
  }
}

/* ===== EXTRA LARGE SCREENS ===== */

@media (min-width: 1200px) {
  
  #headerIMG,
  .header img,
  img[src*="21daystitle.png"] {
    max-height: 187px !important; /* 1/3 reduction from 280px */
  }
  
  .main-content {
    padding-top: 240px !important;
    max-width: 1000px !important;
    padding-left: 4rem !important;
    padding-right: 4rem !important;
  }
  
  .day-section {
    margin-bottom: 4rem !important;
  }
  
  /* Footer logo proportional to very large screens */
  .footer img,
  img[src*="dc-logo-black-alt.png"] {
    width: 85% !important;
    max-width: 300px !important;
  }
}

/* ===== HEADER-CONTENT SCROLLBAR FIXES ===== */

@media (min-width: 768px) {
  
  /* Comprehensive scrollbar removal for header-content */
  .header-content {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
    max-width: 100% !important;
    width: auto !important;
  }
  
  /* Hide webkit scrollbars on header-content */
  .header-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  
  /* Ensure all child elements also don't create scrollbars */
  .header-content * {
    overflow: visible !important;
  }
  
  /* Make sure progress elements fit properly without scrolling */
  .progress-indicator,
  .progress-grid,
  .grid-row {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  
  .progress-indicator::-webkit-scrollbar,
  .progress-grid::-webkit-scrollbar,
  .grid-row::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}

/* ===== ACCESSIBILITY & POLISH ===== */

@media (min-width: 768px) {
  
  /* Better focus states */
  .toggle-btn:focus-visible {
    outline: 2px solid rgba(204, 166, 44, 0.6) !important;
    outline-offset: 2px !important;
  }
  
  /* Smooth scrolling */
  html {
    scroll-behavior: smooth !important;
  }
  
  /* Enhanced prayer box styling */
  .daily-prayer {
    margin: 1.5rem 0 !important;
    padding: 1.25rem !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 6px rgba(204, 166, 44, 0.15) !important;
  }
}

