/* ===============================================
   ENHANCED RESPONSIVE FIXES FOR INDEX.HTML
   Cleaned up: Removed duplicates handled by
   ios-device-fixes.css and index.html inline styles
=============================================== */

/* ===============================================
   HERO SECTION - PROFILE CARDS POSITIONING
   (Sizing handled in index.html inline styles)
=============================================== */

/* Mobile Portrait (320px - 575px) - Position matching only */
@media (max-width: 575px) {
  /* Hero container - MATCH spacing with 576px+ view */
  section.w-full.flex.justify-center {
    padding: 3rem 10px 2rem 10px !important;
    min-height: auto !important;
  }

  /* Profile cards container - align-items: flex-start to match larger screens */
  .flex.flex-col.md\:flex-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    justify-content: center !important;
    align-items: flex-start !important;
    max-width: 100% !important;
    padding: 0 5px !important;
  }
}

/* ===============================================
   CONTENT SECTIONS - TYPOGRAPHY
=============================================== */

/* Hero Title Section */
@media (max-width: 575px) {
  #hero-title {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
  }

  #hero-text {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    padding: 0 10px !important;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  #hero-title {
    font-size: 2rem !important;
  }

  #hero-text {
    font-size: 1rem !important;
  }
}

/* ===============================================
   QUOTE SECTION
=============================================== */

@media (max-width: 575px) {
  #quote-container {
    padding: 0 15px !important;
    margin: 0 auto !important;
  }

  #quote-text {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    padding: 0 30px !important;
    min-height: 60px !important;
  }

  #quote-author {
    font-size: 0.9rem !important;
  }

  .quote-nav {
    opacity: 0.8 !important;
    width: 32px !important;
    height: 32px !important;
  }

  #prev-quote {
    left: 0px !important;
  }

  #next-quote {
    right: 0px !important;
  }

  .quote-nav svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* ===============================================
   DARSHAN COUNTDOWN SECTION
=============================================== */

@media (max-width: 575px) {
  section.bg-yellow-50 h3 {
    font-size: 1.05rem !important;
    padding: 0 10px !important;
    margin-bottom: 10px !important;
  }

  #countdown {
    font-size: 0.95rem !important;
    padding: 0 10px !important;
  }

  #darshanList {
    width: 100% !important;
    padding: 0 10px !important;
  }

  #darshanList button {
    font-size: 0.85rem !important;
    height: 2.3rem !important;
    padding: 0.3rem 0.6rem !important;
    margin-bottom: 0.4rem !important;
    white-space: normal !important;
    line-height: 1.2 !important;
  }

  #darshanDetailWrapper {
    padding: 0 10px !important;
  }

  #darshanDetail {
    font-size: 0.9rem !important;
    padding: 0.8rem !important;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  #darshanList {
    max-width: 400px !important;
  }

  #darshanList button {
    font-size: 0.95rem !important;
  }
}

/* ===============================================
   INFO GRID SECTION
=============================================== */

@media (max-width: 767px) {
  section.max-w-6xl.mx-auto.px-4.py-12.grid {
    display: flex !important;
    flex-direction: column !important;
    padding: 30px 20px !important;
    gap: 25px !important;
  }

  section.max-w-6xl.mx-auto.px-4.py-12.grid > div {
    text-align: center !important;
    padding: 0 10px !important;
  }

  section.max-w-6xl.mx-auto.px-4.py-12.grid h3 {
    font-size: 1.1rem !important;
    margin-bottom: 8px !important;
  }

  section.max-w-6xl.mx-auto.px-4.py-12.grid p {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }
}

/* ===============================================
   QUOTE CARD (Article)
=============================================== */

@media (max-width: 575px) {
  .max-w-6xl.mx-auto.p-4.md\:p-8 {
    padding: 15px !important;
  }

  article.quote {
    padding: 1.2rem 0.8rem !important;
    margin: 0 !important;
    border-radius: 8px !important;
  }

  article.quote blockquote {
    font-size: 1rem !important;
    padding-left: 15px !important;
    margin-bottom: 1rem !important;
  }

  article.quote blockquote::before {
    font-size: 2.5rem !important;
    left: -5px !important;
    top: -10px !important;
  }

  article.quote cite {
    font-size: 0.9rem !important;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  article.quote {
    padding: 1.8rem 1.2rem !important;
  }

  article.quote blockquote {
    font-size: 1.2rem !important;
  }
}

/* ===============================================
   POPUP MODALS - FULLSCREEN ON SMALL SCREENS
=============================================== */

@media (max-width: 575px) {
  .popup-overlay {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
  }

  .popup-overlay iframe {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    max-width: none !important;
    max-height: none !important;
    box-shadow: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 9999 !important;
    border: none !important;
  }
}

/* ===============================================
   BACKGROUND & DECORATIVE ELEMENTS
=============================================== */

@media (max-width: 767px) {
  body {
    background-attachment: scroll !important;
    background-size: cover !important;
  }

  .lotus-left,
  .lotus-right {
    display: none !important;
  }
}

/* ===============================================
   LANDSCAPE ORIENTATION FIXES
=============================================== */

@media (max-height: 500px) and (orientation: landscape) {
  header {
    padding: 8px 15px !important;
  }

  #site-title {
    font-size: 1rem !important;
  }

  section {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
  }

  .profile-card {
    max-height: 180px !important;
  }

  .profile-card img {
    max-height: 150px !important;
  }
}

/* ===============================================
   ACCESSIBILITY IMPROVEMENTS
=============================================== */

/* Focus styles for keyboard navigation */
*:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #3b82f6;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  * {
    border-width: 2px !important;
  }

  button, a {
    text-decoration: underline;
  }
}

/* ===============================================
   PRINT STYLES
=============================================== */

@media print {
  header,
  .hamburger,
  .mobile-nav-overlay,
  .nav-backdrop,
  .quote-nav,
  #languageToggle,
  .popup-overlay {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .profile-card {
    break-inside: avoid;
  }
}
