/*
 * My Umrah — Final Responsive & Mobile Overrides
 * Load this AFTER style.css on every public page.
 * Desktop design is preserved; rules mainly target tablets and phones.
 */

/* ==========================================================
   GLOBAL RESPONSIVE SAFETY
========================================================== */
html,
body {
  max-width: 100%;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
}


iframe {
  max-width: 100%;
  border: 0;
}

/* Prevent long text/URLs from forcing horizontal scrolling */
p,
a,
li,
h1,
h2,
h3,
h4,
h5,
h6,
span {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Keep form controls inside their columns */
input,
select,
textarea,
button {
  max-width: 100%;
}

/* ==========================================================
   LARGE TABLETS / SMALL LAPTOPS
========================================================== */
@media (max-width: 1200px) {
  .hero-slide-content h1 {
    font-size: 3.4rem;
  }
}

/* ==========================================================
   TABLETS + MOBILE NAVIGATION
========================================================== */
@media (max-width: 991.98px) {
  body {
    font-size: 1rem;
  }

  p {
    font-size: 1.04rem;
  }

  .container,
  .container-fluid {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* ---------- Top bar ---------- */
  .top-bar {
    text-align: center;
  }

  .top-bar .row {
    row-gap: 6px;
  }

  .top-bar-contact {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
  }

  .top-bar-contact a,
  .top-bar-contact span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .top-bar-socials {
    justify-content: center;
    margin-top: 8px;
  }

  /* ---------- Navbar ---------- */
  .main-navbar {
    background-color: rgba(10, 13, 13, 0.98);
    padding: 0.75rem 0;
  }

  .main-navbar .container {
    align-items: center;
  }

  .navbar-brand {
    max-width: calc(100% - 72px);
  }

  .navbar-brand .logo,
  .navbar-brand img {
    width: auto;
    max-width: 190px;
    max-height: 62px;
    height: auto !important;
    object-fit: contain;
  }

  .navbar-toggler {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .navbar-collapse {
    margin-top: 0.85rem;
    border-top: 1px solid var(--border-faint);
    padding-top: 0.75rem;
    max-height: calc(100svh - 105px);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  .main-navbar .navbar-nav {
    width: 100%;
    align-items: stretch !important;
  }

  .main-navbar .nav-item {
    width: 100%;
  }

  .main-navbar .nav-link {
    width: 100%;
    padding: 0.75rem 0.25rem !important;
    line-height: 1.35;
  }

  .nav-link::after {
    display: none;
  }

  /* Tap/click dropdown on mobile; never let it escape viewport */
  .main-navbar .services-dropdown .dropdown-menu {
    position: static !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none !important;
    margin: 0.25rem 0 0 !important;
    padding: 0.4rem !important;
    background: #222;
    box-shadow: none;
    border-radius: 8px;
  }

  .main-navbar .services-dropdown .dropdown-menu.show {
    display: block !important;
  }

  .main-navbar .dropdown-item {
    white-space: normal;
    padding: 0.7rem 0.85rem;
  }

  /* ---------- Hero ---------- */
  .hero-slide-content {
    max-width: 760px;
  }

  .hero-slide-content h1 {
    font-size: 2.9rem;
  }

  .hero-slider-section {
    height: 82svh;
    min-height: 590px;
  }

  /* ---------- General page sections ---------- */
  .page-banner {
    height: 36svh;
    min-height: 300px;
    margin-bottom: 4rem;
  }

  .page-banner-content h1 {
    font-size: 2.6rem;
  }

  .section-title {
    margin-bottom: 3rem;
  }

  .section-title h2 {
    font-size: 2.1rem;
  }

  .statistics-section,
  .cta-section {
    background-attachment: scroll;
  }

  /* Make Bootstrap-style large paddings less heavy on tablets */
  .glass-card.p-5,
  .p-5.glass-card {
    padding: 2.25rem !important;
  }
}

/* ==========================================================
   PHONES
========================================================== */
@media (max-width: 767.98px) {
  body {
    line-height: 1.7;
  }

  p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .container,
  .container-fluid {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Prevent iPhone Safari zooming when a field receives focus */
  .form-control,
  .form-select,
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Comfortable touch targets */
  .btn,
  button,
  .accordion-button,
  .gallery-filter-btn {
    min-height: 44px;
  }

  /* ---------- Hero ---------- */
  .hero-slider-section {
    height: auto;
    min-height: 620px;
    padding: 6rem 0 4rem;
  }

  .hero-slide,
  .hero-slider-section .swiper,
  .hero-slider-section .swiper-wrapper,
  .hero-slider-section .swiper-slide {
    min-height: inherit;
  }

  .hero-slide-content {
    width: 100%;
    max-width: 100%;
  }

  .hero-slide-content span {
    font-size: 0.76rem;
    letter-spacing: 2px;
    gap: 9px;
    flex-wrap: wrap;
  }

  .hero-slide-content span::before {
    width: 24px;
  }

  .hero-slide-content h1 {
    font-size: 2.2rem;
    line-height: 1.18;
    letter-spacing: 0;
  }

  .hero-slide-content p {
    font-size: 1rem;
    margin-bottom: 1.8rem;
  }

  .hero-slide-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero-swiper .swiper-button-next,
  .hero-swiper .swiper-button-prev {
    width: 42px;
    height: 42px;
  }

  /* ---------- Titles / banner ---------- */
  .section-title {
    margin-bottom: 2.5rem;
  }

  .section-title span {
    font-size: 0.74rem;
    letter-spacing: 2px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .section-title span::before {
    width: 24px;
  }

  .section-title h2 {
    font-size: 1.9rem;
  }

  .section-title p {
    font-size: 1rem;
    padding: 0 0.25rem;
  }

  .page-banner {
    height: 30svh;
    min-height: 260px;
    margin-bottom: 3rem;
  }

  .page-banner-content {
    width: 100%;
  }

  .page-banner-content h1 {
    font-size: 2.05rem;
    line-height: 1.2;
  }

  .breadcrumb {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  /* ---------- Cards / imagery ---------- */
  .package-img-wrapper {
    height: 220px;
  }

  .blog-img-wrapper {
    height: 210px;
  }

  .gallery-item {
    height: 250px;
  }

  .testimonial-card,
  .glass-card.p-5,
  .p-5.glass-card {
    padding: 2rem 1.4rem !important;
  }

  .package-price-tag {
    font-size: 1.75rem;
  }

  /* ---------- Statistics ---------- */
  .statistics-section {
    padding: 4rem 0;
  }

  .stat-box {
    margin-bottom: 2rem;
  }

  .stat-box .stat-number {
    font-size: 2.6rem;
  }

  /* ---------- CTA ---------- */
  .cta-section {
    padding: 4.5rem 0;
    text-align: center;
  }

  .cta-section .btn-gold,
  .cta-section .btn-outline-light,
  .cta-section .btn-outline-gold,
  .cta-section .btn-primary-theme {
    width: 100%;
    margin-bottom: 10px;
  }

  /* ---------- Tables ---------- */
  table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  table th,
  table td {
    white-space: normal;
    min-width: 120px;
  }

  /* ---------- Forms / maps ---------- */
  .form-control,
  .form-select {
    width: 100%;
  }

  .map-container,
  .map-container iframe {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ---------- Floating actions ---------- */
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: max(18px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
    font-size: 1.5rem;
  }

  .back-to-top {
    width: 44px;
    height: 44px;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: max(16px, env(safe-area-inset-left));
    font-size: 1rem;
  }

  /* ---------- Footer ---------- */
  footer {
    padding-top: 4rem;
    text-align: center;
  }

  .footer-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links a:hover {
    padding-left: 0;
  }

  .footer-bottom .row > div {
    text-align: center !important;
  }
}

/* ==========================================================
   SMALL PHONES
========================================================== */
@media (max-width: 575.98px) {
  .container,
  .container-fluid {
    padding-left: 14px;
    padding-right: 14px;
  }

  .navbar-brand .logo,
  .navbar-brand img {
    max-width: 155px;
    max-height: 56px;
  }

  .hero-slider-section {
    min-height: 590px;
    padding: 5.25rem 0 3.5rem;
  }

  .hero-slide-content h1 {
    font-size: 1.85rem;
  }

  .hero-slide-content p {
    font-size: 0.95rem;
  }

  .hero-slide-buttons {
    flex-direction: column;
  }

  .hero-slide-buttons a,
  .hero-slide-buttons .btn {
    width: 100%;
    text-align: center;
  }

  /* Hide slider arrows on narrow screens so they do not cover text */
  .hero-swiper .swiper-button-next,
  .hero-swiper .swiper-button-prev {
    display: none;
  }

  .section-title h2 {
    font-size: 1.72rem;
  }

  .page-banner-content h1 {
    font-size: 1.8rem;
  }

  .package-img-wrapper {
    height: 200px;
  }

  .blog-img-wrapper {
    height: 195px;
  }

  .gallery-item {
    height: 225px;
  }

  .testimonial-card {
    padding: 1.75rem 1.15rem !important;
  }

  .accordion-button {
    padding: 1.1rem 1rem;
    font-size: 1rem;
  }

  .accordion-body {
    padding: 0 1rem 1.15rem;
    font-size: 0.98rem;
  }

  .gallery-filter-btn {
    padding: 0.55rem 1rem;
    font-size: 0.76rem;
  }
}

/* ==========================================================
   VERY SMALL PHONES (320–359px)
========================================================== */
@media (max-width: 359.98px) {
  .container,
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .navbar-brand .logo,
  .navbar-brand img {
    max-width: 138px;
  }

  .hero-slide-content h1 {
    font-size: 1.65rem;
  }

  .hero-slide-content span,
  .section-title span {
    letter-spacing: 1.4px;
  }

  .section-title h2 {
    font-size: 1.55rem;
  }

  .page-banner-content h1 {
    font-size: 1.6rem;
  }

  .btn {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ==========================================================
   LANDSCAPE PHONES
========================================================== */
@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 520px) {
  .hero-slider-section {
    min-height: 520px;
    height: auto;
    padding: 4.5rem 0 3rem;
  }

  .hero-slide-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .hero-slide-content p {
    margin-bottom: 1.25rem;
  }

  .page-banner {
    min-height: 230px;
    height: auto;
    padding: 3.5rem 0;
  }
}

/* ==========================================================
   TOUCH DEVICES — REMOVE HOVER-ONLY MOTION
========================================================== */
@media (hover: none) and (pointer: coarse) {
  .glass-card:hover,
  .whatsapp-float:hover,
  .back-to-top:hover {
    transform: none;
  }

  .glass-card:hover .package-img-wrapper img,
  .blog-card:hover .blog-img-wrapper img,
  .gallery-item:hover img {
    transform: none;
  }

  /* Gallery captions remain discoverable without hover */
  .gallery-overlay {
    opacity: 1;
    background: linear-gradient(
      180deg,
      rgba(10, 13, 13, 0) 48%,
      rgba(10, 13, 13, 0.9) 100%
    );
  }
}

/* ==========================================================
   REDUCED MOTION / ACCESSIBILITY
========================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* ==========================================================
   NAVBAR LOGO SIZE FIX
========================================================== */

/* Desktop / Laptop */
.main-navbar .navbar-brand img.logo,
.main-navbar .navbar-brand img {
  width: auto !important;
  height: 70px !important;
  max-width: 220px;
  object-fit: contain;
}

/* Tablet */
@media (max-width: 991.98px) {
  .main-navbar .navbar-brand img.logo,
  .main-navbar .navbar-brand img {
    width: auto !important;
    height: 58px !important;
    max-width: 180px;
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .main-navbar .navbar-brand img.logo,
  .main-navbar .navbar-brand img {
    width: auto !important;
    height: 50px !important;
    max-width: 155px;
  }
}