/* Union Catalog Philippines — shared stylesheet */

:root {
  --navy: #0b2545;
  --navy-light: #13366b;
  --blue: #1b4d8f;
  --gold: #f2b705;
  --gold-dark: #c98f00;
  --red: #ce1126;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #1b1f27;
  --text-muted: #5b6472;
  --border: #e3e7ee;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 12px 32px rgba(11, 37, 69, 0.14);
  --container: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 16px;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 16px; color: var(--text-muted); }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--gold-dark); }

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.6);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,.12); }

.btn-outline-navy {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: "Georgia", serif;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.08rem; }
.brand-text span { font-size: .72rem; letter-spacing: .06em; color: var(--gold); text-transform: uppercase; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255,255,255,.85);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: .95rem;
  transition: background .15s ease, color .15s ease;
}

.nav-links a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-links a.active { color: var(--navy); background: var(--gold); font-weight: 700; }

.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* Hero */
.hero {
  background: radial-gradient(circle at 20% 20%, var(--navy-light), var(--navy) 60%);
  color: #fff;
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}

.hero .container { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 { color: #fff; margin-bottom: 18px; }
.hero .lede { color: rgba(255,255,255,.85); font-size: 1.1rem; max-width: 52ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 40px;
  max-width: 520px;
}
.hero-stats div {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
}
.hero-stats strong { display: block; font-size: 1.5rem; color: var(--gold); font-family: Georgia, serif; }
.hero-stats span { font-size: .78rem; color: rgba(255,255,255,.75); }

/* Search card (mock OPAC) */
.search-card {
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.search-card h3 { margin-bottom: 6px; }
.search-card .hint { font-size: .85rem; margin-bottom: 18px; }

.search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-form input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: .95rem;
}
.search-form button {
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.search-form button:hover { background: var(--navy-light); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: .78rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head.left { margin: 0 0 40px; text-align: left; }

.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-weight: 800;
  margin-bottom: 16px;
  font-size: 1.2rem;
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; }

/* Timeline (About) */
.timeline { border-left: 3px solid var(--gold); padding-left: 28px; margin-left: 6px; }
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
}
.timeline-item .year { font-weight: 700; color: var(--gold-dark); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.timeline-item h3 { margin: 4px 0 6px; }
.timeline-item p { margin: 0; }

/* Table / library list */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: .92rem; }
th { background: var(--navy); color: #fff; font-family: Georgia, serif; font-weight: 600; }
tr:last-child td { border-bottom: none; }
td .tag {
  display: inline-block;
  font-size: .72rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(27,77,143,.1);
  color: var(--blue);
  font-weight: 600;
}

/* Resource cards */
.resource-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.resource-card .badge {
  align-self: flex-start;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--red);
  background: rgba(206,17,38,.08);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.resource-card a.link { margin-top: auto; font-weight: 600; color: var(--blue); }
.resource-card a.link:hover { text-decoration: underline; }

/* FAQ */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  background: none;
  border: none;
  font-family: Georgia, serif;
  font-size: 1.02rem;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-question .plus { font-size: 1.3rem; color: var(--gold-dark); transition: transform .2s ease; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  padding: 0 22px;
}
.faq-item.open .faq-answer { max-height: 320px; padding-bottom: 20px; }
.faq-answer p { margin: 0; }

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.contact-info .item { display: flex; gap: 14px; margin-bottom: 24px; }
.contact-info .item .ic {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.contact-info .item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.contact-info .item p { margin: 0; }

.social-row { display: flex; gap: 10px; margin-top: 8px; }
.social-row a {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--navy);
  transition: background .15s ease, color .15s ease;
}
.social-row a:hover { background: var(--navy); color: #fff; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: .95rem;
  background: var(--bg);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
}
.form-note { font-size: .82rem; color: var(--text-muted); margin-top: 6px; }
.form-success {
  display: none;
  background: rgba(27,77,143,.08);
  border: 1px solid var(--blue);
  color: var(--navy);
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: .92rem;
}
.form-success.show { display: block; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 260px;
  margin-top: 28px;
  box-shadow: var(--shadow);
}

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--navy), var(--navy-light));
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.8); max-width: 56ch; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; justify-content: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }

/* Footer */
.site-footer {
  background: #081a33;
  color: rgba(255,255,255,.72);
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .05em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--gold); }
.footer-brand p { color: rgba(255,255,255,.6); font-size: .9rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  flex-wrap: wrap;
  gap: 10px;
}

/* Utilities */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--navy);
    padding: 12px;
    display: none;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
  .nav-cta { margin: 8px 0 0; width: 100%; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-toggle { display: flex; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}
