/* Punjab College of Law — public site stylesheet
   Brand: primary #1F2937 (white text on it), secondary #E81E23 (white text on it) */

:root {
  --primary: #1f2937;
  --primary-dark: #111827;
  --primary-light: #374151;
  --primary-tint: #f3f4f6;
  --secondary: #e81e23;
  --secondary-dark: #b91c1c;
  --secondary-tint: #fee2e2;
  --on-primary: #ffffff;
  --on-secondary: #ffffff;
  --ink: #171a2b;
  --muted: #5b6172;
  --border: #e3e7f5;
  --bg: #f6f7fc;
  --card: #ffffff;
  --shadow: 0 4px 18px rgba(31, 41, 55, 0.10);
  --shadow-lg: 0 18px 44px rgba(31, 41, 55, 0.18);
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
h1, h2, h3, h4, h5 { font-family: 'Poppins', 'Open Sans', sans-serif; font-weight: 700; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
ul { padding: 0; margin: 0; list-style: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.btn {
  display: inline-block;
  padding: .7em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-dark); color: var(--on-primary); box-shadow: var(--shadow-lg); }
.btn-secondary { background: var(--secondary); color: var(--on-secondary); }
.btn-secondary:hover { background: var(--secondary-dark); color: var(--on-secondary); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; border-color: var(--on-primary); color: var(--on-primary); }
.btn-outline:hover { background: rgba(255,255,255,.15); }
.btn-bordered { background: var(--card); color: var(--primary); border-color: var(--primary); box-shadow: var(--shadow); }
.btn-bordered:hover { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-lg); }

/* ---------- Focus ring (keyboard nav) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(232,30,35,.35); border-radius: var(--radius-sm);
}

/* ---------- Scroll-reveal (see assets/js/main.js) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Top utility bar ---------- */
.topbar { background: var(--primary-dark); color: var(--on-primary); font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 7px 20px; flex-wrap: wrap; gap: 6px; }
.topbar-contact { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topbar-links { display: flex; gap: 18px; }
.topbar-links a { color: var(--on-primary); opacity: .9; }
.topbar-links a:hover { opacity: 1; text-decoration: underline; }
.topbar-admin {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.14); color: var(--on-primary);
  padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,.25);
}
.topbar-admin:hover { background: var(--secondary); color: var(--on-secondary); border-color: var(--secondary); }

/* ---------- Header / nav ---------- */
.site-header { background: var(--primary); color: var(--on-primary); position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.header-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; gap: 20px; }
.header-partners { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header-partners img {
  height: 48px; width: 48px; object-fit: contain; border-radius: 50%;
  background: #fff; padding: 3px; box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.header-partners a:hover img { transform: translateY(-2px); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-primary); flex-shrink: 0; }
.brand img { height: 46px; width: 46px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; transition: color .18s ease; }
.brand-text strong { font-family: 'Poppins', sans-serif; font-size: 1.2rem; }
.brand-text small { font-size: .76rem; opacity: .85; }
.brand:hover .brand-text { color: var(--secondary); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--on-primary); display: block; }

.mainnav { background: var(--primary-dark); }
.mainnav .menu { display: flex; align-items: center; flex-wrap: nowrap; justify-content: center; }
.mainnav .menu > li { position: relative; flex-shrink: 0; }
.mainnav .menu > li > a {
  display: flex; align-items: center; gap: 2px;
  padding: 12px 8px;
  color: var(--on-primary);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
}
.mainnav .menu > li > a .caret { font-size: .7em; }
.mainnav .menu > li:hover > a,
.mainnav .menu > li > a:focus { background: rgba(255,255,255,.14); color: var(--on-primary); }

.submenu {
  position: absolute; top: 100%; left: 0;
  min-width: 280px;
  background: var(--secondary);
  color: var(--on-secondary);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .18s ease;
  padding: 6px 0;
  max-height: 70vh;
  overflow-y: auto;
}
.mainnav .menu > li:hover > .submenu,
.mainnav .menu > li:focus-within > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu li a {
  display: block;
  padding: 6px 18px;
  color: var(--on-secondary);
  font-size: .87rem;
  font-weight: 500;
  border-left: 3px solid transparent;
}
.submenu li a:hover { background: rgba(0,0,0,.06); border-left-color: var(--primary); color: var(--on-secondary); }

/* ---------- Hero slider ---------- */
.hero-slider { position: relative; overflow: hidden; background: var(--primary-dark); min-height: 700px; }
.hero-slide {
  position: absolute; inset: 0;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; z-index: 1; }
.hero-caption { position: relative; z-index: 2; padding: 36px 20px 44px; color: var(--on-primary); max-width: 640px; }
.hero-caption h2 { color: var(--on-primary); font-size: 12px; margin-bottom: .3em; text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 1px 12px rgba(0,0,0,.6); }
.hero-caption p { font-size: 12px; opacity: .95; margin-bottom: 1.1em; text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 1px 12px rgba(0,0,0,.6); }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.5);
  color: var(--on-primary); width: 42px; height: 42px; border-radius: 50%;
  cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
}
.hero-arrow:hover { background: rgba(255,255,255,.32); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }

.hero-dots { position: absolute; z-index: 3; bottom: 16px; right: 24px; display: flex; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--on-primary); background: transparent; cursor: pointer; padding: 0; }
.hero-dots button.active { background: var(--on-primary); }

/* ---------- Section shell ---------- */
.section { padding: 56px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.section-head .eyebrow { color: var(--secondary-dark); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.section-alt { background: var(--card); }

/* ---------- Announcements + News twin panels ---------- */
.feed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.feed-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.feed-card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; background: var(--primary); color: var(--on-primary); }
.feed-card.news .feed-card-head { background: var(--secondary); color: var(--on-secondary); }
.feed-card-head h3 { margin: 0; font-size: 1.1rem; color: inherit; }
.feed-card-head a { color: inherit; font-size: .82rem; font-weight: 700; opacity: .9; }
.feed-card-head a:hover { opacity: 1; text-decoration: underline; }
.feed-list { padding: 6px 0; }
.feed-item { display: flex; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--border); transition: background-color .15s ease; }
.feed-item:hover { background-color: var(--bg); }
.feed-item:last-child { border-bottom: 0; }
.feed-date {
  flex: 0 0 auto; width: 58px; text-align: center;
  background: var(--primary-tint); color: var(--primary-dark);
  border-radius: var(--radius-sm); padding: 6px 4px; font-weight: 700; font-size: .78rem; line-height: 1.2;
}
.feed-card.news .feed-date { background: var(--secondary-tint); color: var(--secondary-dark); }
.feed-body h4 { margin: 0 0 4px; font-size: .97rem; }
.feed-body p { margin: 0; font-size: .87rem; color: var(--muted); }
.feed-empty { padding: 24px 22px; color: var(--muted); font-style: italic; }

/* ---------- Testimonials ---------- */
.testimonial-slider { position: relative; max-width: 800px; margin: 0 auto; }
.testimonial-slide { display: none; text-align: center; padding: 10px 30px; }
.testimonial-slide.active { display: block; }
.testimonial-slide .avatar { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 16px; border: 3px solid var(--secondary); object-fit: cover; }
.testimonial-quote { font-size: 1.15rem; font-style: italic; color: var(--ink); position: relative; }
.testimonial-quote::before { content: "“"; color: var(--secondary); font-size: 2.2rem; font-style: normal; line-height: 0; vertical-align: -0.4rem; margin-right: 4px; }
.testimonial-name { margin-top: 18px; font-weight: 700; }
.testimonial-role { color: var(--muted); font-size: .88rem; }
.testimonial-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.testimonial-dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--secondary-dark); background: transparent; cursor: pointer; padding: 0; }
.testimonial-dots button.active { background: var(--secondary-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.88); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: 50px 20px 30px; }
.footer-col h4 { color: var(--on-primary); font-size: 1rem; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col a { color: rgba(255,255,255,.82); font-size: .9rem; }
.footer-col a:hover { color: var(--on-primary); }
.footer-about .brand { margin-bottom: 14px; }
.footer-about p { font-size: .87rem; color: rgba(255,255,255,.75); }
.footer-map { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow); }
.footer-map iframe { display: block; width: 100%; }
.footer-contact li { font-size: .88rem; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 16px 20px; }
.footer-bottom .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: .8rem; color: rgba(255,255,255,.65); }
.footer-bottom a { color: rgba(255,255,255,.85); text-decoration: underline; }
.footer-bottom a:hover { color: var(--on-primary); }

/* ---------- Generic content page (page.php) ---------- */
.page-hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: var(--on-primary); padding: 46px 0; }
.page-hero h1 { color: var(--on-primary); margin-bottom: 6px; }
.breadcrumb { font-size: .85rem; opacity: .85; }
.breadcrumb a { color: var(--on-primary); text-decoration: underline; }
.layout-2 { display: grid; grid-template-columns: 2.2fr 1fr; gap: 32px; padding: 40px 0; align-items: start; }
.content-card, .sidebar-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 30px;
}
.sidebar-card h4 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--secondary-dark); margin-bottom: 14px; }
.sidebar-card ul li { margin-bottom: 8px; }
.sidebar-card ul li a.on { color: var(--primary); font-weight: 700; }

/* ---------- Data tables (calendar, directory, etc.) ---------- */
.data-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th { background: var(--primary); color: var(--on-primary); text-align: left; padding: 12px 16px; font-size: .85rem; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:nth-child(even) td { background: var(--bg); }
.table-scroll { overflow-x: auto; }

/* ---------- Cards grid (departments / gallery / vacancies) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.info-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; transition: transform .18s ease, box-shadow .18s ease; }
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.info-card h3 { font-size: 1.05rem; }
.content-block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; margin-bottom: 24px; }
.content-block:last-child { margin-bottom: 0; }
.content-block h2 { font-size: 1.3rem; }
.badge { display: inline-block; background: var(--secondary-tint); color: var(--secondary-dark); border-radius: 999px; padding: 3px 12px; font-size: .74rem; font-weight: 700; margin-bottom: 10px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.gallery-item {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative;
  transition: transform .3s ease, box-shadow .3s ease; transform-origin: center; z-index: 1;
}
.gallery-item:hover { transform: scale(1.5); box-shadow: var(--shadow-lg); z-index: 10; }
.gallery-item img { height: 200px; width: 100%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: reduce) {
  .gallery-item { transition: none; }
  .gallery-item:hover { transform: none; }
}
.gallery-item .cap { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(0deg, rgba(31,41,55,.88), transparent); color: #fff; padding: 24px 14px 10px; font-size: .85rem; font-weight: 600; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.contact-form .field { margin-bottom: 16px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; background: var(--bg);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); background: var(--card); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.map-embed iframe { width: 100%; height: 260px; border: 0; display: block; }
.flash-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; }
.flash-error { background: #fdeceb; border: 1px solid #f3b4ae; color: #7a1c14; padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feed-grid { grid-template-columns: 1fr; }
  .layout-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topbar-phone { display: none; }
  .header-top { padding: 10px 16px; }
}
/* Below this, the single-line desktop nav can't fit all 10 top-level items —
   switch to the hamburger + slide-in panel instead of letting it wrap or overflow. */
@media (max-width: 1150px) {
  .nav-toggle { display: flex; }
  .mainnav { position: fixed; top: 0; right: -100%; width: 84%; max-width: 340px; height: 100vh;
    background: var(--primary); overflow-y: auto; transition: right .25s ease; padding-top: 70px; box-shadow: -8px 0 24px rgba(0,0,0,.2); z-index: 300; }
  body.nav-open .mainnav { right: 0; }
  .mainnav .wrap { padding: 0; }
  .mainnav .menu { flex-direction: column; align-items: stretch; }
  .mainnav .menu > li > a { padding: 14px 22px; font-size: .92rem; border-bottom: 1px solid rgba(255,255,255,.12); justify-content: space-between; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-radius: 0; max-height: none; display: none; }
  li.has-sub.open > .submenu { display: block; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-slider { min-height: clamp(400px, 68vh, 520px); }
  .card-grid, .gallery-grid { grid-template-columns: 1fr 1fr; }
  .header-partners { display: none; }
}

/* ---------- PDF viewer modal (shared across all pages) ---------- */
.pdf-modal { display: none; position: fixed; inset: 0; z-index: 500; }
.pdf-modal.active { display: block; }
.pdf-modal-backdrop { position: absolute; inset: 0; background: rgba(31,41,55,.75); }
.pdf-modal-dialog {
  position: relative; z-index: 1; max-width: 900px; margin: 30px auto;
  height: calc(100vh - 60px); background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
}
.pdf-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: var(--primary); color: var(--on-primary); flex-shrink: 0; }
.pdf-modal-header span { font-weight: 600; font-size: .95rem; }
.pdf-modal-close { background: none; border: 0; color: var(--on-primary); font-size: 1.7rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.pdf-modal-close:hover { color: var(--secondary); }
.pdf-modal-dialog iframe { flex: 1; border: 0; width: 100%; }
@media (max-width: 700px) {
  .pdf-modal-dialog { margin: 10px; height: calc(100vh - 20px); max-width: none; }
}
