@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box !important; 
    max-width: 100%; 
}

html, body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important; 
}

body {
    background: #f0f2f5;
    color: #222;
    font-family: 'Roboto', sans-serif;
    line-height: 1.8;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
}

/* Force aggressive word wrapping on long text/URLs */
p, a, td, th, li, span, div, h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

a {
    color: #0056b3; 
    font-weight: 600; 
    text-decoration: none; 
    transition: all 0.2s; 
    word-break: break-all; 
}
a:hover { color: #003366; text-decoration: underline; }

.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    display: block;
}

/* Header - Flush with top/sides */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: #0047b3;
    color: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 0; 
    width: 100%;
}

.header a { color: #fff; text-decoration: none; }
.header-left { flex: 1; max-width: 100%; }
.header-left h1.title { margin: 0; padding: 0; font-size: 28px; color: #fff; line-height: 1.2; text-shadow: none; font-weight: 700; border: none; }
.header-left p.about { margin: 5px 0 0 0; padding: 0; font-size: 15px; color: rgba(255,255,255,0.85); font-weight: 400; line-height: 1.4; }

.header-right { display: flex; align-items: center; }
.nav-toggle { display: none; font-size: 28px; cursor: pointer; color: #fff;}
.nav-menu { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-menu a { color: #fff; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 4px; transition: background 0.3s; word-break: normal;}
.nav-menu a:hover { background: rgba(255,255,255,0.15); }

@media (max-width: 768px) {
    .header { flex-direction: column; align-items: flex-start; padding: 15px 20px;}
    .header-left h1.title { font-size: 22px; }
    .header-right { width: 100%; justify-content: flex-end; margin-top: -30px;}
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 75px;
        right: 15px;
        background: #0047b3;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.3);
        z-index: 1000;
        max-width: 90vw;
    }
    .nav-menu.active { display: flex; }
    .nav-toggle { display: block; }
}

/* Main Content Box - Bulletproof width */
.box {
    display: block;
    background: #ffffff;
    padding: 25px;
    margin: 15px 10px; /* 10px safe margin on sides */
    width: auto; /* Automatically fills available width minus margin */
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-top: 4px solid #0052d4;
    overflow-x: hidden; /* Hard clip anything inside that tries to stretch */
}

@media (max-width: 600px) {
    .box { padding: 15px; margin: 15px 10px; }
}

/* Typography */
h1 { font-size: 30px; font-weight: 700; margin-bottom: 20px; line-height: 1.3; color: #003366;}
h2 { font-size: 24px; font-weight: 700; margin-bottom: 15px; margin-top: 30px; border-bottom: 2px solid #e0e0e0; padding-bottom: 8px; color: #003366;}
h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; margin-top: 20px; color: #004080;}
p, li { margin-bottom: 15px; color: #333; }

@media (max-width: 600px) {
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
}

/* App Style Button Grid */
.btn-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}
@media (max-width: 480px) {
    .btn-group { grid-template-columns: 1fr 1fr; }
}

.btn-group .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 10px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 13px;
    text-transform: capitalize;
    letter-spacing: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
}
.btn-group .btn span { margin-top: 8px; }
.btn-group .btn i {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

/* Default Buttons */
.btn, .btn-2 {
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin: 5px 2px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    max-width: 100%;
    white-space: normal; 
    text-align: center;
    word-break: normal; 
    text-decoration: none;
}
.btn:hover, .btn-2:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.25);
}

/* Modern App Icon Colors */
.btn.green { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.btn.green i { stroke: #2e7d32; }
.btn.green:hover { background: #c8e6c9; color: #1b5e20; }

.btn.darkblue { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.btn.darkblue i { stroke: #1565c0; }
.btn.darkblue:hover { background: #bbdefb; color: #0d47a1; }

.btn.lightblue { background: #e0f7fa; color: #00838f; border: 1px solid #b2ebf2; }
.btn.lightblue i { stroke: #00838f; }
.btn.lightblue:hover { background: #b2ebf2; color: #006064; }

.btn.purple { background: #f3e5f5; color: #6a1b9a; border: 1px solid #e1bee7; }
.btn.purple i { stroke: #6a1b9a; }
.btn.purple:hover { background: #e1bee7; color: #4a148c; }

.btn.red { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.btn.red i { stroke: #c62828; }
.btn.red:hover { background: #ffcdd2; color: #b71c1c; }

.btn.orange { background: #fff3e0; color: #ef6c00; border: 1px solid #ffe0b2; }
.btn.orange i { stroke: #ef6c00; }
.btn.orange:hover { background: #ffe0b2; color: #e65100; }

/* Responsive Blocks (FAQs & Footer) */
.responsive-blocks { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 25px; align-items: stretch; }
.responsive-blocks .block {
    flex: 1 1 250px; /* Allows 3 columns in a row natively */
    background-color: #f4f8ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #0052d4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.responsive-blocks .block h3 { color: #003366; font-size: 18px; margin-bottom: 15px; border: none; padding: 0; margin-top: 0;}
.responsive-blocks .block p, .responsive-blocks .block ul { margin: 0; font-size: 16px; color: #444; }
.responsive-blocks .block ul { padding-left: 20px; }

@media (max-width: 768px) {
    .responsive-blocks .block { flex: 1 1 100%; padding: 15px;}
}

/* Related Articles */
.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.related-card {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    text-decoration: none !important;
    color: #333 !important;
    transition: all 0.2s ease;
}
.related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.08);
    border-color: #0052d4;
    background: #fff;
}
.related-card i {
    width: 24px;
    height: 24px;
    stroke: #0052d4;
    margin-right: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}
.related-card h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #003366;
    line-height: 1.3;
}
.related-card p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
    table-layout: auto;
}
th {
    background-color: #0052d4;
    color: #ffffff !important;
    font-weight: 700;
    text-align: left;
    padding: 12px;
    font-size: 15px;
    text-transform: uppercase;
}
td {
    padding: 10px 12px;
    color: #333;
    border-bottom: 1px solid #ddd;
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background-color: #f9f9f9; }
tr:hover { background-color: #f1f1f1; }

/* Images */
img { max-width: 100% !important; height: auto !important; border-radius: 8px; display: block; margin: 20px auto; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.responsive-img { width: 100%; height: auto; }

/* Utility */
.text-center { text-align: center; }
.text-left { text-align: left !important; }
blockquote {
    background: #e9ecef;
    border-left: 5px solid #0052d4;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-style: italic;
    color: #333;
    font-size: 16px;
}

/* Custom Interactive Tools */
.interactive-tool-container {
    background: #ffffff !important;
    border: 1px solid #cce5ff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    border-radius: 8px !important;
    padding: 20px !important;
    border-top: 4px solid #17a2b8 !important;
    width: 100%;
}
.interactive-tool-container h3 { border: none !important; margin-top: 0 !important; }

/* Custom Elements */
.highlight-box {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.highlight-box h2 { border: none; margin-bottom: 10px; color: #856404; font-size: 20px; margin-top: 0; padding-bottom: 0;}
.district-select {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    margin: 15px 0;
    border-radius: 6px;
    border: 2px solid #0052d4;
    font-size: 16px;
    font-weight: 500;
    background-color: #fff;
    color: #333;
    cursor: pointer;
}
.district-select:focus {
    border-color: #003366;
    outline: none;
    box-shadow: 0 0 8px rgba(0,82,212,0.3);
}

.search-container { margin: 20px 0; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); width: 100%;}
.ad-label { font-size: 11px; text-transform: uppercase; text-align: center; color: #888; letter-spacing: 1px; padding: 10px 0; font-weight: bold;}

/* PDF Popups */
.pdf-container{position:relative;max-width:100%;overflow:hidden;border-radius:8px;box-shadow:0 4px 15px rgba(0,0,0,0.15); margin: 20px 0;}
.popup-overlay{display:none;position:fixed;z-index:9999;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,0.8);}
.popup-content{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;padding:25px;background:#fff;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,0.3);max-width:320px;width:95%;box-sizing:border-box}
.pdf-loader-download, .pdf-loader{border:4px solid #f3f3f3;border-top:4px solid #0052d4;border-radius:50%;animation:spin 1s linear infinite; margin:15px auto;}
.pdf-loader-download{width:40px;height:40px;}
.pdf-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:50px;height:50px;z-index:100}
@keyframes spin { 0%{transform:translate(-50%,-50%) rotate(0deg)} 100%{transform:translate(-50%,-50%) rotate(360deg)} }
.pdf-container iframe{width:100%;height:600px;border:none}
@media (max-width: 768px) { .pdf-container iframe{height:400px} }

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF !important;
    border-radius: 50px;
    text-align: center;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
}
.whatsapp-float:hover {
    background-color: #1ebe57;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.5);
}
.whatsapp-float svg {
    fill: #FFF;
    width: 24px;
    height: 24px;
    margin-right: 8px;
}
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 14px;
        border-radius: 50%;
    }
    .whatsapp-float span {
        display: none; /* Hide text on mobile, just show icon */
    }
    .whatsapp-float svg {
        margin-right: 0;
        width: 28px;
        height: 28px;
    }
}

.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
    z-index: 10000;
    padding: 12px 15px;
    border-top: 3px solid #0052d4;
    animation: slideUpPwa 0.5s ease-out;
}
@keyframes slideUpPwa {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.pwa-content {
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    gap: 12px;
}
.pwa-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 0 !important;
}
.pwa-text { flex: 1; }
.pwa-text strong {
    display: block;
    font-size: 15px;
    color: #003366;
    line-height: 1.2;
}
.pwa-text p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #555;
    line-height: 1.3;
}
.pwa-btn {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(40,167,69,0.3);
    text-transform: uppercase;
}
.pwa-btn:hover { background: #218838; }
.pwa-close {
    font-size: 26px;
    color: #999;
    cursor: pointer;
    padding: 0 0 0 8px;
    line-height: 1;
    font-weight: bold;
}
.pwa-close:hover { color: #333; }
