/* Phone fixes for inner pages (2026-10-12). Scoped to html.inner-v2 and small screens; desktop untouched. */
@media (max-width: 768px) {
    /* long unbroken words like "conferences/symposia/seminars/workshops" wrap instead of widening the page (DHRD) */
    .inner-v2 main :is(p, li, h1, h2, h3, h4, h5, dd, dt, blockquote, figcaption) { overflow-wrap: break-word; }

    /* section headings inside content cards (About Us "About University" and similar) were 1.8em */
    .inner-v2 :is(.about-content, .content-box) h2 { font-size: 1.35rem; line-height: 1.3; margin-bottom: 0.9rem; }

    /* filter bars (Circulars, News, Tenders…): a long <option> no longer stretches the grid past the screen */
    .inner-v2 .filter-form { grid-template-columns: minmax(0, 1fr) !important; }
    .inner-v2 .filter-group { min-width: 0; }
    .inner-v2 .filter-group :is(select, input) { width: 100%; min-width: 0; max-width: 100%; }
    .inner-v2 .filter-group.custom-date-range { grid-column: auto !important; }
}

@media (max-width: 480px) {
    /* Holiday Calendar: slimmer card padding and tighter cells so the four columns fit */
    .inner-v2 .calendar-container { padding: 14px 10px !important; }
    .inner-v2 .calendar-table :is(th, td) { padding: 8px 5px !important; font-size: 0.84rem !important; }
    /* page numbers wrap onto a second line instead of running off the edge (Circulars, News, Tenders…) */
    .inner-v2 .pagination-container { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
}

@media (max-width: 600px) {
    /* Admissions: each programme becomes a small card (Programme / Duration / Eligibility) instead of a squeezed 3-column table */
    .inner-v2 .admissions-table, .inner-v2 .admissions-table tbody, .inner-v2 .admissions-table tr, .inner-v2 .admissions-table td { display: block; width: 100%; }
    .inner-v2 .admissions-table { border: 0; background: transparent; box-shadow: none; }
    .inner-v2 .admissions-table thead { display: none; }
    .inner-v2 .admissions-table tr {
        margin: 0 0 12px; padding: 12px 14px; border: 1px solid #e6edf5; border-radius: 12px; background: #fff;
        box-shadow: 0 1px 2px rgba(0, 30, 60, .05), 0 6px 16px rgba(0, 51, 102, .06);
    }
    .inner-v2 .admissions-table td { border: 0 !important; padding: 3px 0 !important; text-align: left !important; background: transparent !important; }
    .inner-v2 .admissions-table td:first-child { font-weight: 700; font-size: 1.02rem; color: var(--primary-color, #003366); padding-bottom: 6px !important; }
    .inner-v2 .admissions-table td:nth-child(2)::before,
    .inner-v2 .admissions-table td:nth-child(3)::before {
        display: inline-block; min-width: 86px; font-weight: 600; font-size: .78rem; text-transform: uppercase;
        letter-spacing: .04em; color: #6b7a8c;
    }
    .inner-v2 .admissions-table td:nth-child(2)::before { content: "Duration"; }
    .inner-v2 .admissions-table td:nth-child(3)::before { content: "Eligibility"; display: block; margin-top: 2px; }
}

@media (max-width: 400px) {
    /* card grids written as repeat(auto-fit, minmax(280–300px, 1fr)) would be one column here anyway;
       a shrinkable column stops them poking past 320px phones (BOM, EC, AC, Video Gallery, Jobner Krishi…) */
    .inner-v2 :is(.ac-grid, .bom-grid, .ec-grid, .video-grid, .magazine-list, .download-grid, .staff-grid, .staff-list,
                  .event-grid, .activity-grid, .photo-grid, .reports-grid, .resource-list, .glimpse-grid, .efw-grid, .grid) {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    /* long e-mail addresses wrap (dean profile contact lines) */
    .inner-v2 main a[href^="mailto:"] { overflow-wrap: anywhere; }
    .inner-v2 .dean-contact-info p { flex-wrap: wrap; min-width: 0; }
    /* images with an inline min-width (DSW) never exceed the screen */
    .inner-v2 main img { max-width: 100%; }
    .inner-v2 main img[style*="min-width"] { min-width: 0 !important; }
}

@media (max-width: 360px) {
    /* Holiday Calendar on the narrowest phones */
    .inner-v2 .calendar-container { padding: 10px 6px !important; }
    .inner-v2 .calendar-table :is(th, td) { padding: 7px 3px !important; font-size: 0.78rem !important; overflow-wrap: anywhere; }
}

@media (max-width: 480px) {
    /* keep the site's justified paragraphs on phones, but let long words hyphenate at line ends
       so justification doesn't open big gaps between words on narrow screens */
    .inner-v2 :is(.content-section p, .content-section li, .content-box p, .content-box li, .about-content p, .content-text p,
                  .dean-details p, .university-description p, .dean-bio p) {
        text-align: justify; text-justify: inter-word; -webkit-hyphens: auto; hyphens: auto;
        hyphenate-limit-chars: 7 3 3;   /* only split words of 7+ letters, keeping 3+ letters on each side */
    }
}

@media (max-width: 360px) {
    /* Preview / Download button pairs (Circulars, News, Tenders…) wrap instead of overflowing on the narrowest phones */
    .inner-v2 :is(.tender-actions, .news-actions) { flex-wrap: wrap; }
    .inner-v2 :is(.tender-actions, .news-actions) > * { flex: 1 1 auto; min-width: 0; padding-left: 12px; padding-right: 12px; justify-content: center; }
}
