/* Shared mobile layout and navigation for the Acharya Shiva Shastri pages */
html { overflow-x: hidden; }
body { max-width: 100%; overflow-x: clip; }
img, svg, video, iframe { max-width: 100%; }

/* Gallery cards */
body .grid {
  width: min(1120px, 92%);
  margin: clamp(28px, 5vw, 60px) auto 0;
  gap: clamp(10px, 2vw, 20px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(190px, 23vw, 290px);
}
body .gridd {
  height: auto;
  min-width: 0;
  padding: 3px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}
body .gridd img { display: block; transition: transform .28s ease; }
body .gridd:hover img { transform: scale(1.05); }

@media (max-width: 900px) {
  body .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(185px, 30vw, 260px); }
}

.mobile-menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .navbar {
    width: auto;
    min-height: 68px;
    margin: 14px 16px !important;
    padding: 12px 18px !important;
    border-radius: 24px;
    flex-wrap: wrap !important;
  }

  .navbar .logo { font-size: clamp(1rem, 5vw, 1.3rem); }
  .mobile-menu-toggle { display: grid; }

  .navbar .nav-links {
    display: none !important;
    width: 100%;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 2px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid rgba(255,255,255,.2);
  }

  .navbar.mobile-menu-open .nav-links { display: flex !important; }
  .navbar .nav-links li { width: 100%; }
  .navbar .nav-links a {
    display: block !important;
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 1rem;
    text-align: left;
  }
  .navbar .nav-links a:hover,
  .navbar .nav-links a:focus-visible { background: rgba(255,255,255,.12); }

  .main, .main-main, .main2, .containertwo, .fake {
    max-width: 100%;
  }
  .text { width: 100% !important; padding: 36px 22px !important; font-size: clamp(1.65rem, 7vw, 2.4rem) !important; letter-spacing: 1px !important; word-spacing: normal !important; }
  .nbody { width: 100% !important; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 12px 16px 36px; }
  .clock { width: min(300px, 82vw) !important; height: min(300px, 82vw) !important; }
  .clock svg { width: 100% !important; height: 100% !important; }
  .buttons { margin: 28px 0 0 !important; gap: 12px !important; }
  button { max-width: 100%; font-size: .95rem; padding: 13px 18px; }
  .containertwo { height: auto !important; min-height: 640px; }
  .flip-card { width: min(220px, 88vw); margin-inline: auto; }
  .footer-container { padding-inline: 22px; }

  /* Testimonials and the image carousel above the zodiac section */
  .people { padding: 64px 18px 18px !important; text-align: center; }
  .review { padding-inline: 18px !important; }
  .contentt { width: min(300px, calc(100vw - 36px)) !important; flex-basis: min(300px, calc(100vw - 36px)) !important; }
  .slide { width: 100% !important; padding: 0 16px 14px; overflow: visible !important; }
  .slide1, .slide2 {
    width: 100% !important;
    max-width: 100% !important;
    gap: 12px;
    padding: 4px 0 12px;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    animation: none !important;
    -webkit-overflow-scrolling: touch;
  }
  .slide1 .contentt, .slide2 .contentt {
    width: min(82vw, 300px) !important;
    flex: 0 0 min(82vw, 300px) !important;
    scroll-snap-align: start;
  }
  .rating { width: calc(100% - 32px) !important; justify-content: center; gap: 12px; text-align: center; }
  .rating img { height: 48px !important; }
  .rar, .buty { width: 100%; }
  .buty button { margin: 0 !important; }

  .box {
    width: calc(100% - 32px) !important;
    height: 410px !important;
    margin: 32px auto !important;
    padding-top: 0 !important;
  }
  .box > img { top: 8px !important; height: 270px !important; }
  .box label { margin-top: 292px !important; padding-left: 4px !important; }
  .box label img { width: 64px !important; height: 64px !important; margin-right: 3px !important; }
  .quote, .quote1, .quote2, .quote3, .quote4 {
    top: 32px !important;
    left: 7% !important;
    width: 86% !important;
    font-size: clamp(14px, 4vw, 18px) !important;
    letter-spacing: .5px !important;
  }
  .boxy { bottom: auto !important; height: auto !important; margin: 10px 16px 48px !important; width: calc(100% - 32px) !important; }
  .fake { flex-wrap: wrap; justify-content: center !important; gap: 8px 14px; padding: 0 12px; }
  .fake span { display: none; }

  /* Discover Your Cosmic Self cards */
  .containertwo { display: block !important; padding: 92px 16px 34px !important; overflow: visible !important; }
  #dis { top: 26px !important; width: calc(100% - 32px); white-space: normal !important; text-align: center; font-size: clamp(24px, 7vw, 34px) !important; letter-spacing: 1px !important; }
  .containerp1 { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 18px; }
  .containerp1 .flip-card { margin: 0 !important; }
  body .grid { width: calc(100% - 32px); grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(165px, 46vw, 260px); }
}

@media (max-width: 480px) {
  .kundali-grid { grid-template-columns: 1fr !important; }
  .gallery { grid-template-columns: 1fr !important; }
  body .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-auto-rows: 42vw; gap: 9px; }
  .form-grid { grid-template-columns: 1fr !important; }
}
