@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --clann-green: #1a6b3c;
  --clann-green-dark: #0f4d2a;
  --clann-gold: #c8953e;
  --clann-gold-light: #e8bf7a;
  --clann-cream: #faf6ee;
  --clann-brown: #3d2b1f;
  --clann-text: #2c2c2c;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--clann-text);
  background: var(--clann-cream);
}

h1, h2, h3, h4, h5, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: 'Playfair Display', serif;
}

/* NAVBAR */
.navbar {
  background: rgba(15, 77, 42, 0.97);
  backdrop-filter: blur(10px);
  padding: .6rem 0;
  border-bottom: 2px solid var(--clann-gold);
}
.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff !important;
  letter-spacing: 1px;
}
.navbar-brand span { color: var(--clann-gold-light); }
.nav-link { color: rgba(255,255,255,.85) !important; font-weight: 500; font-size: .9rem; transition: color .2s; }
.nav-link:hover { color: var(--clann-gold-light) !important; }

/* HERO */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0a3d20 0%, #145231 30%, #1a6b3c 60%, #1e7a44 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(200,149,62,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(200,149,62,.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero-celtic {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  opacity: .06;
  border: 40px solid #fff;
  border-radius: 50%;
}
.hero-celtic::after {
  content: '';
  position: absolute;
  inset: 30px;
  border: 20px solid #fff;
  border-radius: 50%;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.hero h1 .accent { color: var(--clann-gold-light); }
.hero p.lead {
  color: rgba(255,255,255,.8);
  font-size: 1.15rem;
  max-width: 520px;
}

/* SEARCH BOX */
.search-card {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 2rem;
  max-width: 600px;
}
.search-card .form-control {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 10px;
  padding: .65rem 1rem;
}
.search-card .form-control::placeholder { color: rgba(255,255,255,.5); }
.search-card .form-control:focus {
  background: rgba(255,255,255,.18);
  border-color: var(--clann-gold-light);
  box-shadow: 0 0 0 3px rgba(200,149,62,.25);
  color: #fff;
}
.search-card .form-label { color: rgba(255,255,255,.7); font-size: .82rem; font-weight: 500; }
.btn-gold {
  background: linear-gradient(135deg, var(--clann-gold), #d4a34e);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: .65rem 2rem;
  transition: transform .2s, box-shadow .2s;
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,149,62,.4);
  color: #fff;
}
.hero-stats { margin-top: 2.5rem; }
.hero-stats .stat-item { text-align: center; }
.hero-stats .stat-num { font-family: 'Playfair Display',serif; font-size: 1.8rem; font-weight: 700; color: var(--clann-gold-light); }
.hero-stats .stat-label { font-size: .75rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: 1px; }

/* SECTION STYLING */
section { padding: 5rem 0; }
.section-title {
  font-weight: 700;
  font-size: 2.2rem;
  margin-bottom: .5rem;
}
.section-subtitle {
  color: #777;
  font-size: 1rem;
  margin-bottom: 2.5rem;
}
.section-line {
  width: 50px;
  height: 3px;
  background: var(--clann-gold);
  border-radius: 2px;
  margin-bottom: 1rem;
}

/* DATABASE CARDS */
.db-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.8rem;
  border: 1px solid #e8e2d6;
  transition: transform .25s, box-shadow .25s;
  height: 100%;
  cursor: pointer;
}
.db-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}
.db-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 1rem;
}
.db-card h5 { font-weight: 700; font-size: 1.05rem; }
.db-card p { font-size: .88rem; color: #666; }
.db-count { font-size: .78rem; font-weight: 600; color: var(--clann-green); }

/* ARTICLES */
.article-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e8e2d6;
  transition: transform .25s, box-shadow .25s;
  height: 100%;
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}
.article-img {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,.7);
}
.article-body { padding: 1.4rem; }
.article-body .badge-cat {
  font-size: .7rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 20px;
  margin-bottom: .6rem;
  display: inline-block;
}
.article-body h5 { font-weight: 700; font-size: 1rem; margin-bottom: .4rem; }
.article-body p { font-size: .85rem; color: #666; margin-bottom: .6rem; }
.article-meta { font-size: .75rem; color: #999; }

/* MINI DATABASE BROWSER */
.mini-db {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8e2d6;
  overflow: hidden;
}
.mini-db-header {
  background: var(--clann-green-dark);
  color: #fff;
  padding: 1.2rem 1.5rem;
}
.mini-db-header h5 { font-weight: 700; margin: 0; font-size: 1rem; }
.mini-db-search {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #eee;
}
.mini-db-search .form-control {
  border-radius: 8px;
  font-size: .88rem;
  border-color: #ddd;
}
.mini-db-list { max-height: 320px; overflow-y: auto; }
.mini-db-item {
  padding: .7rem 1.2rem;
  border-bottom: 1px solid #f3f0ea;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background .15s;
  font-size: .88rem;
}
.mini-db-item:hover { background: #faf6ee; }
.mini-db-item .count {
  background: #f0ebe0;
  padding: .15rem .55rem;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--clann-brown);
}

/* TIMELINE */
.timeline { position: relative; padding: 2rem 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--clann-gold);
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 2.5rem 2.5rem;
}
.timeline-item:nth-child(odd) { left: 0; text-align: right; padding-right: 3rem; }
.timeline-item:nth-child(even) { left: 50%; padding-left: 3rem; }
.timeline-dot {
  position: absolute;
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--clann-gold);
  border: 3px solid var(--clann-cream);
  border-radius: 50%;
}
.timeline-item:nth-child(odd) .timeline-dot { right: -8px; }
.timeline-item:nth-child(even) .timeline-dot { left: -8px; }
.timeline-year { font-family: 'Playfair Display',serif; font-weight: 700; font-size: 1.3rem; color: var(--clann-green); }
.timeline-text { font-size: .88rem; color: #666; margin-top: .3rem; }

/* PROVINCES */
.province-card {
  border-radius: 14px;
  padding: 2rem 1.5rem;
  text-align: center;
  color: #fff;
  transition: transform .25s;
  cursor: pointer;
  height: 100%;
}
.province-card:hover { transform: translateY(-4px); }
.province-card i { font-size: 2rem; margin-bottom: .8rem; }
.province-card h5 { font-weight: 700; font-size: 1.1rem; }
.province-card p { font-size: .82rem; opacity: .85; }

/* FOOTER */
footer {
  background: var(--clann-green-dark);
  color: rgba(255,255,255,.7);
  padding: 3.5rem 0 1.5rem;
  font-size: .88rem;
}
footer h6 { color: #fff; font-family: 'Playfair Display',serif; font-weight: 700; margin-bottom: 1rem; font-size: 1rem; }
footer a { color: rgba(255,255,255,.6); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--clann-gold-light); }
footer .border-top { border-color: rgba(255,255,255,.12) !important; }

/* MISC */
.btn-outline-green {
  border: 2px solid var(--clann-green);
  color: var(--clann-green);
  font-weight: 600;
  border-radius: 10px;
  transition: all .2s;
}
.btn-outline-green:hover {
  background: var(--clann-green);
  color: #fff;
}
.bg-green { background: var(--clann-green); }
.text-gold { color: var(--clann-gold) !important; }

/* AUTH PAGES */
.auth-wrapper {
  min-height: calc(100vh - 62px);
  display: flex;
}
.auth-brand-panel {
  background: linear-gradient(135deg, #0a3d20 0%, #145231 40%, #1a6b3c 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3.5rem;
  position: relative;
  overflow: hidden;
}
.auth-brand-panel::before {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 360px;
  height: 360px;
  border: 50px solid rgba(255,255,255,.04);
  border-radius: 50%;
}
.auth-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  border: 30px solid rgba(255,255,255,.04);
  border-radius: 50%;
}
.auth-brand-panel .brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}
.auth-brand-panel .brand-name span { color: var(--clann-gold-light); }
.auth-brand-panel .brand-tagline {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  margin-top: 1rem;
  max-width: 280px;
  line-height: 1.6;
}
.auth-brand-panel .brand-features {
  margin-top: 2.5rem;
  list-style: none;
  padding: 0;
}
.auth-brand-panel .brand-features li {
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  margin-bottom: .7rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.auth-brand-panel .brand-features li i { color: var(--clann-gold-light); font-size: .8rem; }
.auth-form-panel {
  background: var(--clann-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}
.auth-form-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8e2d6;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}
.auth-form-card h2 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: .3rem;
}
.auth-form-card .auth-subtitle {
  color: #888;
  font-size: .88rem;
  margin-bottom: 1.8rem;
}
.auth-form-card .form-label {
  font-size: .83rem;
  font-weight: 500;
  color: #555;
}
.auth-form-card .form-control {
  border-radius: 10px;
  border-color: #ddd;
  padding: .6rem 1rem;
  font-size: .9rem;
}
.auth-form-card .form-control:focus {
  border-color: var(--clann-green);
  box-shadow: 0 0 0 3px rgba(26,107,60,.12);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: #bbb;
  font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8e2d6;
}
.btn-green {
  background: var(--clann-green);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: .65rem 2rem;
  transition: background .2s, transform .2s;
}
.btn-green:hover {
  background: var(--clann-green-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* PAGE HEADER (dashboard / profile) */
.page-header {
  background: linear-gradient(135deg, #0a3d20 0%, #145231 40%, #1a6b3c 100%);
  padding: 3rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 300px;
  height: 300px;
  border: 40px solid rgba(255,255,255,.04);
  border-radius: 50%;
}
.page-header h1 {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}
.page-header p { color: rgba(255,255,255,.65); font-size: .9rem; margin-top: .3rem; margin-bottom: 0; }

/* CONTENT CARD (dashboard / profile sections) */
.content-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8e2d6;
  padding: 1.8rem;
}
.content-card h5 {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .3rem;
}
.content-card .card-subtitle {
  color: #888;
  font-size: .83rem;
  margin-bottom: 1.4rem;
}
.content-card .form-label { font-size: .83rem; font-weight: 500; color: #555; }
.content-card .form-control {
  border-radius: 10px;
  border-color: #ddd;
  padding: .6rem 1rem;
  font-size: .9rem;
}
.content-card .form-control:focus {
  border-color: var(--clann-green);
  box-shadow: 0 0 0 3px rgba(26,107,60,.12);
}
.content-card.danger-card { border-color: #f5c6cb; }

/* SCROLL */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

@media (max-width: 768px) {
  .timeline::before { left: 20px; }
  .timeline-item { width: 100%; left: 0 !important; padding-left: 50px !important; padding-right: 0 !important; text-align: left !important; }
  .timeline-dot { left: 12px !important; right: auto !important; }
  .hero-celtic { display: none; }
}