/* =============================================
   MOBILE-RESPONSIVE CSS
   Projekt Inspire - Mobile-First Fixes
   ============================================= */

/* === GLOBAL MOBILE RESETS === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

/* === FIX LOGO WRAPPER (overrides broken inline style width:-8px;margin-left:90px) === */
.logo-wrapper {
  width: auto !important;
  margin-left: 0 !important;
  max-width: 140px;
}

.logo-wrapper img {
  max-width: 100%;
  height: auto;
}

/* === HERO BANNER MOBILE HEADING FIX === */
/* Show hero headings on ALL screen sizes (they were hidden on mobile with d-none d-lg-block) */
.hero-banner-sliding-item .content-wrapper h2.animation-strip {
  display: block !important;
}

/* === PARTNER/SPONSORS SECTION FIX === */
.section-tittle.text-center {
  margin-bottom: 20px !important;
}

.slider-container {
  width: 100%;
  overflow: hidden;
  padding: 0 10px;
}

.partner-list {
  display: flex;
  flex-wrap: nowrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.partner-list li {
  flex: 0 0 auto;
}

.partner-list li .properties-card {
  width: 120px;
  height: auto;
}

.button-padding {
  padding: 10px !important;
}

/* === POPUP MOBILE FIX === */
.popup-container .popup-content {
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  margin: 10px;
}

.popup-content h1 {
  font-size: 22px;
}

.popup-content .video-container {
  margin: 10px 0;
}

/* === CONTACT FORM MOBILE === */
.contactForm .form-control {
  font-size: 16px; /* Prevents iOS zoom on focus */
  padding: 12px;
}

.wrapper {
  overflow: hidden;
  border-radius: 8px;
}

.info-wrap,
.contact-wrap {
  padding: 20px !important;
}

/* === FOOTER MOBILE FIX === */
footer .footer-top-section .cta {
  white-space: nowrap;
}

footer .annual-section .annual-image img {
  max-width: 100%;
  height: auto;
}

footer .social-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* === GOOGLE MAP RESPONSIVE === */
iframe[src*="google.com/maps"] {
  max-width: 100%;
}

/* === TOUCH TARGET SIZING === */
/* Scoped to avoid overriding mmenu internal elements */
main a, main button, main input[type="submit"], footer a, footer button, .cta:not(.mm-listview .cta) {
  min-height: 44px;
  min-width: 44px;
}

#mobinav-section-Homepage-level1 > li > .nav-big {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 8px 16px;
}

/* =============================================
   TABLET (max-width: 991px)
   ============================================= */
@media all and (max-width: 991.98px) {

  /* Logo fix for tablet */
  .logo-wrapper {
    max-width: 80px !important;
    margin-left: 10px !important;
  }

  /* Hero banner text sizing */
  .hero-banner-sliding-item .content-wrapper h2 {
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.2;
  }

  .hero-banner-sliding-item .content-wrapper .intro {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    line-height: 1.4;
  }

  /* Text-image modules - stack properly */
  .text-image-module .row {
    flex-direction: column !important;
  }

  .text-image-module .row.flex-row-reverse {
    flex-direction: column !important;
  }

  .text-image-module .col-lg-7,
  .text-image-module .col-md-7 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  .text-image-module .col-md-6 {
    max-width: 100%;
    flex: 0 0 100%;
    padding: 20px 15px;
  }

  /* Fullwidth signpost padding */
  .fullwidth-signpost-module .fullsignpost-content {
    padding: 40px 15px;
  }

  /* Partner cards sizing */
  .partner-list li .properties-card {
    width: 100px;
  }

  /* Footer fixes */
  footer .footer-logo-wrapper {
    position: relative !important;
    left: 0 !important;
  }

  /* Impact stats in popup */
  .impact-stats {
    flex-direction: column;
    gap: 15px;
  }
}

/* =============================================
   MOBILE (max-width: 767px)
   ============================================= */
@media all and (max-width: 767.98px) {

  /* Logo fix for mobile */
  .logo-wrapper {
    max-width: 60px !important;
    margin-left: 5px !important;
  }

  /* Hero banner - ensure text visible */
  .hero-banner-sliding-item .content-wrapper h2 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 10px;
  }

  .hero-banner-sliding-item .content-wrapper .intro {
    font-size: 1.4rem;
    line-height: 1.4;
  }

  /* CTA buttons - full width on mobile */
  .cta.cta-primary,
  .cta.cta-secondary {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    font-size: 1.4rem;
  }

  /* Section spacing */
  .module-wrapper {
    padding: 30px 0;
  }

  /* Text sections */
  .body-large p,
  .section-content p {
    font-size: 1.4rem;
    line-height: 1.6;
  }

  h2, .h2 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  h3, .h3 {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  /* Partner cards - smaller on mobile */
  .partner-list li .properties-card {
    width: 80px;
  }

  .partner-list li {
    margin-right: 6px !important;
  }

  /* Supporter heading */
  .section-tittle h2.bolded {
    font-size: 1.8rem !important;
    margin-bottom: 15px !important;
  }

  /* Video container */
  .video-container {
    padding-bottom: 56.25%;
    margin: 15px 0;
  }

  /* Contact page */
  .ftco-section .wrapper .row.no-gutters {
    flex-direction: column;
  }

  .ftco-section .col-md-6 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  /* Popup fixes */
  .popup {
    width: 90% !important;
    max-width: 90vw !important;
    padding: 15px !important;
  }

  .popup-container .popup-content {
    max-width: 95vw;
    padding: 15px;
    border-radius: 8px;
  }

  .popup-content .number {
    font-size: 24px;
  }

  /* Anniversary popup */
  #anniversary-popup .popup-content {
    max-width: 95vw;
    margin: 5px;
    padding: 15px;
  }

  #anniversary-popup h1 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  #anniversary-popup .subtitle {
    font-size: 14px;
    margin-bottom: 15px;
  }

  /* Footer */
  footer .footer-top-wrapper {
    text-align: center;
  }

  footer .footer-wrapper .row {
    padding: 0 10px;
  }

  footer .annual-col {
    margin-top: 20px;
  }

  footer .social-wrapper {
    text-align: center;
  }

  footer .social-links ul {
    justify-content: center;
  }

  footer .copyright-box p {
    font-size: 1.1rem;
    text-align: center;
  }

  /* Google Map height on mobile */
  iframe[src*="google.com/maps"] {
    height: 300px !important;
  }

  /* Image signpost cards - stack on mobile */
  .image-signpost-module .row .col-lg-4 {
    max-width: 100%;
    flex: 0 0 100%;
    margin-bottom: 15px;
  }

  .image-signpost {
    min-height: 200px !important;
  }

  /* Breadcrumb adjustments */
  .breadcrumb-wrapper {
    padding: 10px 0;
  }
}

/* =============================================
   SMALL MOBILE (max-width: 480px)
   ============================================= */
@media all and (max-width: 480px) {

  .hero-banner-sliding-item .content-wrapper h2 {
    font-size: 1.8rem;
  }

  .hero-banner-sliding-item .content-wrapper .intro {
    font-size: 1.3rem;
  }

  /* Partner cards even smaller */
  .partner-list li .properties-card {
    width: 65px;
  }

  .partner-list li {
    margin-right: 4px !important;
  }

  /* Footer links */
  footer .quick-content ul li a,
  footer .sector-links ul li a {
    font-size: 1.3rem;
    line-height: 2.2rem;
  }

  /* Popup further compact */
  .popup-container .popup-content {
    padding: 12px;
  }

  #anniversary-popup h1 {
    font-size: 18px;
  }

  .celebrate-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* =============================================
   LANDSCAPE MOBILE FIX
   ============================================= */
@media all and (max-height: 500px) and (orientation: landscape) {
  .hero-banner-main-wrapper .hero-banner-sliding-item {
    min-height: 400px;
  }

  .hero-banner-sliding-item .content-wrapper h2 {
    font-size: 1.8rem;
  }

  .popup-container .popup-content {
    max-height: 85vh;
    overflow-y: auto;
  }
}

/* =============================================
   PRINT SAFETY
   ============================================= */
@media print {
  .popup-container,
  .popup,
  #anniversary-popup,
  .mobile-mburger,
  #mmenu {
    display: none !important;
  }
}
