/* ==========================================================================
   Jogeshwar Fenestration (P) Ltd - Responsive Media Queries
   Breakpoints: 320px, 360px, 375px, 414px, 480px, 576px, 768px, 992px, 1200px, 1400px, 1920px
   ========================================================================== */

/* --------------------------------------------------------------------------
   Global Overflow Protection - Prevents horizontal scroll on ALL pages
   -------------------------------------------------------------------------- */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Ensure long text never causes overflow */
.top-bar-info span,
.footer-contact-item div,
.breadcrumb-item,
.accordion-body {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   Large Desktops (1400px and up)
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

@media (min-width: 1600px) {
  .container {
    max-width: 1480px;
  }

  .hero-title {
    font-size: 3.8rem;
  }
}

/* --------------------------------------------------------------------------
   Desktops & Laptops (1200px to 1399px)
   -------------------------------------------------------------------------- */
@media (max-width: 1399.98px) {
  .hero-title {
    font-size: 3rem;
  }

  .mega-menu-container {
    width: 820px;
  }
}

/* --------------------------------------------------------------------------
   Laptops & Tablets Landscape (992px to 1199px)
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {

  .top-bar-info span {
    font-size: 0.60rem;
  }

  .nav-link-jf {
    padding: 20px 10px !important;
    font-size: 0.60rem;
  }

  .hero-title {
    font-size: 2.6rem;
  }

  .mega-menu-container {
    width: 720px;
  }

  .section-title {
    font-size: 2.1rem;
  }
}

/* --------------------------------------------------------------------------
   Mobile & Tablet Portrait (Under 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {

  /* Top Bar - stack info items vertically */
  .top-bar-info {
    text-align: center;
  }

  .top-bar-info span {
    display: block;
    margin-right: 0;
    margin-bottom: 4px;
    font-size: 0.78rem;
  }

  .top-bar-social {
    text-align: center !important;
    margin-top: 4px;
  }

  /* Hero */
  .hero-slide-item {
    min-height: 480px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .hero-content {
    padding: 40px 0;
  }

  /* Hide Swiper nav arrows on mobile - pagination dots are enough */
  .swiper-button-next-jf,
  .swiper-button-prev-jf {
    display: none !important;
  }

  /* Quick Highlights */
  .quick-highlights-bar {
    margin-top: 20px;
  }

  /* Mega Menu - collapse to full width */
  .mega-menu-container {
    width: 100% !important;
    transform: none !important;
    left: 0 !important;
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    padding: 10px 0 !important;
  }

  /* Mobile Navbar */
  .navbar-collapse {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-link-jf {
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--alt-grey);
    font-size: 0.9rem;
  }

  .nav-link-jf::after {
    display: none;
  }

  .dropdown-menu-jf {
    box-shadow: none;
    border-top: none;
    padding-left: 15px;
    background: var(--light-grey);
  }

  /* Cards & Sections */
  .solution-card {
    height: 300px;
  }

  .cta-banner {
    padding: 36px 20px;
    text-align: center;
  }

  .cta-banner h2 {
    font-size: 1.7rem;
  }

  .cta-banner p {
    font-size: 0.95rem;
  }

  /* Section typography */
  .section-title {
    font-size: 1.85rem;
  }

  .section-desc {
    font-size: 0.95rem;
  }

  /* Footer */
  .footer-area {
    padding-top: 50px;
  }

  .footer-bottom {
    margin-top: 40px;
  }

  /* Stats */
  .stat-number {
    font-size: 2.4rem;
  }

  .stat-label {
    font-size: 0.78rem;
    letter-spacing: 0.5px;
  }

  /* About section buttons - stack on mobile */
  .d-flex.gap-3 {
    flex-wrap: wrap;
  }
}

/* --------------------------------------------------------------------------
   Tablets & Small Tablets (Under 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {

  /* Section Spacing */
  .section-padding {
    padding: 50px 0;
  }

  /* Typography */
  .section-title {
    font-size: 1.65rem;
    line-height: 1.3;
  }

  .section-subtitle {
    font-size: 0.8rem;
    padding: 5px 14px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-desc {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .hero-actions {
    justify-content: center;
  }

  /* About Image */
  .about-img-main {
    height: 280px;
  }

  .about-experience-badge {
    padding: 14px 18px;
  }

  .about-experience-badge h3 {
    font-size: 1.8rem;
  }

  /* Product Cards */
  .product-title {
    font-size: 1.1rem;
  }

  .product-body p {
    font-size: 0.85rem;
  }

  /* Feature Boxes */
  .feature-box {
    padding: 24px 18px;
  }

  .feature-box h4 {
    font-size: 1rem;
  }

  .feature-box p {
    font-size: 0.85rem;
  }

  /* Blog Cards */
  .blog-title {
    font-size: 1rem;
  }

  .blog-content {
    padding: 16px;
  }

  /* Gallery */
  .gallery-thumb {
    height: 220px;
  }

  /* Testimonials */
  .testimonial-card {
    padding: 24px 20px;
    margin: 5px;
  }

  .testimonial-quote {
    font-size: 0.9rem;
  }

  /* Floating Widgets */
  .floating-whatsapp {
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  /* Footer */
  .footer-title {
    font-size: 1.05rem;
    margin-top: 10px;
  }

  .footer-area {
    font-size: 0.85rem;
  }

  .footer-logo {
    height: 44px;
  }

  /* Contact Page */
  .display-5 {
    font-size: 1.8rem !important;
  }

  /* Forms on small screens */
  .bg-white.p-4.p-md-5 {
    padding: 20px !important;
  }

  /* Accordion */
  .accordion-button {
    font-size: 0.9rem !important;
    padding: 14px 16px;
  }

  .accordion-body {
    font-size: 0.88rem;
    padding: 12px 16px;
  }
}

/* --------------------------------------------------------------------------
   Small Mobile Devices (Under 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {

  /* Navbar */
  .navbar-brand-logo {
    height: 40px;
  }

  /* Hero */
  .hero-slide-item {
    min-height: 420px;
  }

  .hero-title {
    font-size: 1.45rem;
    line-height: 1.25;
  }

  .hero-desc {
    font-size: 0.88rem;
  }

  .hero-badge {
    font-size: 0.72rem;
    padding: 4px 12px;
  }

  .hero-content {
    padding: 30px 0;
  }

  /* Buttons - full width on phones */
  .btn-primary-jf,
  .btn-outline-jf,
  .btn-white-jf {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.88rem;
  }

  /* Highlights */
  .highlight-box {
    padding: 8px 0;
  }

  .highlight-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1.1rem;
  }

  .highlight-text h5 {
    font-size: 0.88rem;
  }

  .highlight-text p {
    font-size: 0.75rem;
  }

  /* Products */
  .product-thumb {
    height: 200px;
  }

  .product-body {
    padding: 16px;
  }

  /* Solutions */
  .solution-card {
    height: 260px;
  }

  .solution-overlay {
    padding: 20px;
  }

  .solution-overlay h3 {
    font-size: 1.2rem;
  }

  .solution-overlay p {
    font-size: 0.82rem;
  }

  /* Stats */
  .stats-section {
    padding: 50px 0;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  /* Section typography fine tuning */
  .section-title {
    font-size: 1.45rem;
  }

  .section-desc {
    font-size: 0.88rem;
  }

  /* CTA */
  .cta-banner {
    padding: 30px 16px;
    border-radius: 12px;
  }

  .cta-banner h2 {
    font-size: 1.35rem;
  }

  .cta-banner p {
    font-size: 0.88rem;
  }

  /* Contact info on phone */
  .contact-card small,
  .bg-light-grey small {
    font-size: 0.8rem;
  }

  /* Feature check list */
  .feature-check-list li {
    font-size: 0.88rem;
  }

  /* Blog */
  .blog-thumb {
    height: 160px;
  }

  .blog-meta {
    font-size: 0.75rem;
  }

  /* Footer */
  .footer-bottom {
    font-size: 0.78rem;
    padding: 14px 0;
  }

  .footer-links a {
    font-size: 0.83rem;
  }

  /* Page title banners */
  .display-5 {
    font-size: 1.5rem !important;
  }

  .lead {
    font-size: 0.9rem !important;
  }

  /* Form labels */
  .form-label-jf {
    font-size: 0.82rem;
  }

  .form-control-jf {
    padding: 10px 14px;
    font-size: 0.88rem;
  }
}

/* --------------------------------------------------------------------------
   Ultra Small Mobile (Under 375px - iPhone SE, Galaxy S series)
   -------------------------------------------------------------------------- */
@media (max-width: 375px) {
  .section-title {
    font-size: 1.3rem;
  }

  .hero-title {
    font-size: 1.3rem;
  }

  .hero-badge {
    font-size: 0.68rem;
  }

  .navbar-brand-logo {
    height: 36px;
  }

  /* Top bar - just show phone on ultra small */
  .top-bar-info span.d-none {
    display: none !important;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .product-body {
    padding: 14px;
  }

  .product-title {
    font-size: 1rem;
  }

  .cta-banner h2 {
    font-size: 1.2rem;
  }

  /* Footer */
  .footer-area .col-lg-2 {
    margin-bottom: 10px;
  }
}