/*
Theme Name: Sara College
Theme URI: https://saracomputers.in
Author: Sara Computers
Author URI: https://saracomputers.in
Description: Government college website theme (bilingual Tamil / English) modelled on gascuthiramerur.ac.in - blue header, dropdown mega menu, live menu search, scrolling important-notice ticker, banner slider and a scrolling notifications panel. Notifications are managed from the "Notifications" menu in WordPress admin.
Version: 2.1.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sara-college
*/


/* =========================================================
   CONTENTS
   1.  Variables & base
   2.  Header
   3.  Navigation
   4.  Info bars (location, ticker)
   5.  Home: banner + notifications
   6.  Page layout & cards
   7.  Content typography & tables
   8.  Bilingual columns, contact, notices
   9.  Staff directory
   10. Gallery
   11. Buttons
   12. Footer
   13. Templates & alignment
   14. Responsive (largest to smallest)
   15. Accessibility & print
   ========================================================= */


/* ---------- 1. Variables & base ---------- */
:root {
  --primary: #004080;
  --primary-hover: #0066cc;
  --primary-dark: #003366;
  --navy: #00008b;
  --alert: #d90000;
  --accent: #1e8449;
  --bg: #f4f4f4;
  --text: #333;
  --name-color: #0033cc;
  --border: #e3e8ef;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(16, 40, 80, .08);
  --font-body: "Inter", "Noto Sans Tamil", "Latha", "Nirmala UI", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Poppins", "Noto Sans Tamil", "Latha", "Nirmala UI", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-width: 320px;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.3; }
button, input, select, textarea { font-family: inherit; }

.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; background: #fff; padding: 8px 12px; z-index: 9999; }


/* ---------- 2. Header ---------- */
.site-header { background: var(--primary); color: #fff; position: relative; z-index: 100; }

.header-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 10px 20px; max-width: 1400px; margin: 0 auto;
}

.custom-logo-link { display: block; flex-shrink: 0; }
.site-logo img,
.custom-logo { width: 80px; height: auto; display: block; background: #fff; border-radius: 4px; }

.college-name {
  background: #fff; color: var(--name-color); font-family: var(--font-head); font-weight: 600; font-size: clamp(14px, 1.7vw, 19px);
  text-align: center; padding: 10px 20px; border-radius: 5px;
  flex: 1; max-width: 760px; line-height: 1.5;
}
.college-name a { color: inherit; text-decoration: none; }

.header-search { position: relative; width: 240px; }
.search-bar { display: flex; align-items: center; background: #fff; border: 2px solid #ddd; border-radius: 20px; padding: 4px 6px; }
.search-bar input[type=search] { flex: 1; min-width: 0; border: none; outline: none; padding: 5px 8px; font-size: 14px; background: transparent; }
.search-bar button { border: none; background: transparent; cursor: pointer; font-size: 16px; padding: 4px 6px; }

.results-list {
  list-style: none; position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  background: #fff; border: 1px solid #ddd; border-radius: 5px;
  display: none; max-height: 240px; overflow-y: auto; z-index: 1100;
}
.results-list li a { display: block; padding: 8px 10px; font-size: 14px; color: #000; text-decoration: none; border-bottom: 1px solid #eee; }
.results-list li a:hover,
.results-list li a:focus { background: #f0f0f0; }
.results-list .go-home a { font-weight: bold; }

.menu-toggle { display: none; background: transparent; border: 1px solid #fff; color: #fff; font-size: 18px; padding: 6px 14px; border-radius: 4px; cursor: pointer; }


/* ---------- 3. Navigation ---------- */
.main-nav { background: var(--primary); border-top: 1px solid rgba(255, 255, 255, .25); }

.main-menu { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; max-width: 1400px; margin: 0 auto; }
.main-menu li { position: relative; }

.main-menu > li > a { display: block; color: #fff; text-decoration: none; padding: 12px 15px; font-size: 15px; font-weight: 500; transition: .3s; }
.main-menu > li:hover > a,
.main-menu > li:focus-within > a,
.main-menu > li.current-menu-item > a { background: var(--primary-hover); }
.main-menu > li.menu-item-has-children > a::after { content: " \25BC"; font-size: 10px; }

.main-menu .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 260px;
  background: var(--primary-hover); list-style: none; z-index: 1000;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .25); max-height: 70vh; overflow-y: auto;
}
.main-menu li:last-child .sub-menu,
.main-menu li:nth-last-child(2) .sub-menu { left: auto; right: 0; }

.main-menu li:hover > .sub-menu,
.main-menu li:focus-within > .sub-menu,
.main-menu li.open > .sub-menu { display: block; }

.main-menu .sub-menu a { display: block; color: #fff; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); font-size: 14px; }
.main-menu .sub-menu a:hover { background: var(--primary-dark); }


/* ---------- 4. Info bars ---------- */
.location-info {
  text-align: center; font-size: 14px; font-weight: bold; color: #fff; background: var(--navy);
  padding: 6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
}

.ticker {
  background: var(--alert); color: #fff; font-weight: bold; white-space: nowrap; overflow: hidden;
  display: flex; align-items: center;
  padding: 10px env(safe-area-inset-right) 10px env(safe-area-inset-left);
}
.ticker-label { padding: 0 14px; flex-shrink: 0; }
.ticker-viewport { overflow: hidden; flex: 1; min-width: 0; position: relative; }
.ticker-track { display: inline-block; padding-left: 100%; animation: ticker var(--ticker-dur, 30s) linear infinite; will-change: transform; }
.ticker:hover .ticker-track,
.ticker.is-paused .ticker-track,
.ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker a { color: #ffeb3b; text-decoration: underline; margin-right: 40px; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* pause / play button used in ticker and notifications */
.motion-btn {
  background: rgba(255, 255, 255, .18); color: inherit; border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 4px; width: 30px; height: 26px; margin: 0 10px; cursor: pointer;
  font-size: 13px; line-height: 1; flex-shrink: 0;
}
.motion-btn:hover { background: rgba(255, 255, 255, .32); }


/* ---------- 5. Home: banner + notifications ---------- */
.main-container { display: flex; gap: 20px; margin: 20px auto; padding: 0 20px; max-width: 1400px; align-items: flex-start; }
.home-welcome { max-width: 1400px; margin: 0 auto 24px; padding: 0 20px; }

.banner-container { flex: 2; height: 500px; position: relative; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 10px rgba(0, 0, 0, .1); background: #ddd; }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease-in-out; }
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-slide .caption { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); color: #fff; padding: 30px 20px 18px; font-size: 18px; font-weight: bold; }
.banner-dots { position: absolute; bottom: 10px; right: 14px; display: flex; gap: 6px; z-index: 5; }
.banner-dots button { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #fff; background: transparent; cursor: pointer; padding: 0; }
.banner-dots button.active { background: #fff; }

.notification-container { flex: 1; max-width: 420px; min-width: 260px; height: 500px; background: #f9f9f9; border-radius: 8px; box-shadow: 0 4px 10px rgba(0, 0, 0, .1); padding: 15px; display: flex; flex-direction: column; }
.notification-title { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 20px; font-weight: bold; color: var(--alert); text-align: center; margin-bottom: 10px; }
.notification-title .motion-btn { color: var(--alert); border-color: var(--alert); background: #fff; margin: 0; }
.notification-box { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ccc #f9f9f9; }
.notification-box.is-scrolling { overflow: hidden; }
.notification-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.notification-item { padding: 10px; background: #fff; border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, .1); }
.notification-item a { text-decoration: none; color: #333; font-weight: bold; font-size: 14px; }
.notification-item a:hover { color: #007bff; }
.notification-item .tag { color: var(--alert); font-size: 12px; margin-left: 4px; }
.notification-more { text-align: center; margin-top: 10px; font-weight: bold; }
.notification-more a { text-decoration: none; }


/* ---------- 6. Page layout & cards ---------- */
.site-content { max-width: 1200px; margin: 25px auto; padding: 0 20px; }

.content-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); padding: 28px; margin-bottom: 24px; }

.page-layout { display: block; }
.page-layout.has-nav { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.page-layout .content-card { margin-bottom: 0; min-width: 0; }

/* sidebar section menu */
.section-nav { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); overflow: hidden; position: sticky; top: 12px; }
.section-nav summary { background: var(--primary); color: #fff; font-weight: bold; padding: 12px 14px; cursor: pointer; list-style: none; }
.section-nav summary::-webkit-details-marker { display: none; }
.section-nav summary::after { content: " \25BE"; float: right; }
.section-nav ul { list-style: none; }
.section-nav li a { display: block; padding: 10px 14px; border-bottom: 1px solid #eee; text-decoration: none; color: #222; font-size: 14px; }
.section-nav li a:hover { background: #eef4fb; }
.section-nav li.current a { background: #e3eefb; color: var(--primary); font-weight: bold; border-left: 4px solid var(--primary); }

.entry-title { color: var(--primary); margin-bottom: 14px; font-size: clamp(22px, 3vw, 30px); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.entry-title a { text-decoration: none; }
.entry-meta { font-size: 13px; color: #777; margin-bottom: 12px; }
.edit-link { font-size: 13px; margin-top: 16px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--primary); border-radius: 4px; text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; }


/* ---------- 7. Content typography & tables ---------- */
.entry-content > h2:first-child,
.entry-content > h3:first-child { margin-top: 0; }
.entry-content h2,
.entry-content h3 { color: var(--primary); margin: 20px 0 10px; line-height: 1.35; }
.entry-content h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
.entry-content h3 { font-size: clamp(1.05rem, 1.8vw, 1.2rem); }

.entry-content p,
.entry-content ul,
.entry-content ol { margin-bottom: 14px; }
.entry-content p { text-align: left; }
.entry-content ul,
.entry-content ol { padding-left: 24px; }
.entry-content li { margin-bottom: 4px; }
.entry-content a { overflow-wrap: anywhere; }
.entry-content hr { border: 0; border-top: 2px solid var(--accent); margin: 16px 0; }
.entry-content img,
.entry-content video,
.entry-content iframe { max-width: 100%; }
.entry-content iframe { border: 0; }
.entry-content .indent { margin-left: 20px; margin-bottom: 4px; text-align: left; }
.entry-content .indent + p:not(.indent) { margin-top: 14px; }

.has-text-align-center { text-align: center !important; }
.text-accent { color: var(--accent); font-weight: bold; font-size: 1.1em; }
.text-alert { color: var(--alert); font-weight: bold; }
.fw-bold { font-weight: bold; }

/* tables */
.entry-content table { border-collapse: collapse; width: 100%; margin-bottom: 16px; }
.entry-content th,
.entry-content td { border: 1px solid #d5d5d5; padding: 10px; text-align: left; vertical-align: top; }
.entry-content th { background: #e9eef5; color: #111; }
.entry-content thead th { background: var(--accent); color: #fff; }
.entry-content tbody tr:nth-child(even) { background: #fafafa; }
.entry-content table.has-text-align-center th,
.entry-content table.has-text-align-center td { text-align: center; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; border-radius: 6px; }
.table-wrap table { min-width: 520px; margin: 0; }
.wp-block-table { overflow-x: auto; }
.wp-block-table table { width: 100%; }

.wp-block-image img,
.entry-content figure img { height: auto; max-width: 100%; }


/* ---------- 8. Bilingual columns, contact, notices ---------- */
/* legacy markup */
.bilingual { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.bilingual + .bilingual { margin-top: 18px; border-top: 2px solid #eee; padding-top: 18px; }
.bilingual .col { padding: 6px 24px; min-width: 0; }
.bilingual .col p { text-align: left; }
.bilingual .col-en { border-right: 2px solid #eee; }
.bilingual .col-ta { font-size: 1.02em; }
.bilingual .col h2 { text-align: center; margin-top: 0; font-size: 1.4rem; }
.bilingual .col-en h2 { color: #d35400; }
.bilingual .col-ta h2 { color: #2980b9; }

/* block-editor markup */
.wp-block-columns { gap: 24px 32px; margin-bottom: 1.2em; }
.wp-block-column p,
.wp-block-column li { text-align: left; }
.bilingual-cols { align-items: flex-start; }
.bilingual-cols > .col-en { border-right: 2px solid #eee; padding-right: 28px; }
.bilingual-cols > .col-ta { font-family: "Noto Sans Tamil", "Latha", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.bilingual-cols h2 { margin-top: 0; }

/* Pages with a table in each language (e.g. Fees Details):
   full-width, English table first, Tamil table second */
.bilingual-cols:has(table) { display: block; }
.bilingual-cols:has(table) > .wp-block-column { width: 100%; max-width: 100%; margin: 0; }
.bilingual-cols:has(table) > .col-en { border-right: 0; border-bottom: 2px solid #e3e8ef; padding: 0 0 24px; margin-bottom: 24px; }
.bilingual-cols:has(table) > .col-ta { padding: 0; }
.bilingual-cols:has(table) .table-wrap { margin-bottom: 0; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.contact-card p { margin-bottom: 8px; text-align: left; }
.map-embed { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #ddd; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* notice lists */
.notice-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.notice-row a { font-weight: bold; text-decoration: none; }
.notice-row time { color: #777; font-size: 13px; white-space: nowrap; }
.notice-page-list { list-style: none; padding: 0 !important; }
.notice-page-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eee; }
.notice-page-list a { font-weight: bold; text-decoration: none; }
.notice-page-list time { color: #777; font-size: 13px; white-space: nowrap; }


/* ---------- 9. Staff directory ----------
   Photo grid that adapts to every screen:
   desktop 3 columns | tablet 2 | phone 1.
   Cards are never narrower than 240px, so the
   grid needs no breakpoints. Block markup:
   .faculty-grid > .faculty-card > figure + h3 + p...
   WordPress may wrap a Group block's children in
   <div class="wp-block-group__inner-container">.
   That wrapper is made "invisible" below, otherwise
   every card ends up stacked inside ONE grid cell
   (a single narrow column on desktop).
   ------------------------------------------ */
.faculty-grid > .wp-block-group__inner-container,
.faculty-card > .wp-block-group__inner-container { display: contents; }

.faculty-grid,
.wp-block-group.faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: clamp(14px, 2vw, 24px);
  /* stay full width even if a parent (flex/grid) tries to shrink it */
  grid-column: 1 / -1;
  flex: 1 1 100%;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  min-width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  float: none;
  align-items: stretch;
}

.faculty-grid .faculty-card { margin: 0; }

.faculty-card {
  display: flex;
  flex-direction: column;
  grid-column: auto;
  position: static;
  float: none;
  min-width: 0;
  padding: 0;
  opacity: 1;
  visibility: visible;
  transform: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
  .faculty-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(16, 40, 80, .15); }
}

/* photo */
.faculty-card .wp-block-image {
  margin: 0;
  width: 100%;
  background: linear-gradient(180deg, #eef3f9, #dde6f2);
  border-bottom: 3px solid var(--primary);
}
.faculty-card img,
.faculty-card .wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
}

/* details */
.faculty-card h3 {
  margin: 14px 16px 8px;
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--primary);
  overflow-wrap: anywhere;
}
.faculty-card p {
  margin: 0 16px 8px;
  font-size: .9rem;
  line-height: 1.45;
  color: #2b2b2b;
  text-align: left;
  overflow-wrap: anywhere;
}
.faculty-card p strong {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b7a90;
}
.faculty-card p:last-child { margin-bottom: 16px; }

/* legacy markup (.faculty-info wrapper) */
.faculty-info { padding: 12px 14px; }
.faculty-info h3 { margin: 0 0 6px; font-size: 1.02rem; color: var(--primary); }
.faculty-info p { margin: 0 0 4px; font-size: .9rem; text-align: left; }


/* ---------- 10. Gallery ---------- */
/* legacy markup */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.image-box { background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); transition: transform .2s; }
.image-box:hover { transform: translateY(-3px); }
.image-box a { display: block; }
.image-box img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 5px; display: block; background: #e9eef5; }

/* block-editor gallery */
.wp-block-gallery.has-nested-images figure.wp-block-image { border: 1px solid #e3e8ef; border-radius: 8px; padding: 6px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.wp-block-gallery.has-nested-images figure.wp-block-image img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; border-radius: 5px; background: #e9eef5; }


/* Document links: small arrow shows they open in a new tab */
.entry-content a[href$=".pdf"]::after,
.entry-content a[href*="drive.google.com"]::after { content: " \2197"; font-size: .85em; }

/* ---------- 11. Buttons ---------- */
.button,
.wp-block-button__link { display: inline-block; background: var(--primary); color: #fff; padding: 8px 18px; border-radius: 4px; text-decoration: none; }
.button:hover,
.wp-block-button__link:hover { background: var(--primary-hover); color: #fff; }


/* ---------- 12. Footer ---------- */
.site-footer { background: var(--primary-dark); color: #dfe8f5; margin-top: 30px; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; max-width: 1400px; margin: 0 auto; padding: 30px 20px; }
.site-footer h3 { color: #fff; margin-bottom: 10px; font-size: 17px; }
.site-footer a { color: #ffeb3b; text-decoration: none; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { background: #00264d; text-align: center; padding: 12px 20px; font-size: 13px; }


/* ---------- 13. Templates & alignment ---------- */
.page-fullwidth .site-content { max-width: none; padding: 0; }
.page-fullwidth .content-card { border-radius: 0; box-shadow: none; }
.page-canvas { margin: 0; padding: 0; }
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }


/* =========================================================
   14. RESPONSIVE  (largest to smallest, order matters)
   ========================================================= */

/* very wide screens */
@media (min-width: 1500px) {
  .header-top,
  .main-menu,
  .main-container,
  .footer-widgets,
  .home-welcome { max-width: 1500px; }
  .site-content { max-width: 1300px; }
}

/* tablets: sidebar stacks above content */
@media (max-width: 1000px) {
  .page-layout.has-nav { grid-template-columns: minmax(0, 1fr); }
  .section-nav { position: static; }
  .main-menu > li > a { padding: 12px 10px; font-size: 14px; }
}

/* mobile menu + stacked home layout */
@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .header-top { flex-wrap: wrap; }
  .college-name { order: 3; flex-basis: 100%; max-width: none; font-size: 15px; }
  .header-search { width: 100%; order: 4; }

  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-menu { flex-direction: column; }
  .main-menu > li > a { padding: 12px 20px; }
  .main-menu .sub-menu { position: static; display: none; box-shadow: none; min-width: 0; }
  .main-menu li:hover > .sub-menu,
  .main-menu li:focus-within > .sub-menu { display: none; }
  .main-menu li.open > .sub-menu { display: block; }

  .main-container { flex-direction: column; }
  .banner-container,
  .notification-container { width: 100%; max-width: none; flex: none; }
  .banner-container { height: 300px; }
  .notification-container { height: 420px; }
}

/* small tablets */
@media (max-width: 800px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bilingual,
  .contact-grid { grid-template-columns: 1fr; }
  .bilingual .col { padding: 6px 0; }
  .bilingual .col-en { border-right: 0; border-bottom: 2px solid #eee; margin-bottom: 14px; padding-bottom: 14px; }
}

/* WordPress block breakpoint */
@media (max-width: 781px) {
  .bilingual-cols > .col-en { border-right: 0; border-bottom: 2px solid #eee; padding: 0 0 16px; margin-bottom: 6px; }
  .wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image) {
    width: calc(50% - var(--wp--style--gallery-gap-default, 16px) / 2);
  }
}

/* phones */
@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-content { padding: 0 12px; margin: 14px auto; }
  .content-card { padding: 16px; }
  .entry-title { font-size: 22px; }
  .entry-content p { text-align: left; }

  .site-logo img,
  .custom-logo { width: 56px; }
  .college-name { font-size: 14px; padding: 8px 10px; }
  .menu-toggle { min-height: 44px; }
  .main-menu > li > a,
  .main-menu .sub-menu a { min-height: 44px; display: flex; align-items: center; }
  .results-list { max-height: 200px; }

  .banner-container { height: 210px; }
  .notification-container { height: 380px; }
  .notice-page-list li,
  .notice-row { flex-direction: column; gap: 2px; }
  .footer-widgets { padding: 22px 14px; }
}

@media (max-width: 600px) {
  .motion-btn { margin: 0 6px; }
  .ticker-label { padding: 0 8px; }
}

/* small phones: single column everywhere */
@media (max-width: 500px) {
  .gallery { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image) { width: 100%; }

  .entry-content th,
  .entry-content td { padding: 8px 6px; font-size: .92rem; }
  .notification-item a { font-size: 15px; }
  .location-info { font-size: 12.5px; }
  .ticker { font-size: 14px; }
}

@media (max-width: 380px) {
  .header-top { padding: 8px 10px; }
  .site-content { padding: 0 8px; }
  .content-card { padding: 12px; }
}


/* =========================================================
   15. ACCESSIBILITY & PRINT
   ========================================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .banner-slide,
  .image-box { transition: none; }
}

@media print {
  .site-header,
  .ticker,
  .location-info,
  .section-nav,
  .site-footer,
  .menu-toggle,
  .edit-link { display: none !important; }

  body { background: #fff; }
  .content-card { box-shadow: none; padding: 0; }
  .faculty-grid,
  .gallery { display: block; }
  .faculty-card,
  .image-box { break-inside: avoid; margin-bottom: 10px; }
}
