/* ============================================================
   SRS WATER BUREAU — MOBILE STYLES
   Loaded after style.css. Applies only at max-width: 760px.
   Matches the class names in home.php / style.css (not the
   older .gov-* naming from earlier drafts).
   ============================================================ */

@media (max-width: 760px) {

    :root {
        --m-radius: 16px;
        --m-radius-sm: 12px;
        --m-shadow: 0 6px 20px rgba(7, 26, 45, .08);
        --m-shadow-lg: 0 12px 30px rgba(7, 26, 45, .14);
    }

    body {
        padding-bottom: 96px;
        background: var(--surface);
    }

    /* ---------- Header ---------- */

    .topbar {
        display: none;
    }

    header.site {
        box-shadow: 0 2px 14px rgba(3, 19, 32, .2);
    }

    .header-row {
        min-height: 64px;
        padding: 8px 0;
        gap: 12px;
    }

    .crest-link {
        width: 44px;
        height: 44px;
    }

    .brandtext .en {
        font-size: 15px;
    }

    .brandtext .so {
        font-size: 11px;
    }

    .brandtext .region {
        display: none;
    }

    .nav-toggle {
        display: flex;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        background: rgba(255, 255, 255, .08);
        border-color: rgba(255, 255, 255, .18);
    }

    /* ---------- Mobile navigation drawer ---------- */

    /*
     * z-index note: header.site is z-index: 250 (see style.css), so the
     * drawer and its backdrop must sit ABOVE that, not just above the
     * page content — otherwise the sticky header (and anything else
     * using an explicit z-index) keeps painting on top of the open
     * menu instead of being covered by it.
     */

    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 900;
        background: rgba(3, 17, 29, .55);
    }

    .nav-overlay.open {
        display: block;
    }

    nav.primary {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 910;
        background: var(--navy-950);
        overflow-y: auto;
        padding: 88px 22px 40px;
    }

    nav.primary.open {
        display: block;
    }

    nav.primary .wrap {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    nav.primary a {
        min-height: 52px;
        padding: 0 4px;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        font-size: 15px;
        font-weight: 600;
        color: #d9e5ec;
    }

    nav.primary a::after {
        display: none;
    }

    nav.primary a.active {
        color: var(--gold-300);
    }

    nav.primary .search-toggle {
        margin-top: 14px;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 999px;
        min-height: 46px;
    }

    /* ---------- Official notice ---------- */

    .official-notice-inner {
        min-height: 0;
        padding: 12px 0;
        align-items: flex-start;
    }

    .official-notice p {
        font-size: 12px;
    }

    /* ---------- Hero ---------- */

    .hero {
        padding: 44px 0 34px;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        gap: 26px;
    }

    .hero-content .eyebrow {
        margin-bottom: 14px;
        font-size: 9px;
    }

    .hero-content h1 {
        font-size: clamp(30px, 9vw, 42px);
        line-height: 1.04;
        margin-bottom: 12px;
    }

    .hero-content p.lead {
        font-size: 13.5px;
        line-height: 1.65;
        margin-bottom: 22px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hero-actions .btn {
        min-height: 46px;
        padding: 0 10px;
        font-size: 12px;
    }

    .hero-actions .btn-primary {
        grid-column: 1 / -1;
    }

    .hero-panel {
        border-radius: var(--m-radius);
    }

    .hero-panel-body {
        padding: 4px 16px 6px;
    }

    .hero-stat {
        padding: 12px 0;
    }

    .hero-stat strong {
        font-size: 19px;
    }

    /* ---------- Section system ---------- */

    .section {
        padding: 44px 0;
    }

    .section-heading {
        display: block;
        margin-bottom: 22px;
    }

    .section-heading h2 {
        font-size: 26px;
    }

    .section-heading > div:first-child {
        max-width: 100%;
    }

    .section-heading p {
        margin-top: 12px;
        max-width: 100%;
        font-size: 12.5px;
    }

    .section-heading .text-link {
        margin-top: 14px;
    }

    /* ---------- Quick access / info cards ---------- */

    .cards-grid-4 {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .info-card {
        padding: 16px;
        border-radius: var(--m-radius);
        box-shadow: var(--m-shadow);
    }

    .info-card-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 12px;
        font-size: 16px;
    }

    .info-card h3 {
        font-size: 13px;
    }

    .info-card p {
        display: none;
    }

    .card-arrow {
        display: none;
    }

    /* ---------- Stats grid ---------- */

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
        border-radius: var(--m-radius);
        box-shadow: var(--m-shadow);
    }

    .stat-value {
        font-size: 28px;
    }

    .stat-label {
        font-size: 11.5px;
    }

    .stat-note {
        font-size: 10px;
    }

    /* ---------- About / directory ---------- */

    .two-column {
        display: flex;
        flex-direction: column;
        gap: 26px;
    }

    .two-column > div:first-child h2 {
        font-size: 27px;
    }

    .two-column > div:first-child p {
        font-size: 13.5px;
    }

    .directory-panel {
        border-radius: var(--m-radius);
        box-shadow: var(--m-shadow);
    }

    .directory-item {
        padding: 12px 18px;
        font-size: 12.5px;
    }

    .directory-item:hover {
        padding-left: 22px;
    }

    /* ---------- Content grid (projects / news) ---------- */

    .content-grid,
    .publication-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .content-card {
        border-radius: var(--m-radius);
        box-shadow: var(--m-shadow);
    }

    .content-card-body {
        padding: 16px 18px 18px;
    }

    .content-card-body h3 {
        font-size: 15.5px;
    }

    .content-card-body p {
        font-size: 12.5px;
    }

    /* Project status cards */

    .project-content-grid {
        margin-top: 28px;
    }

    .project-status-card {
        padding: 18px;
        border-radius: var(--m-radius);
        box-shadow: var(--m-shadow);
    }

    .project-status-count {
        top: 16px;
        right: 18px;
        font-size: 19px;
    }

    /* ---------- Statistics ---------- */

    .statistics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 28px;
    }

    .statistics-card {
        padding: 14px;
        border-radius: var(--m-radius-sm);
    }

    .statistics-value {
        font-size: 20px;
    }

    .table-wrapper {
        border-radius: var(--m-radius);
    }

    .data-table {
        min-width: 560px;
        font-size: 11px;
    }

    .data-table th,
    .data-table td {
        padding: 11px 12px;
    }

    /* ---------- Announcements ---------- */

    .announcement-item {
        grid-template-columns: 40px 1fr;
        gap: 12px;
        padding: 14px 16px;
        border-radius: var(--m-radius-sm);
        box-shadow: var(--m-shadow);
    }

    .announcement-arrow {
        display: none;
    }

    .announcement-icon {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .announcement-content h3 {
        font-size: 13.5px;
    }

    .announcement-content p {
        font-size: 11.5px;
    }

    /* ---------- Tenders ---------- */

    .tender-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
        border-radius: var(--m-radius);
        box-shadow: var(--m-shadow);
    }

    .tender-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .tender-deadline {
        text-align: left;
        padding-left: 0;
        border-left: 0;
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }

    /* ---------- Publications ---------- */

    .publication-card {
        padding: 16px;
        border-radius: var(--m-radius);
        box-shadow: var(--m-shadow);
    }

    /* ---------- Contact CTA ---------- */

    .section-primary {
        padding: 44px 0 56px;
    }

    .contact-cta {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .contact-cta h2 {
        font-size: 26px;
    }

    .contact-cta p {
        font-size: 13px;
    }

    .contact-actions .btn {
        width: 100%;
    }

    /* ---------- Footer ---------- */

    footer.site-footer {
        padding: 40px 0 20px;
    }

    .foot-grid {
        display: flex;
        flex-direction: column;
        gap: 26px;
    }

    footer.site-footer h5 {
        font-size: 14px;
    }

    footer.site-footer li {
        font-size: 12px;
    }

    .foot-bottom {
        margin-top: 26px;
        padding-top: 14px;
        font-size: 10px;
        line-height: 1.5;
    }

    /* ---------- Projects listing (filters + proj-card) ---------- */

    .proj-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -16px 18px;
        padding: 2px 16px 8px;
        scrollbar-width: none;
    }

    .proj-filters::-webkit-scrollbar {
        display: none;
    }

    .proj-filters span {
        flex: 0 0 auto;
    }

    .proj-card {
        border-radius: var(--m-radius);
        box-shadow: var(--m-shadow);
    }

    /* ---------- Bottom tab bar (optional) ---------- */

    .m-tabbar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
        z-index: 120;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 8px 6px;
        background: rgba(11, 41, 68, .94);
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 22px;
        box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .m-tabbar a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 6px 4px;
        color: rgba(255, 255, 255, .62);
        font-size: 10px;
        font-weight: 600;
        text-decoration: none;
        border-radius: 14px;
    }

    .m-tabbar a i {
        font-size: 18px;
    }

    .m-tabbar a.active {
        color: var(--gold-300);
        background: rgba(255, 255, 255, .06);
    }
}