/* ═══════════════════════════════════════════════════
   PSEBOpen — CBSE-Style Government Portal
   Professional | Accessible | Information-Dense
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,600;0,700;1,400&family=Noto+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --red:        #1a7a3c;
  --red2:       #157a32;
  --red3:       #22a050;
  --orange:     #e67e22;
  --blue:       #145a32;
  --blue2:      #0e3d22;
  --green:      #1a7a3c;
  --white:      #ffffff;
  --cream:      #f0fff4;
  --light:      #e8f5ec;
  --border:     #b2dfcb;
  --charcoal:   #1c1c1c;
  --gray:       #555;
  --lgray:      #888;
  --nav-height: 110px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: 'Noto Sans', sans-serif; background: var(--cream); color: var(--charcoal); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ══ TOP UTILITY BAR ══ */
.util-bar {
  background: #0d2b1a;
  padding: 0.28rem 0;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  border-bottom: 2px solid var(--red);
}
.util-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem;
}
.util-left { display: flex; align-items: center; gap: 1.2rem; }
.util-right { display: flex; align-items: center; gap: 1rem; }
.util-link { color: rgba(255,255,255,0.75); font-size: 0.7rem; transition: color 0.2s; }
.util-link:hover { color: #ffd700; }
.util-sep { color: rgba(255,255,255,0.2); }
.text-size-btn { background: rgba(255,255,255,0.12); border: none; color: rgba(255,255,255,0.8); cursor: pointer; padding: 0.15rem 0.5rem; border-radius: 3px; font-size: 0.72rem; }
.text-size-btn:hover { background: rgba(255,255,255,0.22); }

/* ══ HEADER ══ */
.site-header {
  background: white;
  border-bottom: 3px solid var(--red);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  position: sticky; top: 0; z-index: 1000;
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0.6rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.header-brand { display: flex; align-items: center; gap: 1rem; }
.header-logo {
  width: 72px; height: 72px; border-radius: 50%;
  overflow: hidden; background: white;
  border: 2px solid var(--border); flex-shrink: 0;
}
.header-logo img { width: 100%; height: 100%; object-fit: contain; }
.header-text {}
.header-name {
  font-family: 'Noto Serif', serif; font-size: 1.55rem; font-weight: 700;
  color: var(--red); line-height: 1.1; letter-spacing: -0.01em;
}
.header-fullname {
  font-size: 0.72rem; color: var(--blue); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.15rem;
}
.header-tagline { font-size: 0.64rem; color: var(--lgray); margin-top: 0.1rem; font-style: italic; }
.header-right { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.header-search {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: 6px; overflow: hidden;
}
.header-search input {
  padding: 0.45rem 0.8rem; border: none; outline: none;
  font-family: 'Noto Sans', sans-serif; font-size: 0.82rem;
  width: 200px; background: #fafafa;
}
.header-search button {
  padding: 0.45rem 0.8rem; background: var(--red); border: none;
  color: white; cursor: pointer; font-size: 0.8rem; transition: background 0.2s;
}
.header-search button:hover { background: var(--red2); }
.header-actions { display: flex; gap: 0.5rem; }
.hdr-btn {
  padding: 0.42rem 0.9rem; border-radius: 5px; font-size: 0.75rem;
  font-weight: 600; letter-spacing: 0.03em; transition: all 0.2s; white-space: nowrap;
}
.hdr-btn-red { background: var(--red); color: white; }
.hdr-btn-red:hover { background: var(--red2); }
.hdr-btn-blue { background: var(--blue); color: white; }
.hdr-btn-blue:hover { background: var(--blue2); }
.hdr-btn-outline { border: 1.5px solid var(--red); color: var(--red); background: transparent; }
.hdr-btn-outline:hover { background: var(--red); color: white; }

/* ══ MAIN NAVBAR ══ */
.main-nav { background: var(--red); }
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: stretch;
}
.nav-item {
  position: relative; display: flex; align-items: center;
}
.nav-link {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.72rem 1.1rem; color: white; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.02em; transition: background 0.2s; white-space: nowrap;
  cursor: pointer;
}
.nav-link:hover, .nav-item:hover > .nav-link { background: var(--red2); }
.nav-link .arrow { font-size: 0.55rem; opacity: 0.75; }
.nav-item.active > .nav-link { background: var(--red2); border-bottom: 3px solid #ffd700; }
.dropdown {
  position: absolute; top: 100%; left: 0; z-index: 500;
  background: white; border: 1px solid var(--border);
  border-top: 3px solid var(--red); min-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: none; flex-direction: column;
}
.nav-item:hover .dropdown { display: flex; }
.dropdown a {
  padding: 0.6rem 1.1rem; font-size: 0.8rem; color: var(--charcoal);
  border-bottom: 1px solid #e8f5ec; transition: all 0.18s; display: flex; align-items: center; gap: 0.5rem;
}
.dropdown a:hover { background: var(--light); color: var(--red); padding-left: 1.4rem; }
.dropdown a::before { content: '›'; color: var(--red); font-size: 0.9rem; }
.hamburger { display: none; padding: 0.7rem 1rem; cursor: pointer; color: white; font-size: 1.2rem; }
.mobile-nav { display: none; background: var(--red2); flex-direction: column; }
.mobile-nav.open { display: flex; }
.mobile-nav-link { padding: 0.7rem 1.2rem; color: white; font-size: 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.1); }

/* ══ MARQUEE ══ */
.ticker-bar {
  background: #fff8f0; border-bottom: 1px solid #f0d8c0;
  padding: 0.38rem 0; overflow: hidden;
  display: flex; align-items: center;
}
.ticker-label {
  background: var(--orange); color: white; padding: 0.2rem 0.9rem;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; white-space: nowrap; flex-shrink: 0; z-index: 1;
}
.ticker-track { display: flex; animation: ticker 35s linear infinite; white-space: nowrap; overflow: hidden; }
.ticker-item { padding: 0 2rem; font-size: 0.75rem; color: var(--charcoal); }
.ticker-item a { color: var(--blue); font-weight: 500; }
.ticker-item a:hover { text-decoration: underline; color: var(--red); }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ══ HERO SLIDER ══ */
.hero-slider {
  position: relative; overflow: hidden;
  height: 420px; background: var(--blue2);
}
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease;
  display: flex; align-items: center; overflow: hidden;
}
.slide.active { opacity: 1; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,30,70,0.85) 0%, rgba(10,30,70,0.55) 50%, transparent 100%); }
.slide-content {
  position: relative; z-index: 2; max-width: 1280px; margin: 0 auto;
  padding: 0 2rem; width: 100%;
}
.slide-tag { display: inline-block; background: var(--orange); color: white; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.2rem 0.7rem; border-radius: 3px; margin-bottom: 0.8rem; }
.slide-title { font-family: 'Noto Serif', serif; font-size: clamp(1.6rem,3.5vw,2.8rem); font-weight: 700; color: white; line-height: 1.2; max-width: 600px; margin-bottom: 0.8rem; }
.slide-desc { font-size: 0.9rem; color: rgba(255,255,255,0.82); max-width: 480px; line-height: 1.7; margin-bottom: 1.4rem; }
.slide-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.4rem; background: var(--red); color: white; border-radius: 4px; font-size: 0.82rem; font-weight: 700; transition: background 0.2s; }
.slide-btn:hover { background: var(--red2); }
.slider-dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; z-index: 10; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.3s; }
.dot.active { background: white; width: 22px; border-radius: 4px; }
.slider-prev, .slider-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; background: rgba(0,0,0,0.35); border: none; color: white; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; transition: background 0.2s; display: flex; align-items: center; justify-content: center; }
.slider-prev { left: 1rem; }
.slider-next { right: 1rem; }
.slider-prev:hover, .slider-next:hover { background: var(--red); }

/* ══ LAYOUT ══ */
.main-container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 1.8rem; padding: 1.8rem 0; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.4rem; }
.four-col { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.2rem; }

/* ══ SECTION HEADERS ══ */
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--red); padding: 0.5rem 0.9rem; margin-bottom: 0;
  border-radius: 4px 4px 0 0;
}
.sec-head h2 { font-family: 'Noto Serif', serif; font-size: 0.88rem; font-weight: 700; color: white; letter-spacing: 0.04em; text-transform: uppercase; display: flex; align-items: center; gap: 0.5rem; }
.sec-head a { font-size: 0.72rem; color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.4); padding: 0.15rem 0.6rem; border-radius: 3px; transition: all 0.2s; }
.sec-head a:hover { background: white; color: var(--red); }

/* ══ LATEST NEWS PANEL ══ */
.news-panel { background: white; border: 1px solid var(--border); border-top: none; }
.news-scroll { max-height: 420px; overflow-y: auto; }
.news-scroll::-webkit-scrollbar { width: 4px; }
.news-scroll::-webkit-scrollbar-track { background: #e8f5ec; }
.news-scroll::-webkit-scrollbar-thumb { background: var(--red); border-radius: 4px; }
.news-item {
  padding: 0.65rem 0.9rem; border-bottom: 1px solid #f0eaee;
  display: flex; gap: 0.6rem; transition: background 0.18s;
}
.news-item:hover { background: #fff5f5; }
.news-bullet { width: 6px; height: 6px; background: var(--red); border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.news-body { flex: 1; min-width: 0; }
.news-link { font-size: 0.82rem; color: var(--charcoal); line-height: 1.5; display: block; transition: color 0.18s; }
.news-link:hover { color: var(--red); }
.news-meta-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.2rem; flex-wrap: wrap; }
.news-date { font-size: 0.68rem; color: var(--lgray); }
.new-tag { background: var(--red); color: white; font-size: 0.58rem; font-weight: 800; padding: 0.05rem 0.35rem; border-radius: 2px; text-transform: uppercase; letter-spacing: 0.04em; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

/* ══ QUICK LINKS PANEL ══ */
.quicklinks-panel { background: white; border: 1px solid var(--border); border-top: none; }
.ql-grid { display: grid; grid-template-columns: 1fr 1fr; }
.ql-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.9rem 0.5rem; border-right: 1px solid #f0eaee; border-bottom: 1px solid #f0eaee;
  text-align: center; transition: all 0.2s; cursor: pointer; text-decoration: none;
}
.ql-item:hover { background: #fff0f0; }
.ql-item:nth-child(even) { border-right: none; }
.ql-icon { font-size: 1.6rem; margin-bottom: 0.35rem; }
.ql-label { font-size: 0.68rem; font-weight: 600; color: var(--charcoal); line-height: 1.35; }

/* ══ PORTAL GRID ══ */
.portal-section { background: var(--light); padding: 1.5rem 0; }
.portal-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 0.8rem; }
.portal-item {
  background: white; border: 1px solid var(--border); border-radius: 6px;
  padding: 0.9rem 0.6rem; text-align: center; transition: all 0.2s;
  cursor: pointer; position: relative; overflow: hidden;
}
.portal-item::before { content:''; position:absolute; bottom:0; left:0; right:0; height:2px; background:var(--red); transform:scaleX(0); transition:transform 0.2s; }
.portal-item:hover { border-color:var(--red); box-shadow:0 4px 16px rgba(26,122,60,0.12); transform:translateY(-2px); }
.portal-item:hover::before { transform:scaleX(1); }
.portal-img { width: 68px; height: 68px; object-fit: cover; margin: 0 auto 0.5rem; border-radius: 4px; }
.portal-name { font-size: 0.68rem; font-weight: 700; color: var(--charcoal); line-height: 1.3; }

/* ══ STATS STRIP ══ */
.stats-strip { background: var(--blue); padding: 1.2rem 0; }
.stats-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: repeat(5,1fr); gap: 0; }
.stat-item { text-align: center; padding: 0.5rem 1rem; border-right: 1px solid rgba(255,255,255,0.15); }
.stat-item:last-child { border-right: none; }
.stat-num { font-family: 'Noto Serif', serif; font-size: 1.6rem; font-weight: 700; color: white; }
.stat-label { font-size: 0.68rem; color: rgba(255,255,255,0.72); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.15rem; }

/* ══ IMPORTANT LINKS ══ */
.imp-links-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.2rem; padding: 1.5rem 0; }
.imp-card {
  background: white; border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; transition: all 0.2s;
}
.imp-card:hover { border-color: var(--red); box-shadow: 0 4px 16px rgba(26,122,60,0.1); }
.imp-card-head { background: var(--blue); padding: 0.55rem 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.imp-card-head span { font-size: 0.8rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.04em; }
.imp-list { padding: 0.3rem 0; }
.imp-item { padding: 0.45rem 0.9rem; border-bottom: 1px solid #e8f5ec; font-size: 0.78rem; display: flex; align-items: center; gap: 0.4rem; transition: all 0.18s; }
.imp-item:hover { background: #fff5f5; color: var(--red); padding-left: 1.1rem; }
.imp-item:last-child { border-bottom: none; }
.imp-item::before { content: '›'; color: var(--red); font-size: 0.9rem; }

/* ══ PHOTO GALLERY ══ */
.gallery-section { padding: 1.5rem 0; }
.gallery-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 180px 180px; gap: 0.6rem; }
.g-item { border-radius: 5px; overflow: hidden; position: relative; cursor: pointer; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.g-item:hover img { transform: scale(1.05); }
.g-item:first-child { grid-row: span 2; }
.g-cap { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.7)); padding: 0.8rem 0.6rem 0.4rem; color: white; font-size: 0.72rem; transform: translateY(100%); transition: transform 0.3s; }
.g-item:hover .g-cap { transform: translateY(0); }

/* ══ FOOTER ══ */
.footer { background: #0a1628; margin-top: 0; }
.footer-top { background: var(--red); padding: 0.6rem 0; }
.footer-top-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.footer-top span { color: white; font-size: 0.78rem; font-weight: 600; }
.footer-top a { color: rgba(255,255,255,0.85); font-size: 0.75rem; transition: color 0.2s; }
.footer-top a:hover { color: #ffd700; }

.footer-main { padding: 2.5rem 0 1rem; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand-col { }
.footer-logo-row { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }
.footer-logo { width: 50px; height: 50px; border-radius: 50%; background: white; padding: 3px; overflow: hidden; }
.footer-logo img { width: 100%; height: 100%; object-fit: contain; }
.footer-brand-name { font-family: 'Noto Serif', serif; font-size: 1.1rem; font-weight: 700; color: white; }
.footer-brand-sub { font-size: 0.65rem; color: rgba(255,255,255,0.55); }
.footer-desc { font-size: 0.78rem; color: rgba(255,255,255,0.5); line-height: 1.75; margin-bottom: 1rem; }
.footer-socials { display: flex; gap: 0.5rem; }
.f-social { width: 30px; height: 30px; border-radius: 4px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); font-size: 0.78rem; transition: all 0.2s; }
.f-social:hover { background: var(--red); color: white; border-color: var(--red); }
.footer-col h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.4); font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul li a { font-size: 0.78rem; color: rgba(255,255,255,0.55); transition: all 0.2s; display: flex; align-items: center; gap: 0.3rem; }
.footer-col ul li a::before { content: '›'; color: var(--red); }
.footer-col ul li a:hover { color: white; padding-left: 3px; }
.footer-bottom { padding: 1rem 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.3); }
.footer-bottom-links { display: flex; gap: 1.2rem; }
.footer-bottom-links a { font-size: 0.72rem; color: rgba(255,255,255,0.35); transition: color 0.2s; }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ══ MISC ══ */
.badge-new { background: var(--red); color: white; font-size: 0.56rem; font-weight: 800; padding: 0.06rem 0.32rem; border-radius: 2px; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle; margin-left: 4px; }
.card-grid-item { background: white; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; transition: all 0.2s; }
.card-grid-item:hover { border-color: var(--red); box-shadow: 0 4px 16px rgba(26,122,60,0.1); transform: translateY(-2px); }
.card-img-wrap { overflow: hidden; height: 160px; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card-grid-item:hover .card-img-wrap img { transform: scale(1.05); }
.card-body { padding: 0.9rem; }
.card-tag { font-size: 0.65rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.3rem; }
.card-title { font-family: 'Noto Serif', serif; font-size: 0.88rem; font-weight: 700; color: var(--charcoal); line-height: 1.4; margin-bottom: 0.3rem; }
.card-date { font-size: 0.68rem; color: var(--lgray); }
.read-more { font-size: 0.75rem; color: var(--red); font-weight: 600; display: inline-flex; align-items: center; gap: 0.2rem; margin-top: 0.5rem; }

/* ══ ACCESSIBILITY BAR ══ */
.access-bar { background: #f0e8e8; border-bottom: 1px solid #e0c8c8; padding: 0.22rem 0; }
.access-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 1rem; }
.access-label { font-size: 0.65rem; color: var(--lgray); text-transform: uppercase; letter-spacing: 0.1em; }
.access-btn { font-size: 0.7rem; padding: 0.1rem 0.5rem; border: 1px solid #ccc; border-radius: 3px; background: white; cursor: pointer; color: var(--gray); transition: all 0.2s; }
.access-btn:hover { background: var(--red); color: white; border-color: var(--red); }

/* ══ RESPONSIVE ══ */
@media(max-width:1100px){
  .portal-grid { grid-template-columns: repeat(4,1fr); }
  .imp-links-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .stats-inner { grid-template-columns: repeat(3,1fr); }
}
@media(max-width:900px){
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
  .four-col { grid-template-columns: 1fr 1fr; }
  .portal-grid { grid-template-columns: repeat(3,1fr); }
  .nav-inner { display: none; }
  .hamburger { display: block; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .g-item:first-child { grid-row: span 1; }
}
@media(max-width:640px){
  .header-inner { flex-wrap: wrap; gap: 0.8rem; }
  .header-right { width: 100%; justify-content: space-between; }
  .header-search input { width: 140px; }
  .three-col { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: repeat(2,1fr); }
  .stats-inner { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .imp-links-grid { grid-template-columns: 1fr; }
  .util-bar { font-size: 0.65rem; }
  .hero-slider { height: 300px; }
  .slide-title { font-size: 1.3rem; }
}
