/**
 * Farmer ID Card Download Platform
 * Mobile-First Responsive Design System
 * Domain: https://farmeridcarddownload.com
 * Breakpoints: Mobile (<= 767.98px), Tablet (768px - 991.98px), Desktop (>= 992px)
 */

/* ==========================================================================
   1. GLOBAL MOBILE-FIRST FOUNDATIONS & RESETS
   ========================================================================== */
html, body {
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Base Mobile Typography Scaling */
h1, .hero-title {
  font-size: clamp(1.45rem, 5.5vw, 2.5rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.3rem, 4.4vw, 2rem);
  line-height: 1.25;
}

h3 {
  font-size: clamp(1.15rem, 3.6vw, 1.55rem);
}

/* Touch Friendly Tap Targets */
button, 
.btn, 
.nav-link, 
.form-select, 
.form-control,
.mobile-nav-item {
  touch-action: manipulation;
}

/* ==========================================================================
   2. MOBILE BOTTOM APP BAR (NATIVE APP EXPERIENCE FOR SMARTPHONES)
   ========================================================================== */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(22, 163, 74, 0.2);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  padding: 0.3rem 0.5rem calc(0.3rem + env(safe-area-inset-bottom, 0px));
}

.mobile-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.3rem 0;
  transition: all 0.2s ease;
  position: relative;
  min-height: 48px;
}

.mobile-nav-item i {
  font-size: 1.25rem;
  line-height: 1;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: #16a34a;
}

.mobile-nav-item.highlight {
  color: #b45309;
}
.mobile-nav-item.highlight i {
  color: #f59e0b;
}

.mobile-nav-pill-badge {
  position: absolute;
  top: 1px;
  right: 18%;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 9999px;
  line-height: 1.2;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.4);
}

.mobile-nav-item.whatsapp-nav {
  color: #15803d;
}
.mobile-nav-item.whatsapp-nav i {
  color: #22c55e;
}

/* ==========================================================================
   3. MOBILE DEVICES (Max 767.98px)
   ========================================================================== */
@media (max-width: 767.98px) {
  /* Prevent content overlap with fixed bottom navigation bar */
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Prevent Safari Auto-Zoom on form input focus */
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* 3.1 Top Announcement Notice Bar */
  .top-notice-bar {
    font-size: 0.74rem;
    padding: 0.4rem 0.5rem;
    text-align: center;
  }
  .top-notice-bar .container {
    flex-direction: column;
    gap: 0.2rem;
    justify-content: center;
  }
  .top-notice-bar .separator {
    display: none;
  }

  /* 3.2 Mobile Header & Navigation */
  .navbar-custom {
    padding: 0.5rem 0;
  }
  .navbar-brand-logo {
    height: 40px;
    max-height: 40px;
    max-width: 185px;
  }
  .navbar-toggler {
    padding: 0.45rem 0.65rem;
    font-size: 1.15rem;
    min-height: 44px;
    min-width: 44px;
  }
  .navbar-collapse {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-top: 0.65rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border: 1.5px solid #dcfce7;
  }
  .nav-link-custom {
    padding: 0.65rem 0.85rem !important;
    font-size: 0.96rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
  }
  .btn-nav-portal {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    min-height: 44px;
  }

  /* 3.3 Hero Section (Mobile Optimized with Generous Breathing Room) */
  .hero-slider-section {
    min-height: auto;
    padding: 2.25rem 0 3.5rem;
    display: block;
  }
  .hero-content {
    padding: 1.25rem 0.75rem 2.5rem;
    text-align: center;
  }
  .hero-badge-pill {
    font-size: 0.78rem;
    padding: 0.4rem 1rem;
    margin-bottom: 1rem;
  }
  .hero-title {
    font-size: clamp(1.5rem, 6.2vw, 2rem);
    margin-top: 0.5rem;
    margin-bottom: 0.85rem;
    padding: 0 0.5rem;
  }
  .hero-subtitle {
    font-size: 0.96rem;
    line-height: 1.55;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.35rem;
    padding: 0 0.75rem;
  }
  .hero-offer-box {
    margin: 0.75rem auto 1.25rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    border-left-width: 3px;
    max-width: 100%;
    font-size: 0.88rem;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0 0.25rem;
  }
  .hero-cta-group .btn {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Hero Floating Authentication & Registration Card */
  .hero-auth-card {
    padding: 1.6rem 1.35rem 1.85rem;
    margin-top: 2rem;
    margin-bottom: 3.5rem !important;
    border-radius: 20px;
    max-width: 100%;
    width: 100%;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
  }
  .hero-auth-mode-tabs {
    padding: 4px;
    margin-bottom: 1rem;
    gap: 6px;
  }
  .hero-auth-mode-tab {
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
    min-height: 46px;
  }
  .auth-field-label {
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
    font-weight: 600;
  }
  .auth-input-box {
    min-height: 48px;
    padding: 0.2rem 0.85rem;
    border-radius: 10px;
    margin-bottom: 0.25rem;
  }
  .auth-input-field {
    font-size: 16px !important;
    padding: 0.5rem 0.25rem;
  }
  .auth-options-row {
    margin: 0.6rem 0 0.85rem;
    font-size: 0.82rem;
  }
  .btn-hero-auth-submit {
    min-height: 50px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    margin-top: 0.4rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.35);
  }
  .btn-toggle-password {
    min-width: 44px;
    min-height: 44px;
  }

  /* 3.4 Promotional Banners Section */
  .promo-banners-section {
    padding: 2rem 0;
  }
  .promo-banner-card {
    padding: 1.35rem 1.15rem;
    margin: 0;
    border-radius: 14px;
  }
  .promo-banner-card h5 {
    font-size: 1.12rem;
  }

  /* 3.5 Promotional Pricing Card */
  .pricing-banner-section {
    padding: 2.25rem 0;
  }
  .pricing-card-highlight {
    padding: 1.4rem 1.1rem;
    border-radius: 16px;
  }
  .pricing-ribbon {
    position: static;
    transform: none;
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 6px;
    font-size: 0.72rem;
    margin-bottom: 0.85rem;
    box-shadow: none;
  }
  .price-huge {
    font-size: 3.4rem;
  }
  .price-symbol {
    font-size: 1.8rem;
  }
  .price-features-list {
    padding-left: 0;
    margin-bottom: 1.25rem;
  }
  .price-features-list li {
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
  }

  /* 3.6 Services Cards */
  .services-section {
    padding: 2.5rem 0;
  }
  .service-card {
    padding: 1.35rem 1.15rem;
    border-radius: 14px;
  }
  .service-icon-box {
    width: 46px;
    height: 46px;
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
  }
  .service-card-title {
    font-size: 1.1rem;
  }
  .service-card-desc {
    font-size: 0.88rem;
  }

  /* 3.7 Registration Cards */
  .registration-options-section {
    padding: 2.5rem 0;
  }
  .registration-card {
    padding: 1.4rem 1.15rem;
    border-radius: 14px;
  }
  .reg-card-icon {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  /* 3.8 Step-by-Step (How It Works) */
  .how-it-works-section {
    padding: 2.5rem 0;
  }
  .hiw-step-box {
    padding: 1.35rem 1.15rem;
    border-radius: 14px;
  }
  .hiw-number-badge {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  .hiw-icon-circle {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  /* 3.9 Interactive Specimen Card Showcase */
  .card-showcase-section {
    padding: 2.5rem 0;
  }
  .id-card-stage {
    perspective: none;
    padding: 0.25rem 0;
  }
  .id-card-wrapper {
    max-width: 100%;
    width: 100%;
    transform: none !important;
  }
  .farmer-id-card {
    border-radius: 14px;
    width: 100%;
  }
  .id-card-grid {
    grid-template-columns: 82px 1fr;
    gap: 0.65rem;
  }
  .id-photo-box {
    width: 82px;
    height: 100px;
  }
  .id-card-body {
    padding: 0.75rem;
  }
  .id-card-header {
    padding: 0.65rem 0.75rem;
  }
  .id-card-footer {
    padding: 0.45rem 0.75rem;
  }
  .id-field-label {
    font-size: 0.58rem;
  }
  .id-field-value {
    font-size: 0.72rem;
  }
  .id-barcode-mock {
    width: 95px;
  }

  /* Phone Mockup Frame */
  .phone-mockup-frame {
    max-width: 295px;
    border-radius: 28px;
    padding: 8px;
    border-width: 3px;
  }
  .phone-screen {
    min-height: 420px;
    border-radius: 22px;
  }

  /* 3.10 Testimonials & FAQ */
  .testimonials-section,
  .faq-section {
    padding: 2.5rem 0;
  }
  .testimonial-card {
    padding: 1.25rem 1.1rem;
    border-radius: 14px;
  }
  .accordion-button {
    font-size: 0.92rem;
    padding: 0.95rem 1rem;
    min-height: 48px;
  }
  .accordion-body {
    font-size: 0.88rem;
    padding: 1rem;
  }

  /* 3.11 Contact Section */
  .contact-section {
    padding: 2.5rem 0;
  }
  .contact-info-panel,
  .contact-card {
    padding: 1.35rem 1.15rem;
    border-radius: 14px;
  }

  /* 3.12 Footer */
  .footer-main {
    padding: 2.5rem 0 1.5rem;
  }
  .footer-disclaimer-box {
    padding: 1rem;
    font-size: 0.76rem;
  }
  .footer-bottom-bar {
    text-align: center;
    font-size: 0.76rem;
  }

  /* Adjust WhatsApp button so it does not block anything */
  .whatsapp-floating-btn {
    display: none !important; /* Replaced by bottom bar on mobile */
  }

  .back-to-top-btn {
    bottom: 74px;
    right: 14px;
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .slider-arrow {
    display: none !important;
  }
}

/* ==========================================================================
   4. EXTRA SMALL SCREENS (Phones <= 375px: iPhone SE, Galaxy A)
   ========================================================================== */
@media (max-width: 375px) {
  .hero-title {
    font-size: 1.42rem;
  }
  .navbar-brand-logo {
    height: 36px;
    max-height: 36px;
    max-width: 155px;
  }
  .hero-auth-card {
    padding: 1rem 0.85rem;
  }
  .id-card-grid {
    grid-template-columns: 74px 1fr;
    gap: 0.5rem;
  }
  .id-photo-box {
    width: 74px;
    height: 90px;
  }
  .phone-mockup-frame {
    max-width: 100%;
  }
  .mobile-nav-item span {
    font-size: 0.62rem;
  }
}

/* ==========================================================================
   5. TABLETS & MID-SIZE SCREENS (768px - 991.98px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-slider-section {
    min-height: 520px;
  }
  .hero-content {
    padding: 2.5rem 0;
    text-align: center;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle,
  .hero-offer-box {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-auth-card {
    max-width: 440px;
    margin-top: 2rem;
  }
  .id-card-wrapper {
    max-width: 380px;
  }
  .contact-info-panel {
    margin-bottom: 2rem;
  }
  .slider-arrow {
    display: none;
  }
}

/* ==========================================================================
   6. LARGE DESKTOPS (>= 1200px)
   ========================================================================== */
@media (min-width: 1200px) {
  .hero-slider-section {
    min-height: 600px;
  }
  .hero-title {
    font-size: 2.75rem;
  }
}
