/* 
 * PRUDHVI AGRO SCIENCES LLP - RESPONSIVE STYLING
 * Author: Antigravity AI
 * Description: Mobile-first responsive layouts, drawer menu adaptations, touch targets, and mobile-specific cards.
 */

/* ==========================================================================
   1. Large Screens & Desktops (Up to 1200px)
   ========================================================================== */
@media screen and (max-width: 1200px) {
    .container {
        width: 92%;
    }
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ==========================================================================
   2. Tablets & Small Laptops (Up to 992px)
   ========================================================================== */
@media screen and (max-width: 992px) {
    .section-padding {
        padding: 80px 0;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-img-container {
        max-width: 500px;
        margin: 0 auto;
    }
    .timeline::after {
        left: 31px;
    }
    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }
    .timeline-container::after {
        left: 21px;
        right: auto;
    }
    .timeline-right {
        left: 0;
    }
    .timeline-right::after {
        left: 21px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .contact-info-panel {
        padding: 30px 20px;
    }
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .form-group-full {
        grid-column: span 1;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* ==========================================================================
   3. Medium Screens & Mobile Drawer Trigger (Up to 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* Navigation Adaptation */
    .nav-menu, 
    .header-action-btn {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    
    /* Header branding adjustments */
    .logo-img {
        height: 46px;
    }
    .brand-name {
        font-size: 0.95rem;
    }
    .brand-tagline {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }
    
    /* Hero Section adjustment */
    .hero-title {
        font-size: 2.3rem;
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        gap: 12px;
    }
    .btn {
        width: 100%;
        padding: 14px 28px;
        font-size: 0.95rem;
        min-height: 48px; /* Tappable minimum */
    }
    
    /* Grid Adjustments */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Duplicate table layout block removed to avoid styles collision with premium custom cards below */
    
    /* Form grids adjust */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .form-group-full {
        grid-column: span 1;
    }
    
    /* Gallery adjustment */
    .gallery-grid {
        columns: 2 150px;
    }
    
    /* CTA buttons */
    .inquiry-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .inquiry-buttons .btn {
        width: 100%;
        max-width: 320px;
    }

    /* Force Table to clean Image-less Custom Orange Premium Card layouts on Mobile */
    .micronutrients-table-wrapper {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .micronutrients-table {
        display: block !important;
        width: 100% !important;
        border: none !important;
        background: transparent !important;
    }
    .micronutrients-table thead { 
        display: none !important;
    }
    .micronutrients-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important; /* Perfect visual spacing between card to card */
        width: 100% !important;
        background: transparent !important;
        padding: 0 !important;
    }
    .micronutrients-table tr { 
        background: var(--white) !important;
        border-radius: var(--border-radius-md) !important;
        border: 1px solid var(--border-color) !important;
        /* Premium left border indicator in vibrant orange */
        border-left: 5px solid #d97706 !important; 
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04) !important;
        padding: 24px !important;
        transition: var(--transition-normal) !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important; /* Gap between contents within the card */
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    .micronutrients-table tr:hover {
        transform: translateY(-5px) !important;
        box-shadow: 0 12px 30px rgba(217, 119, 6, 0.08) !important;
        border-color: rgba(217, 119, 6, 0.3) !important;
    }
    .micronutrients-table td { 
        border: none !important;
        padding: 0 !important;
        text-align: left !important;
        display: block !important;
        width: 100% !important;
        background: transparent !important;
    }
    
    /* Disable default labels injection */
    .micronutrients-table td::before {
        display: none !important;
        content: none !important;
    }
    
    /* 1. Chemical Compound Name (Header Title) */
    .micronutrients-table td:nth-of-type(1) {
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        color: var(--primary-color) !important;
        line-height: 1.35 !important;
    }
    .micronutrients-table td:nth-of-type(1)::before {
        content: 'Micronutrient Specifications' !important;
        display: block !important;
        font-size: 0.7rem !important;
        font-weight: 700 !important;
        color: #d97706 !important; /* Custom Orange label */
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-bottom: 6px !important;
    }
    
    /* 2. Commercial Grade Badge */
    .micronutrients-table td:nth-of-type(2) .commercial-grade-badge {
        background: rgba(217, 119, 6, 0.08) !important; /* Light Orange badge background */
        color: #d97706 !important; /* Orange badge text */
        border: 1px solid rgba(217, 119, 6, 0.15) !important;
        font-weight: 700 !important;
        padding: 6px 14px !important;
        border-radius: var(--border-radius-pill) !important;
        font-size: 0.8rem !important;
        display: inline-block !important;
    }
    
    /* 3. Description / Key Functions text */
    .micronutrients-table td:nth-of-type(3) {
        font-size: 0.85rem !important;
        color: var(--text-muted) !important;
        line-height: 1.6 !important;
    }
    
    /* 4. Action Button (Custom Premium Outline Button in Orange) */
    .micronutrients-table td:nth-of-type(4) .micronutrient-action-btn {
        width: 100% !important;
        padding: 12px 20px !important;
        border-radius: var(--border-radius-pill) !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        cursor: pointer !important;
        background: transparent !important;
        color: #d97706 !important; /* Orange text */
        border: 2px solid #d97706 !important; /* Orange outline */
        transition: var(--transition-normal) !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        box-sizing: border-box !important;
    }
    /* Hover triggers high-impact solid orange fill */
    .micronutrients-table tr:hover .micronutrient-action-btn {
        background: #d97706 !important;
        color: var(--white) !important;
        border-color: #d97706 !important;
        box-shadow: 0 6px 15px rgba(217, 119, 6, 0.25) !important;
    }
}

/* ==========================================================================
   4. Portrait Mobile Screens (Up to 480px)
   ========================================================================== */
@media screen and (max-width: 480px) {
    .section-padding {
        padding: 60px 0;
    }
    .section-header {
        margin-bottom: 40px;
    }
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Hero Title adjustment */
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    /* Singular Column Grids */
    .categories-grid {
        grid-template-columns: 1fr;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .why-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* About image offset removal */
    .about-img-overlay {
        bottom: 15px;
        left: 15px;
        padding: 15px 20px;
        max-width: 250px;
        gap: 12px;
    }
    .about-experience-num {
        font-size: 2rem;
    }
    .about-experience-text {
        font-size: 0.75rem;
    }
    
    /* Form Panel Padding */
    .contact-form-panel {
        padding: 30px 20px !important;
    }
    
    /* Timeline padding reduction */
    .timeline-container {
        padding-left: 50px;
    }
    .timeline-container::after {
        left: 11px;
    }
    .timeline-right::after {
        left: 11px;
    }
    .timeline::after {
        left: 21px;
    }
    
    /* Floating button offsets on mobile */
    .floating-actions {
        bottom: 75px; /* Offset to clear the sticky mobile bar */
        right: 15px;
        flex-direction: column !important;
        gap: 8px !important;
    }
    .float-btn {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.15rem !important;
    }
    
    /* Mobile sticky action drawer */
    .mobile-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background: var(--white);
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
        z-index: 996;
        border-top: 2px solid var(--secondary-color);
    }
    .mobile-sticky-action-btn {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        font-weight: 700;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        min-height: 48px;
    }
    .mobile-sticky-action-btn.whatsapp {
        background: #25d366;
        color: var(--white);
    }
    .mobile-sticky-action-btn.call {
        background: var(--primary-color);
        color: var(--white);
    }
    
    /* Modal adjustment */
    .modal-box {
        max-height: 95vh;
    }
    .modal-header {
        padding: 15px 20px;
    }
    .modal-content-scroller {
        padding: 20px;
    }
    .modal-spec-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    .modal-action-bar {
        padding: 15px 20px;
        flex-direction: column;
        width: 100%;
    }
    .modal-action-bar .btn {
        width: 100%;
    }
}

/* ==========================================================================
   5. Hidden Mobile Bar for Desktops
   ========================================================================== */
.mobile-sticky-bar {
    display: none;
}
