/* ==========================================================
   PCET – main.css  (COMMON – load on EVERY page, after bootstrap.min.css)
   0. Brand colours + fonts (used by header & footer on every page)
   1. Header (header.php)
   2. Footer (footer.php)
   3. Media queries (header, footer)
   Home page extra = home.css · Inner pages extra (body tags, breadcrumb, sidebar) = elements.css
   ========================================================== */


/* ---------- 0. BRAND COLOURS + FONTS ---------- */
:root {
  /* Fonts */
  --pcet-font: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;   /* body text on EVERY page (Bootstrap uses it via --bs-body-font-family) */
  --pcet-heading-font: "Nunito", sans-serif;

  /* Brand colours */
  --pcet-blue: #136ad5;
  --pcet-blue-dark: #0f58b3;
  --pcet-navy: #223a58;
  --pcet-navy-deep: #0b2f5e;
  --pcet-amber: #f7a400;
  --pcet-amber-dark: #dc9200;
  --pcet-red: #b4262c;
  --pcet-red-dark: #962025;
  --pcet-text: #394450;
  --pcet-muted: #6b7785;
  --pcet-light-bg: #f5faff;

  /* Bootstrap defaults switched to PCET: body text, headings, links */
  --bs-body-font-family: var(--pcet-font);
  --bs-body-color: var(--pcet-text);
  --bs-body-color-rgb: 57, 68, 80;
  --bs-heading-color: var(--pcet-navy);
  --bs-link-color: #136ad5;
  --bs-link-color-rgb: 19, 106, 213;
  --bs-link-hover-color: #0f58b3;
  --bs-link-hover-color-rgb: 15, 88, 179;
}


/* ---------- 1. HEADER (#header – header.php) ----------
   Desktop:  [ phone | email       ]  CREST  [ Media      Admission Enquiry ]
             [ Home … Student Life ]  CREST  [ Publication … Contact Us     ]
   Phones/tablets: crest + ☰ · phone | email · button · menu underneath */
#header { position: relative; z-index: 1020; line-height: 1.5; font-family: "Montserrat", sans-serif; }
#menubar { background: var(--pcet-navy-deep); border-bottom: 3px solid var(--pcet-amber); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }

/* Info line: phone | email (left) · Media link (right) */
#infoLeft { font-size: 13.5px; color: rgba(255, 255, 255, .85); }
#infoRight a:not(.btn) { font-size: 13.5px; }
#infoLeft a, #infoRight a:not(.btn) { color: rgba(255, 255, 255, .85); text-decoration: none; white-space: nowrap; transition: color .25s; }
#infoLeft a:hover, #infoRight a:not(.btn):hover { color: var(--pcet-amber); }
#infoLeft i, #infoRight a:not(.btn) i { color: var(--pcet-amber); }
#infoLeft i, #infoRight i { margin-right: 4px; }
#infoLeft span { color: rgba(255, 255, 255, .3); margin: 0 10px; }

/* Admission Enquiry button (saffron) */
#infoRight .btn { --bs-btn-color: #0b2f5e; --bs-btn-bg: #f4c430; --bs-btn-border-color: #f4c430; --bs-btn-hover-color: #0b2f5e; --bs-btn-hover-bg: #f4c430; --bs-btn-hover-border-color: #f4c430; --bs-btn-active-color: #0b2f5e; --bs-btn-active-bg: #f4c430; --bs-btn-active-border-color: #f4c430; font-family: inherit; font-size: 13.5px; font-weight: 700; border-radius: 50rem; padding: 5px 16px; box-shadow: 0 4px 14px rgba(247, 164, 0, .35); transition: transform .2s, box-shadow .2s; }
#infoRight .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px #f4c430; }
#infoRight .btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Menu (no blue focus box – keyboard users still see the amber colour/dot)
   Font size = --bs-nav-link-font-size. If a menu half gets too long, main-1.js tightens BOTH menus a little (gaps first, then font) so the crest stays centred. */
#header .navbar { --bs-nav-link-font-size: 15px; --bs-navbar-color: #fff; --bs-navbar-hover-color: var(--pcet-amber); --bs-navbar-active-color: var(--pcet-amber); padding: 0; }
#header .nav-link { position: relative; font-size: var(--bs-nav-link-font-size); font-weight: 500; white-space: nowrap; }
#header .nav-link:focus, #header .nav-link:focus-visible { box-shadow: none; outline: none; }
#header .nav-link:focus-visible { color: var(--pcet-amber); }

/* Crest logo (logo corners 20% – set by Pratik) */
#crest a { color: #fff; }
#header img { object-fit: contain; background: #fff; border: 2px solid #fff; border-radius: 20%; padding: 2px; }
#crest strong { font-size: 26px; font-weight: 800; line-height: 1.05; color: #fff; }
#crest small { font-size: 12px; font-weight: 600; letter-spacing: .12em; white-space: nowrap; color: var(--pcet-amber); }

/* ☰ button (phones/tablets) */
#menubar [data-bs-toggle="collapse"] { color: #fff; font-size: 30px; line-height: 1; padding: 4px 8px; border: 0; }
#menubar [data-bs-toggle="collapse"]:hover, #menubar [data-bs-toggle="collapse"]:focus-visible { color: #fff; background: rgba(255, 255, 255, .12); }

/* Dropdown cards */
#header .dropdown-menu { --bs-dropdown-link-color: var(--pcet-navy); --bs-dropdown-link-hover-color: var(--pcet-blue); --bs-dropdown-link-hover-bg: #e7f0fc; --bs-dropdown-link-active-color: var(--pcet-blue); --bs-dropdown-link-active-bg: #e7f0fc; border: 0; border-top: 3px solid var(--pcet-amber); border-radius: 12px; padding: 8px; min-width: 220px; box-shadow: 0 18px 45px rgba(15, 40, 80, .2); }
#header .dropdown-item { font-size: 15px; font-weight: 500; padding: 10px 14px; border-radius: 8px; }


/* ---------- 2. FOOTER (#footer – footer.php) – heritage ribbon ----------
   Navy + amber like the header; Montserrat like the header. Layout = Bootstrap grid (col-6 col-lg-2 · col-lg-4).
   #footerRibbon: amber folded ribbon sitting on the amber top line (tails behind, small dark folds, stitched edge).
   #footerMark: faint outlined "EXCELLENCE" behind the name (hidden on phones/tablets).
   Headings get a short amber line; links turn amber on hover; the copyright strip (last div) is a darker navy. */
#footer { position: relative; margin-top: 40px; line-height: 1.5; overflow-x: clip; font-family: "Montserrat", sans-serif; font-size: 15px; background: var(--pcet-navy-deep); border-top: 4px solid var(--pcet-amber); }
#footer h3, #footer .h4 { font-family: inherit; color: #fff; margin-top: 0; }
#footer h3::after { content: ""; display: block; width: 36px; height: 3px; margin-top: 10px; border-radius: 2px; background: var(--pcet-amber); }
#footer p { font-family: inherit; color: rgba(255, 255, 255, .82); }
#footer a { color: rgba(255, 255, 255, .82); text-decoration: none; transition: color .2s, background .2s, border-color .2s; }
#footer a:hover, #footer a:focus-visible { color: var(--pcet-amber); }
#footer i { color: var(--pcet-amber); }
#footer address { color: rgba(255, 255, 255, .82); line-height: 1.7; }
#footer iframe { border: 0; }
#footer > div:last-child { background: #071f40; color: rgba(255, 255, 255, .6); }

/* Ribbon: band (div) in front, 2 tails (#footerRibbon > span) behind, 2 folds (div > span) joining them.
   top: -9px centres the whole ribbon (band + lower tails) on the amber line. */
#footerRibbon { position: absolute; left: 50%; top: -9px; z-index: 3; transform: translate(-50%, -50%); white-space: nowrap; }
#footerRibbon > div { position: relative; z-index: 2; padding: 10px 34px 10px 12px; background: linear-gradient(#ffc847, var(--pcet-amber) 60%, #ec9a00); box-shadow: 0 10px 22px rgba(0, 0, 0, .28); }
#footerRibbon > div::after { content: ""; position: absolute; inset: 4px; border: 1px dashed rgba(11, 47, 94, .45); pointer-events: none; }   /* stitched edge */
#footerRibbon img { object-fit: contain; background: #fff; border-radius: 20%; padding: 2px; }
#footerRibbon strong { font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pcet-navy-deep); }
#footerRibbon > span { position: absolute; top: 14px; width: 64px; height: 100%; background: linear-gradient(#e39a00, #c98500); }
#footerRibbon > span:first-child { left: -48px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 24% 50%); }
#footerRibbon > span:nth-child(2) { right: -48px; clip-path: polygon(0 0, 100% 0, 76% 50%, 100% 100%, 0 100%); }
#footerRibbon > div > span { position: absolute; top: 100%; width: 16px; height: 14px; background: #8a5800; }
#footerRibbon > div > span:nth-of-type(1) { left: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); }
#footerRibbon > div > span:nth-of-type(2) { right: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
#footerRibbon { width: max-content; -webkit-text-size-adjust: none; text-size-adjust: none; }   /* ribbon is always as wide as its text; mobile browsers can't enlarge the text */
#footerRibbon img { flex-shrink: 0; }                                                            /* logo never gets squeezed */
#footerRibbon strong { white-space: nowrap; }

/* Faint outlined "EXCELLENCE" behind the name */
#footerMark { position: absolute; left: 50%; top: 60px; transform: translateX(-50%); font-size: 170px; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(247, 164, 0, .16); white-space: nowrap; pointer-events: none; }

/* Social icons: round outline, fill amber on hover */
#footerSocial a { width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .25); }
#footerSocial a:hover, #footerSocial a:focus-visible { background: var(--pcet-amber); border-color: var(--pcet-amber); }
#footerSocial a:hover i, #footerSocial a:focus-visible i { color: var(--pcet-navy-deep); }


/* ==========================================================
   3. MEDIA QUERIES (header, footer)
   ========================================================== */

/* Desktop (≥1200px) */
@media (min-width: 1200px) {
  #header { position: sticky; top: 0; }                 /* whole bar stays at the top while scrolling */
  #menubar .row > .col-xl { min-width: 0; }              /* left & right halves always equal width → crest always in the exact centre */
  #header .navbar { --bs-navbar-nav-link-padding-x: 8px; }  /* leaves room for up to 10 menu items */

  /* Info lines: thin row above each menu half; Media lines up with "Publication" */
  #infoLeft, #infoRight { display: flex; align-items: center; height: 40px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  #infoRight { justify-content: space-between; }
  #infoRight a:not(.btn) { padding-left: 8px; }

  /* Crest badge: starts at the very top and hangs below the bar */
  #crest { position: relative; width: 170px; flex-shrink: 0; }
  #crest a { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 2; background: var(--pcet-navy-deep); border: 3px solid var(--pcet-amber); border-top: 0; border-radius: 0 0 90px 90px; padding: 14px 26px 16px; box-shadow: 0 14px 30px rgba(0, 0, 0, .3); transition: transform .3s; }
  #crest a:hover { transform: translateX(-50%) translateY(3px); }
  #crest img { width: 80px; height: 80px; }
  #crest strong { display: block; margin-top: 6px; font-size: 22px; }

  /* Menu: amber dot under the item (::before – Bootstrap uses ::after for the arrow) */
  #header .nav-link { padding-top: 15px; padding-bottom: 15px; }
  #header .nav-link::before { content: ""; position: absolute; left: 50%; bottom: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--pcet-amber); transform: translateX(-50%) scale(0); transition: transform .25s; }
  #header .nav-link:hover::before, #header .nav-link:focus-visible::before, #header .nav-link.active::before, #header .nav-link.show::before { transform: translateX(-50%) scale(1); }
  #header .dropdown-menu { margin-top: 0; }
}

/* Laptops (1200–1399px): a little tighter so both menu halves fit */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  #header .navbar { --bs-navbar-nav-link-padding-x: 5px; --bs-nav-link-font-size: 13px; }
  #infoLeft, #infoRight a:not(.btn) { font-size: 13px; }
  #infoRight a:not(.btn) { padding-left: 5px; }
  #infoLeft span { margin: 0 7px; }
}

/* Phones & tablets (<1200px) */
@media (max-width: 1199.98px) {
  #crest a { padding: 8px 0; }
  #crest img { width: 52px; height: 52px; }

  /* phone | email and the button: centred lines under the logo; Media sits next to the button */
  #infoLeft { text-align: center; padding: 8px 0 4px; border-top: 1px solid rgba(255, 255, 255, .12); }
  #infoRight { padding: 4px 0 12px; }
  #infoRight a:not(.btn) { margin-right: 16px; }

  /* menu opens as a white list; dropdowns open in place as light panels */
  #menuLeft, #menuRight { background: #fff; margin: 0 calc(var(--bs-gutter-x) * -.5); padding: 0 12px; }
  #menuRight { padding-bottom: 10px; }
  #header .navbar { --bs-navbar-color: #000; --bs-navbar-hover-color: var(--pcet-blue); --bs-navbar-active-color: var(--pcet-blue); }
  #header .navbar-nav { width: 100%; }
  #header .nav-link { padding: 11px 8px; border-bottom: 1px solid #eee; }
  #header .nav-link:focus-visible { color: var(--pcet-blue); }
  #header .dropdown-menu { box-shadow: none; background: #f5faff; margin: 4px 0 8px; min-width: 0; max-width: 100%; }   /* never wider than the screen */
  #header .dropdown-item { white-space: normal; padding: 10px 12px; line-height: 1.4; }            /* long names wrap onto the next line */
  #header .dropdown-menu li + li .dropdown-item { border-top: 1px solid rgba(0, 0, 0, .08); border-radius: 0; }   /* thin see-through grey line between items */
}

/* Tablets & phones (<992px) */
@media (max-width: 991.98px) {
  #footerMark { display: none; }                         /* faint "EXCELLENCE" only on laptops & desktops */
}

/* Phones (<576px) */
@media (max-width: 575.98px) {
  #infoLeft { font-size: 12.5px; }
  #infoLeft i { display: none; }
  #infoLeft span { margin: 0 6px; }

  /* Footer ribbon: smaller so it fits the screen */
  #footerRibbon { top: -7px; }                           /* tails drop less here, so less lift is needed to stay centred */
  #footerRibbon > div { padding: 8px 20px 8px 8px; gap: 10px !important; }
  #footerRibbon img { width: 32px; height: 32px; }
  #footerRibbon strong { font-size: 10.5px; letter-spacing: .03em; }
  #footerRibbon > span { width: 40px; top: 10px; }
  #footerRibbon > span:first-child { left: -28px; }
  #footerRibbon > span:nth-child(2) { right: -28px; }
  #footerRibbon > div > span { width: 12px; height: 10px; }
}

/* Visitors who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  #header .nav-link::before, #infoRight .btn, #crest a { transition: none; }
}