/* Additions to the sipsnew theme for features that were provided by WordPress plugins. */

/* Header: logo, main menu and search on one line on desktop (the theme wrapped the menu
   onto a second row). Below 1200px the theme's own mobile menu takes over unchanged. */
@media only screen and (min-width: 1200px) {
    .logoStrip .headermenu { display: flex; align-items: center; gap: 18px; }
    /* The logo takes all the room the menu and search leave (up to 440px), so it is as
       large as the screen allows instead of leaving an empty gap before the menu. */
    .logoStrip #logo { float: none; flex: 1 1 auto; min-width: 190px; max-width: 440px; margin: 0; }
    .logoStrip #logo a { display: block; }
    .logoStrip #logo img { width: 100% !important; max-width: 440px; height: auto; }

    .logoStrip .menusright { order: 2; flex: 0 0 auto; margin-left: auto; }
    .logoStrip .topSideLinks { float: none; margin-left: 0; }
    .logoStrip .menuPart { float: none; margin: 0; text-align: right; }
    .logoStrip #nav { display: flex; flex-wrap: nowrap; justify-content: flex-end; align-items: center; margin: 0; }
    .logoStrip #nav > li { margin: 0 10px; white-space: nowrap; }
    .logoStrip #nav > li:last-child { margin-right: 0; }
    /* The theme draws the dropdown chevron 15px outside the link (right: -15px), into the
       neighbour's space. Keep it inside the link instead. */
    .logoStrip #nav > li.parent > a { padding-right: 17px; }
    /* Centre the chevron on the text line whatever the link height (the theme used a fixed
       top: 23px, which only matched the full-size bar, not the compact sticky one). */
    .logoStrip #nav > li.parent > a::after { right: 3px; top: 50%; margin-top: -5px; }

    /* Search sits at the end of the row instead of floating over the menu. */
    .logoStrip .searchIcon { order: 3; position: relative; top: auto; right: auto; transform: none; flex: 0 0 45px; }
    .logoStrip .searchIcon .form-wrapper { right: 0; top: 56px; }
    .logoStrip .searchIcon .form-wrapper:before { right: 14px; }

    /* Dropdowns of the right-most menu items open towards the left so they stay on screen. */
    .logoStrip #nav > li:nth-last-child(-n+4) > ul.sub-menu { left: auto; right: 0; }
}
@media only screen and (min-width: 1200px) and (max-width: 1439px) {
    .logoStrip .headermenu { gap: 12px; }
    .logoStrip #nav > li { margin: 0 5px; }
    .logoStrip #nav > li > a { font-size: 14px; }
}

/* Sticky header (desktop): site.js adds .is-stuck to the header after the top strip has
   scrolled away; the logo/menu bar is then pinned to the top in a compact form. */
@media only screen and (min-width: 1200px) {
    .mainheader .logoStrip { transition: padding .25s ease, background-color .25s ease, box-shadow .25s ease; }
    .mainheader .logoStrip #logo,
    .mainheader .logoStrip #logo img { transition: max-width .25s ease; }

    .mainheader.is-stuck .logoStrip {
        position: fixed; top: 0; left: 0; right: 0; z-index: 999;
        padding: 6px 0;
        background: rgb(0 8 57 / 96%);
        box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
        animation: sipsHeaderIn .3s ease;
    }
    .mainheader.is-stuck .logoStrip #logo,
    .mainheader.is-stuck .logoStrip #logo img { max-width: 230px; }
    .mainheader.is-stuck .logoStrip #nav > li > a { line-height: 30px; padding-top: 6px; padding-bottom: 6px; }
    .mainheader.is-stuck .logoStrip .searchIcon { flex-basis: 38px; width: 38px; height: 38px; }
    .mainheader.is-stuck .logoStrip .searchIcon a { width: 38px; height: 38px; line-height: 34px; }
    .mainheader.is-stuck .logoStrip .searchIcon .form-wrapper { top: 48px; }
    .wob .mainheader.is-stuck .logoStrip { background: #323131; }
}
@keyframes sipsHeaderIn { from { transform: translateY(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .mainheader .logoStrip, .mainheader .logoStrip #logo, .mainheader .logoStrip #logo img { transition: none; }
    .mainheader.is-stuck .logoStrip { animation: none; }
}

/* Home page: President and Principal boxes stacked one below the other.
   The theme gave .nationalImg "display:inline-flex; height:95%", which squeezed the second
   box and made the Principal's message spill over the next section. */
.pharmaInner .nationalImg { display: block; height: auto; padding: 0; margin: 0 0 24px; }
.pharmaInner .nationalImg:last-child { margin-bottom: 0; }
.pharmaInner .nationalImg .researchbox {
    text-align: center; background: #fff; border: 1px solid #e3e6ee; border-radius: 16px;
    padding: 20px 18px 16px; box-shadow: 0 4px 14px rgba(15, 41, 85, .06);
}
.pharmaInner .researchbox img { width: 90px; height: 100px; object-fit: cover; object-position: top; }
.pharmaInner .researchbox .shortmsg p { line-height: 1.5; margin-bottom: 12px; }
@media only screen and (max-width: 991px) {
    .pharmaInner .col-lg-4 { margin-top: 30px; }
}
.wob .pharmaInner .nationalImg .researchbox { background: #000; border-color: #fff; }

/* Home page: smaller gap between the Academic Programmes cards and the icon strip below
   (theme: 80px margin + 20px padding). Below 768px the theme puts the slider arrows and
   "View all" link in that space, so the original spacing is kept there. */
@media only screen and (min-width: 768px) {
    .academicWrap { margin-bottom: 24px; }
    .academicLogo { padding-top: 0; }
}

/* Icon strip (Departments, Faculties, ...): the theme fixed the slider at 150px and each
   tile at 100px with a 60px line-height, leaving an empty band under the labels. */
.academicLogo { padding-bottom: 28px; margin-bottom: 0; }

/* The theme's navy ".bluebg" layer hangs below the programmes section; with the tighter
   spacing it reached the Awards / Gallery section and covered its headings. That section
   now has its own background above the overhang, so the navy ends exactly with the icons,
   and the white gap (formerly the icon strip's 50px bottom margin) is its top padding. */
.mediaPublic { position: relative; z-index: 1; background: #fff; padding-top: 50px; }
.wob .mediaPublic { background: #000; }
.academicLogo .swiper-container { height: auto; }
.academicLogo .swiper-slide a { height: auto; line-height: normal; padding: 6px 0; }
.academicLogo .swiper-slide a p { margin-top: 12px; line-height: 1.3; }

/* [pdf-embedder] replacement */
.pdf-embedder { margin: 15px 0; }
.pdf-embedder-frame { display: block; width: 100%; height: 80vh; min-height: 480px; border: 1px solid #ddd; }
.pdf-embedder-download { margin-top: 8px; }

/* Contact form */
.contact-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .form-control { margin-bottom: 4px; }
.contact-form .iq_link_1 { margin: 8px 6px 0 0; padding: 6px 18px; border: 0; border-radius: 4px; color: #fff; }

/* Breadcrumb (the old Breadcrumb NavXT output) */
.breadcrumbWrap ul li span[aria-current] { opacity: .85; }

/* Search / 404 */
.search-page-form { display: flex; gap: 8px; max-width: 560px; margin: 0 auto 25px; }
.search-page-form .form-control { flex: 1; }
.search-page-form button { border: 0; cursor: pointer; }
.search-results { list-style: none; padding: 0; }
.search-results li { padding: 15px 0; border-bottom: 1px solid #e5e5e5; }
.search-results h3 { font-size: 1.2em; margin: 0 0 4px; }
.search-results .search-type { display: inline-block; font-size: .8em; padding: 1px 8px; border-radius: 10px; background: #0f2955; color: #fff; margin-bottom: 6px; }

/* Sitemap */
.sitemap-list { padding-left: 20px; }
.sitemap-list li { margin: 4px 0; }

/* Gallery albums */
.gallery-albums .schemesBox, .partner-grid .partner-tile { margin-bottom: 25px; }
.album-video { position: relative; padding-top: 56.25%; margin: 15px 0; }
.album-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.album-photos .album-photo { display: block; margin-bottom: 20px; text-align: center; color: inherit; }
.album-photos .album-photo img { width: 100%; height: 200px; object-fit: cover; border-radius: 6px; }
.partner-tile { display: block; text-align: center; padding: 15px; border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; }
.partner-tile img { max-width: 100%; height: 90px; object-fit: contain; }
.partner-tile span { display: block; margin-top: 8px; }

/* Event map embed */
.event-map iframe { width: 100%; min-height: 350px; border: 0; }

/* Sitemap page: content sections and the XML sitemap link */
.sitemap-heading { font-size: 20px; margin: 0 0 12px; color: #1b2d5c; }
.aboutInner .sitemap + .sitemap { margin-top: 20px; }
.sitemap-xml { margin: 20px 0 0; text-align: right; }
.sitemap-xml a { font-weight: 600; }