/*
 * Jhapa Technical Cooperative Pro - Responsive Styles
 * Mobile-first responsive design
 */

/* Large Desktops (1200px+) */
@media (min-width: 1200px) {
    .jtc-container { max-width: 1280px; }
    .jtc-grid-4 { grid-template-columns: repeat(4, 1fr); }
    .jtc-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Desktops (992px - 1199px) */
@media (max-width: 1199px) {
    .jtc-section { padding: 70px 0; }
    .jtc-grid-4 { grid-template-columns: repeat(3, 1fr); }
    .jtc-grid-3 { grid-template-columns: repeat(2, 1fr); }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .jtc-counter-number { font-size: 40px; }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
    .jtc-section { padding: 60px 0; }
    .jtc-section-sm { padding: 40px 0; }
    .jtc-section-lg { padding: 80px 0; }
    
    .jtc-mobile-toggle { display: flex !important; }
    
    .jtc-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 80%;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
    }
    
    .jtc-nav.active { right: 0; }
    
    .jtc-nav li { width: 100%; }
    
    .jtc-nav a {
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .jtc-nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .jtc-nav li.menu-item-has-children.active > .sub-menu {
        max-height: 500px;
    }
    
    .jtc-grid-2, .jtc-grid-3, .jtc-grid-4 { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .jtc-hero { padding: 80px 0 60px; }
    .jtc-hero h1 { font-size: 2.2rem; }
    .jtc-hero p { font-size: 16px; }
    
    .jtc-calculator { padding: 30px 20px; }
    .jtc-calculator-result .amount { font-size: 28px; }
    
    .jtc-counter-number { font-size: 36px; }
    
    .jtc-header-actions .jtc-btn { 
        padding: 8px 16px; 
        font-size: 13px; 
    }
    
    .jtc-floating-buttons {
        bottom: 15px;
        right: 15px;
    }
    
    .jtc-float-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 767px) {
    .jtc-section { padding: 50px 0; }
    .jtc-section-sm { padding: 30px 0; }
    .jtc-section-lg { padding: 60px 0; }
    
    .jtc-container { padding: 0 15px; }
    
    .jtc-header-top { 
        font-size: 12px; 
        padding: 5px 0;
    }
    
    .jtc-header-top-info {
        font-size: 11px;
        gap: 10px;
    }
    
    .jtc-header-top-info span {
        display: none;
    }
    
    .jtc-header-top-info span:first-child,
    .jtc-header-top-info span:nth-child(2) {
        display: inline;
    }
    
    .jtc-header-main { padding: 15px 0; }
    
    .jtc-logo img { max-height: 45px; }
    .jtc-logo span { font-size: 18px; }
    
    .jtc-header-actions .jtc-search-toggle { 
        padding: 8px; 
    }
    
    .jtc-header-actions .jtc-btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .jtc-hero { padding: 60px 0 40px; text-align: center; }
    .jtc-hero h1 { font-size: 1.8rem; }
    .jtc-hero p { font-size: 15px; }
    .jtc-hero-buttons { 
        justify-content: center;
        gap: 10px;
    }
    
    .jtc-section-title { margin-bottom: 30px; }
    .jtc-section-title h2 { font-size: 1.6rem; }
    .jtc-section-title p { font-size: 14px; }
    
    .jtc-grid-2, .jtc-grid-3, .jtc-grid-4 { 
        grid-template-columns: 1fr; 
    }
    
    .jtc-card { padding: 25px 20px; }
    .jtc-card-icon { 
        width: 60px; 
        height: 60px; 
        font-size: 24px; 
    }
    .jtc-card h3 { font-size: 18px; }
    
    .jtc-counter { padding: 20px 15px; }
    .jtc-counter-number { font-size: 32px; }
    .jtc-counter-label { font-size: 13px; }
    
    .jtc-calculator { padding: 25px 15px; }
    .jtc-calculator h3 { font-size: 18px; }
    .jtc-calculator-result { padding: 20px 15px; }
    .jtc-calculator-result .amount { font-size: 22px; }
    
    .jtc-table { font-size: 14px; }
    .jtc-table th, .jtc-table td { padding: 10px 12px; }
    
    .jtc-table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .jtc-footer { padding: 40px 0 0; }
    .jtc-footer-widget { margin-bottom: 25px; }
    .jtc-footer-widget h4 { font-size: 16px; }
    
    .jtc-footer-bottom { 
        padding: 15px 0; 
        font-size: 13px;
        text-align: center;
    }
    
    .jtc-pagination { gap: 5px; }
    .jtc-pagination a, .jtc-pagination span {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 13px;
    }
    
    .jtc-floating-buttons {
        bottom: 10px;
        right: 10px;
    }
    
    .jtc-float-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .jtc-dark-mode-toggle {
        bottom: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
    }
    
    .jtc-breadcrumb { 
        padding: 12px 0; 
        font-size: 12px; 
    }
    
    .jtc-search-overlay { padding: 20px 0; }
    .jtc-search-form input { 
        font-size: 16px; 
        padding: 12px 50px 12px 15px; 
    }
    
    .jtc-notification {
        left: 10px !important;
        right: 10px !important;
        top: 10px !important;
    }
    
    .jtc-license-card { padding: 25px 20px !important; }
    .jtc-license-header h2 { font-size: 20px !important; }
    .jtc-detail-label { 
        min-width: 100% !important; 
        margin-bottom: 5px;
    }
    .jtc-license-detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .jtc-license-actions { 
        flex-direction: column; 
    }
    .jtc-license-actions .jtc-btn { 
        width: 100%; 
        justify-content: center;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    .jtc-hero h1 { font-size: 1.5rem; }
    .jtc-hero .jtc-btn { 
        width: 100%; 
        margin-bottom: 10px;
    }
    .jtc-hero-buttons { 
        flex-direction: column; 
        width: 100%;
    }
    
    .jtc-counter-number { font-size: 28px; }
    
    .jtc-row { margin: 0 -10px; }
    .jtc-col { padding: 0 10px; }
    
    .jtc-member-form-wrapper { padding: 20px 15px; }
    .jtc-form-control { font-size: 14px; padding: 10px 12px; }
    
    .jtc-newsletter-form { 
        flex-direction: column; 
    }
    
    .jtc-social { 
        justify-content: center; 
    }
}

/* Print Styles */
@media print {
    .jtc-header,
    .jtc-footer,
    .jtc-floating-buttons,
    .jtc-dark-mode-toggle,
    .jtc-pagination,
    .jtc-search-overlay,
    .jtc-social,
    .jtc-newsletter-form {
        display: none !important;
    }
    
    body { 
        background: #fff !important; 
        color: #000 !important;
    }
    
    a { 
        text-decoration: underline; 
        color: #000 !important;
    }
    
    .jtc-section { 
        padding: 20px 0; 
        page-break-inside: avoid;
    }
}

/* High DPI / Retina */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .jtc-logo img,
    .jtc-hero-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark Mode */
[data-theme="dark"] {
    .jtc-header,
    .jtc-card,
    .jtc-calculator,
    .jtc-table,
    .jtc-footer-widget,
    .jtc-license-card {
        background-color: #1a1d23;
        color: #e0e0e0;
    }
    
    .jtc-bg-light {
        background-color: #13151a;
    }
    
    .jtc-form-control {
        background-color: #2a2d33;
        border-color: #3a3d43;
        color: #e0e0e0;
    }
    
    .jtc-form-control:focus {
        border-color: var(--jtc-primary);
    }
    
    .jtc-table th {
        background-color: var(--jtc-primary);
    }
    
    .jtc-table tbody tr:hover {
        background-color: rgba(255,255,255,0.05);
    }
    
    .jtc-nav {
        background-color: #1a1d23;
    }
    
    .jtc-nav .sub-menu {
        background-color: #13151a;
    }
    
    .jtc-breadcrumb {
        background-color: #13151a;
    }
    
    .jtc-search-overlay {
        background: rgba(0,0,0,0.95);
    }
    
    .jtc-mobile-menu {
        background-color: #1a1d23;
    }
}
