/* =====================================================
   BHAMANE GP - MOBILE RESPONSIVE & CONTACT PAGE FIXES
   ===================================================== */

/* ---- CONTACT PAGE GRID ---- */
.officials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.official-card-box {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 3px 12px rgba(0,0,0,0.07);
    border-left: 4px solid #0056b3;
    transition: transform 0.2s;
}
.official-card-box:hover { transform: translateY(-2px); }
.official-role-line {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0056b3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}
.official-details strong { font-size: 0.9rem; color: #333; display: block; }
.official-details p { font-size: 0.85rem; color: #555; margin: 0.3rem 0 0; }
.contact-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}
.address-box-full {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.emergency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}
.emergency-card {
    background: white;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #dee2e6;
}
.emergency-card strong { display: block; font-size: 0.8rem; color: #dc2626; margin-bottom: 0.2rem; }
.emergency-card span { font-size: 1.2rem; font-weight: 700; color: #111; }

/* ---- CERTIFICATES PAGE ---- */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}
.cert-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.2s;
}
.cert-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,75,135,0.12); }
.cert-title { font-size: 0.85rem; color: #333; font-weight: 600; margin: 0; line-height: 1.4; }
.btn-download-outline {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, #004b87, #0056b3);
    color: white !important;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-download-outline:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,75,135,0.3); }

/* ---- SCHEMES SECTION ON HOME ---- */
.scheme-card:hover { transform: translateY(-3px) !important; }

/* ---- POPULATION SECTION TABLE ---- */
.pop-table-scroll { overflow-x: auto; }
.pop-data-table { min-width: 500px; width: 100%; border-collapse: collapse; }
.pop-data-table th, .pop-data-table td {
    padding: 0.6rem 0.8rem;
    border: 1px solid #e5e7eb;
    font-size: 0.85rem;
    text-align: center;
}
.pop-data-table th { background: #004b87; color: white; font-weight: 600; }
.pop-data-table tr:nth-child(even) { background: #f8f9fa; }
.pop-data-table tr.pop-highlight { background: #e9ecef !important; font-weight: 700; }

/* ---- SCHEMES PREVIEW SECTION ---- */
.schemes-preview-section .scheme-card:hover { transform: translateY(-4px) !important; box-shadow: 0 8px 20px rgba(0,75,135,0.2) !important; }

/* =====================================================
   MOBILE RESPONSIVE BREAKPOINTS
   ===================================================== */

@media (max-width: 768px) {
    /* Header */
    .main-header { padding: 0 !important; }
    .header-content {
        flex-wrap: wrap;
        padding: 0.5rem !important;
        gap: 0.5rem;
    }
    .brand-section { flex: 1; }
    .brand-text h1.village-name { font-size: 1rem !important; }
    .lgd-code { font-size: 0.65rem !important; }
    .logo-img { width: 40px !important; height: 40px !important; }
    .seal-img { width: 35px !important; height: 35px !important; }
    
    /* Leadership Row */
    .leadership-row { overflow-x: auto; }
    .leadership-inline { min-width: max-content; padding: 0.5rem; }
    .leader-img { width: 45px !important; height: 45px !important; }
    .leader-info span { font-size: 0.6rem !important; }
    .leader-info p { font-size: 0.7rem !important; }
    .leader-item { padding: 0.3rem 0.5rem !important; }
    
    /* Navbar */
    .nav-links { flex-wrap: wrap; padding: 0.3rem !important; }
    .nav-links li a { font-size: 0.7rem !important; padding: 0.3rem 0.5rem !important; }
    
    /* Hero Section */
    .hero-section.modern-hero { flex-direction: column !important; min-height: auto !important; padding: 1rem !important; }
    .hero-content { padding: 1rem !important; }
    .hero-title { font-size: 1.5rem !important; }
    .hero-subtitle { font-size: 0.9rem !important; }
    .hero-visual { width: 100% !important; height: 200px !important; margin-top: 1rem; }
    .hero-slider-frame { height: 200px !important; }
    
    /* Features Grid */
    .features-section { 
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
    }
    .feature-card { padding: 0.75rem !important; }
    .feature-icon { font-size: 1.5rem !important; }
    .feature-card h3 { font-size: 0.85rem !important; }
    .feature-card p { font-size: 0.75rem !important; }
    
    /* Schemes Preview */
    .schemes-preview-section .schemes-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Population Section */
    .pop-summ-wrapper { padding: 0 !important; }
    .pop-table-heading { font-size: 1rem !important; }
    
    /* Members Grid */
    .members-grid-home { 
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    .member-card-home { padding: 0.75rem !important; }
    .profile-name { font-size: 0.8rem !important; }
    .profile-role { font-size: 0.7rem !important; }
    .profile-img-home { width: 70px !important; height: 70px !important; }
    
    /* Members Page Grid */
    .members-ref-grid { 
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    .member-ref-card { padding: 1rem !important; }
    .member-img-circle { width: 80px !important; height: 80px !important; }
    
    /* Contact Page */
    .officials-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .emergency-grid { grid-template-columns: repeat(2, 1fr) !important; }
    
    /* Certificates Page */
    .certificates-grid { grid-template-columns: repeat(2, 1fr) !important; }
    
    /* Alerts Grid */
    .alerts-grid { flex-direction: column !important; }
    .alert-card { margin-bottom: 0.75rem; }
    
    /* Footer */
    .footer-grid { 
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }
    
    /* Services Table */
    .modern-table-container { overflow-x: auto; }
    .modern-table { min-width: 500px; font-size: 0.75rem !important; }
    
    /* Revenue Table */
    div[style*="overflow-x: auto"] { -webkit-overflow-scrolling: touch; }
    
    /* Scheme Cards on inner pages */
    .schemes-grid { 
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    .scheme-card { padding: 1rem !important; }
    
    /* Page Titles */
    .page-title { font-size: 1.2rem !important; }
    
    /* Section Headers */
    .section-header { flex-direction: column !important; align-items: flex-start !important; gap: 0.5rem; }
    
    /* GP Services Table on mobile */
    .services-page .modern-table-container { font-size: 0.75rem; }
    
    /* Lightbox */
    #gallery-lightbox { padding: 1rem; }
    .lightbox-content { max-width: 90vw !important; max-height: 70vh !important; }
}

@media (max-width: 480px) {
    /* Very small screens */
    .features-section { grid-template-columns: 1fr !important; }
    .members-grid-home { grid-template-columns: repeat(2, 1fr) !important; }
    .officials-grid { grid-template-columns: 1fr !important; }
    .certificates-grid { grid-template-columns: 1fr !important; }
    .schemes-preview-section .schemes-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .hero-title { font-size: 1.2rem !important; }
    .nav-links li a { font-size: 0.65rem !important; padding: 0.25rem 0.4rem !important; }
}

/* ---- ENSURE CONTENT NEVER OVERFLOWS ---- */
* { box-sizing: border-box; }
img { max-width: 100%; }
.page-container { max-width: 100% !important; overflow-x: hidden; }
.content-wrapper { overflow-x: hidden; }
