/* ============================================
   MANGALA AGRI SOLUTIONS — Responsive Styles
   ============================================ */

/* ---------- Tablet (max-width: 1024px) ---------- */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    section { padding: 32px 0; }

    /* Navbar */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -110%;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 75px 20px 30px;
        gap: 0;
        transition: right 0.4s ease;
        box-shadow: -5px 0 30px rgba(0,0,0,0.1);
        overflow-y: auto;
        z-index: 1001;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu > li {
        width: 100%;
    }

    .nav-menu > li > a {
        padding: 14px 0;
        font-size: 1.05rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .hamburger {
        display: flex;
    }

    /* Mega Menu — Mobile */
    .mega-menu,
    .has-mega:hover .mega-menu,
    .has-mega.mega-open .mega-menu {
        position: static !important;
        transform: none !important;
        left: auto !important;
        min-width: auto !important;
        width: 100%;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(240, 244, 240, 0.5);
        opacity: 1;
        visibility: visible;
        transition: max-height 0.4s ease, padding 0.4s ease;
    }

    .mega-menu {
        max-height: 0;
        overflow: hidden;
        padding: 0 0 0 12px;
    }

    .has-mega.mega-open .mega-menu {
        max-height: 500px;
        padding: 8px 0 8px 12px;
    }

    .mega-menu-col ul li a {
        padding: 8px 10px;
        font-size: 0.88rem;
        gap: 6px;
    }

    .mega-menu-col ul li a .mega-icon {
        font-size: 0.85rem;
        width: 18px;
    }

    .mega-menu-footer {
        margin-top: 10px;
        padding-top: 10px;
    }

    .mega-menu-footer a {
        font-size: 0.85rem;
    }

    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Hero */
    .hero { min-height: 500px; padding-top: 90px; }

    /* Why Choose - 2 cols on tablet */
    .why-choose .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    .hero-slide-content h1 { font-size: 2.5rem; }
    .hero-text-side h1,
    .hero-heading-dark { font-size: 2.5rem; }
    .hero-layout-split .hero-inner { grid-template-columns: 1fr; gap: 30px; }
    .hero-layout-left .hero-inner { max-width: 90%; }
    .hero-framed-grid { gap: 30px; }
    .hero-glass-frame img { height: auto; }

    /* Services Grid */
    .services-modern-grid {
        grid-template-columns: 1fr;
    }

    /* Product sub-grid tablet */
    .product-sub-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* About */
    .about-snippet .content-grid,
    .about-story .content-grid,
    .values-section .content-grid,
    .infra-section .content-grid,
    .vm-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .attr-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Team */
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Services Detail */
    .services-detail-grid {
        grid-template-columns: 1fr;
    }

    /* Product Panels */
    .product-panel-content {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-form-section .form-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Page Hero */
    .page-hero {
        min-height: 260px;
    }

    .page-hero h1 {
        font-size: 2.2rem;
    }

    .page-hero .hero-image-frame {
        width: 280px;
    }
}

/* ---------- Mobile Large (max-width: 768px) ---------- */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    section { padding: 32px 0; }

    .container {
        padding: 0 16px;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }

    /* Hero */
    .hero {
        height: 100vh;
        min-height: 580px;
        max-height: 750px;
        padding-top: 90px;
    }

    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
    .hero-slide-content h1 { font-size: 2rem; }
    .hero-slide-content p { font-size: 0.95rem; }
    .hero-text-side h1,
    .hero-heading-dark { font-size: 2rem; }
    .hero-layout-left .hero-inner { padding: 30px 24px; max-width: 100%; }
    .hero-layout-split .hero-inner { grid-template-columns: 1fr; gap: 24px; }
    .hero-stats { grid-template-columns: 1fr 1fr; gap: 12px; }

    /* Framed hero — stack vertically */
    .hero-framed-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-text-side {
        padding-right: 0;
        text-align: center;
    }

    .hero-layout-framed .hero-buttons {
        justify-content: center;
    }

    .hero-checklist {
        display: inline-block;
        text-align: left;
    }

    .hero-glass-frame img { height: auto; }

    .hero-badges-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        width: 100%;
    }

    .hero-badges-row .hero-float-card,
    .hero-badges-row .hero-svc-card {
        min-width: 0;
        overflow: hidden;
        padding: 8px 6px;
        text-align: center;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .hero-svc-card {
        min-width: 0;
    }

    .hero-svc-card strong,
    .hero-float-card .hf-num {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .hero-svc-card span,
    .hero-float-card .hf-label {
        font-size: 0.6rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* Compact subtitle on mobile */
    .hero-subtitle-dark,
    .hero-badge {
        font-size: 0.7rem;
        letter-spacing: 1px;
        padding: 5px 14px;
        margin-bottom: 10px;
    }

    /* Hide checklist on mobile to reduce hero height */
    .hero-checklist {
        display: none;
    }

    /* Reduce hero glass frame on mobile */
    .hero-glass-frame {
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-image-stacked {
        max-width: 100%;
        overflow: hidden;
    }

    .hero-buttons,
    .hero-slide-content .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn,
    .hero-slide-content .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    /* Services */
    .svc-featured-card {
        padding: 28px 20px;
    }

    .svc-featured-img img {
        height: 150px;
    }

    .svc-stack-card {
        padding: 20px 18px;
    }

    /* Team Detail */
    .team-detail-grid {
        grid-template-columns: 1fr;
    }

    /* Why Choose */
    .why-choose .why-grid {
        grid-template-columns: 1fr;
    }

    /* VM Grid */
    .vm-grid {
        grid-template-columns: 1fr;
    }

    /* Team */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* What We Offer */
    .wwo-card {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .wwo-card-reverse {
        direction: ltr;
    }

    .wwo-img img {
        height: 220px;
    }

    /* Service Highlights */
    .svc-highlights-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* BS Features */
    .bs-features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bs-features-grid .bs-feature-card:nth-child(4),
    .bs-features-grid .bs-feature-card:nth-child(5) {
        grid-column: auto;
        margin: 0;
    }

    /* Product Tabs */
    .product-tabs {
        gap: 8px;
    }

    .product-tab {
        padding: 8px 18px;
        font-size: 0.82rem;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    /* Product hero bar */
    .product-hero-bar {
        flex-direction: column;
        text-align: center;
    }

    .product-hero-img {
        width: 100%;
        height: 180px;
    }

    .product-hero-text p {
        text-align: center;
    }

    .product-sub-grid {
        grid-template-columns: 1fr 1fr;
    }

    .product-panel-content {
        grid-template-columns: 1fr;
    }

    /* Wheat decorations hide on mobile */
    .wheat-decor {
        display: none;
    }

    /* Attr grid mobile */
    .attr-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* Icon Circle Grid */
    .icon-circle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
    }

    .icon-circle {
        width: 75px;
        height: 75px;
    }

    /* Contact Cards */
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Testimonials */
    .testimonial-card {
        flex: 0 0 300px;
        padding: 20px 18px;
    }

    .testimonial-text {
        font-size: 0.88rem;
    }

    /* CTA Banner */
    .cta-banner {
        padding: 60px 0;
        background-attachment: scroll;
    }

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

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Floating Buttons */
    .floating-buttons {
        bottom: 20px;
        right: 16px;
    }

    .float-btn {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    /* Page Hero */
    .page-hero {
        min-height: auto;
        padding: 100px 0 40px;
    }

    .page-hero h1 {
        font-size: 1.8rem;
    }

    .page-hero .hero-content .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .page-hero .hero-text {
        text-align: center;
        max-width: 100%;
    }

    .page-hero .breadcrumb {
        justify-content: center;
    }

    .page-hero .hero-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .page-hero .hero-image-frame {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .page-hero .hero-image-frame img {
        height: 200px;
    }

    /* Image heights - mobile */
    .about-story .image-wrapper img {
        height: auto;
    }

    .product-panel-image img {
        height: auto !important;
    }

    .wwo-img img {
        height: 200px;
    }

    /* Navbar brand */
    .navbar-brand img {
        height: 44px;
    }

    /* Footer gap */
    .footer-grid {
        gap: 24px;
    }

    /* Hero framed grid */
    .hero-framed-grid {
        gap: 20px;
    }

    /* Svc featured card */
    .svc-featured-card {
        padding: 28px 20px;
    }

    .svc-featured-num {
        font-size: 3rem;
    }
}

/* ---------- Mobile Small (max-width: 480px) ---------- */
@media (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    section { padding: 32px 0; }

    .hero {
        height: 100vh;
        min-height: 550px;
        max-height: 700px;
        padding-top: 85px;
    }

    .bs-features-grid {
        grid-template-columns: 1fr;
    }

    .bs-toggle-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .hero-content h1 { font-size: 1.6rem; }
    .hero-content p { font-size: 0.9rem; }
    .hero-slide-content h1 { font-size: 1.6rem; }
    .hero-slide-content p { font-size: 0.85rem; }
    .hero-text-side h1,
    .hero-heading-dark { font-size: 1.6rem; }
    .hero-layout-left .hero-inner { padding: 24px 20px; }
    .hero-stat-card { padding: 16px 10px; }
    .hero-stat-card .hero-stat-num { font-size: 1.5rem; }
    .hero-glass-frame img { height: auto; }
    .hero-svc-card { min-width: 140px; padding: 10px 14px; }
    .hero-svc-card strong { font-size: 0.78rem; }
    .hero-service-stack { gap: 8px; }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-card .team-avatar {
        width: 64px;
        height: 64px;
        font-size: 1.4rem;
    }

    .glass-card,
    .glass-card-solid {
        padding: 20px;
    }

    .contact-form-panel {
        padding: 24px;
    }

    .btn {
        padding: 12px 28px;
        font-size: 0.9rem;
    }

    .navbar-brand .brand-name {
        font-size: 1rem;
    }

    .navbar-brand .brand-tagline {
        font-size: 0.6rem;
    }

    .navbar-brand img {
        height: 38px;
    }

    .page-hero h1 {
        font-size: 1.5rem;
    }

    .page-hero {
        padding: 80px 0 30px;
    }

    .page-hero .hero-image-frame {
        max-width: 260px;
    }

    .page-hero .hero-image-frame img {
        height: 160px;
    }

    /* Stats single column */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Product sub grid single column */
    .product-sub-grid {
        grid-template-columns: 1fr;
    }

    /* Icon circle grid single column */
    .icon-circle-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px 12px;
    }

    .icon-circle {
        width: 65px;
        height: 65px;
    }

    /* BS features card 4-5 reset */
    .bs-features-grid .bs-feature-card:nth-child(4),
    .bs-features-grid .bs-feature-card:nth-child(5) {
        grid-column: auto;
        margin: 0;
    }

    /* Number overlays reduce */
    .svc-featured-num { font-size: 2.5rem; }
    .svc-stack-num { font-size: 2rem; }
    .bs-feature-num { font-size: 2rem; }
    .svc-hl-num { font-size: 2rem; }

    /* Hero spacing */
    .hero-framed-grid { gap: 16px; }
    .hero-badges-row { gap: 8px; }
    .hero-float-card { padding: 8px 12px; }
    .hero-float-card .hf-num { font-size: 0.85rem; }
    .hero-float-card .hf-label { font-size: 0.65rem; }
    .hero-float-card .hf-icon { width: 30px; height: 30px; }
    .hero-svc-card .hsvc-icon { width: 28px; height: 28px; border-radius: 8px; }
    .hero-svc-card .hsvc-icon svg { width: 14px; height: 14px; }
    .hero-float-card .hf-icon { width: 28px; height: 28px; border-radius: 8px; }
    .hero-float-card .hf-icon svg { width: 14px; height: 14px; }
    .hero-subtitle-dark,
    .hero-badge {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
        padding: 4px 12px;
        margin-bottom: 6px;
    }

    /* Service featured card */
    .svc-featured-card { padding: 24px 16px; }
    .svc-featured-img img { height: 120px; }

    /* WWO card */
    .wwo-img img { height: 180px; }
    .wwo-content h3 { font-size: 1.1rem; }
    .wwo-card { padding: 16px; gap: 20px; margin-bottom: 24px; }

    /* Attr grid */
    .attr-item { font-size: 0.78rem; }
    .attr-item strong { font-size: 0.72rem; }

    /* Service highlights */
    .svc-highlights-grid { grid-template-columns: 1fr; }

    .popup-box {
        padding: 36px 24px;
    }

    .marquee-item {
        font-size: 0.82rem;
        padding: 0 20px;
    }
}

/* Disable heavy orb animations on mobile for smooth scrolling */
@media (max-width: 768px) {
    body::before,
    body::after {
        display: none;
    }

    .orb-bg {
        display: none;
    }

    .gradient-mesh::before,
    .gradient-mesh-dark::before {
        display: none;
    }
}

/* ---------- Mobile body overflow fix when menu open ---------- */
body.menu-open {
    overflow: hidden;
}

/* Mobile Menu Overlay */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}
