/* Infolog.in shared stylesheet */
:root {
  --navy: #082c4b;
  --navy2: #0c3d63;
  --gold: #e6a12a;
  --gold2: #ffd36b;
  --ink: #172d43;
  --muted: #64758a;
  --cream: #fbf8f1;
  --white: #fff;
  --line: #e9e1d3;
  --shadow: 0 12px 34px rgba(13,39,61,.12)
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: 'DM Sans', sans-serif }
a { color: inherit; text-decoration: none }
button, input { font: inherit }

/* --- NAVIGATION & TOPBAR --- */
.topbar { background: var(--navy); color: #e9f1f8; font-size: 13px }
.topbar-inner { max-width: 1440px; margin: auto; padding: 10px 28px; display: flex; align-items: center; justify-content: space-between; gap: 18px }
.top-left, .top-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap }
.topbar i { color: var(--gold2); margin-right: 7px }
.social { display: flex; gap: 8px }
.social a { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: #174c75; transition: .2s }
.social a:hover { background: var(--gold); color: var(--navy) }
.heritage-label { padding-left: 16px; border-left: 1px solid #ffffff40 }

.mainnav { background: #fff; border-bottom: 1px solid #eee6da; position: relative; z-index: 5 }
.nav-inner { max-width: 1440px; margin: auto; min-height: 100px; padding: 15px 28px; display: flex; align-items: center; justify-content: space-between; gap: 25px }
.brand { display: flex; align-items: center; gap: 12px; min-width: 230px }
.brand-mark { font-size: 39px; color: var(--navy); position: relative }
.brand-mark:after { content: ""; position: absolute; width: 13px; height: 29px; background: var(--gold); transform: skewY(-24deg); left: 20px; top: 4px; opacity: .9 }
.brand-copy { display: flex; flex-direction: column }
.brand-name { font: 800 36px/1 'Playfair Display', serif; color: var(--navy); letter-spacing: -1.5px }
.brand-name span { color: #c77a14; font-style: italic }
.tagline { font-size: 9px; letter-spacing: 3px; color: #657387; margin-top: 7px }

.nav-links { display: flex; align-items: center; gap: clamp(6px, 1vw, 18px) }
.nav-links a { font-size: 12px; font-weight: 700; text-align: center; color: #203850; white-space: nowrap }
.nav-links a i { display: block; font-size: 17px; color: var(--navy); margin-bottom: 7px }
.nav-links a:hover, .nav-links a.active, .nav-links a:hover i, .nav-links a.active i { color: #c17a12 }

.nav-search-wrap { position: relative; }
.nav-search { display: flex; border: 1.5px solid #e8dfd2; border-radius: 30px; overflow: hidden; min-width: 210px; box-shadow: 0 4px 12px #0a2c4b0d; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.nav-search input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 11px 16px; font-size: 14px; background: transparent; }
.nav-search button { border: 0; background: linear-gradient(135deg, #f5bd4b, #d98908); color: #fff; padding: 0 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.nav-search:focus-within { border-color: #d98908; box-shadow: 0 0 0 3px rgba(230, 161, 42, 0.2); }
.menu-toggle { display: none; border: 0; background: var(--navy); color: #fff; padding: 11px 13px; border-radius: 9px }

/* --- HOMEPAGE HERO --- */
.hero { position: relative; min-height: 465px; display: flex; align-items: center; overflow: hidden; background: #173e58 url('https://images.unsplash.com/photo-1599661046827-dacff0c0f09a?auto=format&fit=crop&w=2200&q=90') center 45%/cover no-repeat; color: #fff }
.hero:before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,32,54,.94), rgba(3,32,54,.72) 34%, rgba(3,32,54,.18) 72%, rgba(3,32,54,.08)), linear-gradient(0deg, rgba(3,25,42,.24), transparent 40%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1440px; margin: auto; padding: 48px 28px 35px; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(430px, 1.1fr); align-items: end; gap: 38px }
.eyebrow, .section-kicker { display: flex; align-items: center; gap: 12px; text-transform: uppercase; color: var(--gold2); font-size: 12px; font-weight: 800; letter-spacing: 1.7px; margin-bottom: 15px }
.eyebrow:after { content: ""; height: 2px; width: 65px; background: var(--gold) }
.hero h1 { font: 700 clamp(38px, 4.2vw, 62px)/1.08 'Playfair Display', serif; max-width: 640px; margin: 0 0 18px; letter-spacing: -.8px }
.hero h1 span { display: block; color: var(--gold2) }
.hero-copy { font-size: 15px; line-height: 1.7; color: #f0f5f8; max-width: 540px; margin-bottom: 24px }
.btn-gold { display: inline-flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #ffdb76, #eea41b); color: #102e46; padding: 13px 22px; border-radius: 28px; font-weight: 800; box-shadow: 0 8px 18px #0002; transition: transform .2s }
.btn-gold:hover { transform: translateY(-2px) }
.hero-script { position: absolute; right: 5%; top: 10%; font: italic 28px 'Playfair Display', serif; color: #fff; text-align: right; transform: rotate(-7deg); text-shadow: 0 3px 10px #0006 }
.search-panel { background: rgba(9,27,39,.84); border: 1px solid rgba(255,211,107,.9); border-radius: 17px; padding: 22px 24px; backdrop-filter: blur(8px); box-shadow: 0 16px 40px #001b2e66 }
.search-panel-top { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 14px; margin-bottom: 14px }
.search-panel-top > i { font-size: 35px; color: var(--gold2) }
.search-panel h2 { font: 600 19px/1.4 'Playfair Display', serif; margin: 0 }
.search-panel h2 strong { color: var(--gold2) }
.big-search { display: flex; background: #fff; border-radius: 10px; overflow: hidden }
.big-search input { min-width: 0; width: 100%; padding: 14px 16px; border: 0; outline: 0 }
.big-search button { border: 0; background: var(--gold); color: #fff; padding: 0 21px; cursor: pointer }
.powered { font-size: 11px; color: #d5dfe7; margin: 10px 0 0 62px }
.notice { font-size: 12px; color: #f8d98b; margin-top: 10px; line-height: 1.5 }

/* --- HOMEPAGE SECTIONS --- */
.section { max-width: 1440px; margin: auto; padding: 54px 28px }
.collection { display: grid; grid-template-columns: minmax(230px, .9fr) minmax(0, 3fr); gap: 30px; align-items: center }
.section-heading .ornament { color: var(--gold); font-size: 27px; margin-bottom: 8px }
.section-kicker { color: #b77819; font-size: 11px; margin-bottom: 12px }
.section-kicker:before { content: ""; height: 2px; width: 34px; background: var(--gold) }
.section-heading h2, .latest-head h2 { font: 700 31px/1.2 'Playfair Display', serif; color: var(--navy); margin-bottom: 12px }
.section-heading p, .latest-head p { font-size: 13px; color: var(--muted); line-height: 1.8 }
.text-link { color: #a86c0b; font-weight: 800; font-size: 13px }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px }
.category-card { background: #fff; border: 1px solid #eee4d4; border-radius: 15px; overflow: hidden; box-shadow: 0 5px 18px rgba(28,43,54,.08); transition: transform .25s, box-shadow .25s }
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow) }
.category-image { height: 112px; overflow: hidden; background: #d6c09a }
.category-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s }
.category-card:hover img { transform: scale(1.06) }
.category-body { padding: 17px 16px 18px; position: relative; min-height: 130px }
.category-icon { width: 43px; height: 43px; display: grid; place-items: center; background: #fff4db; color: #a86c0b; border-radius: 50%; font-size: 21px; position: absolute; top: -23px; border: 3px solid #fff }
.category-body h3 { font: 700 16px 'Playfair Display', serif; color: var(--navy); margin: 13px 20px 8px 0 }
.category-body p { font-size: 12px; line-height: 1.65; color: #66768a; margin: 0 }
.round-arrow { position: absolute; right: 13px; bottom: 15px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #fff; font-size: 12px }

/* --- COLLECTION ONE-ROW INFINITE SLIDER --- */
.collection-slider-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.slider-ctrl-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #d4c3ad;
  background: #fff;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(28,43,54,0.06);
}
.slider-ctrl-btn:hover {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(183, 120, 25, 0.25);
}
.slider-pause-hint {
  font-size: 11.5px;
  color: #8c9ba5;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  user-select: none;
}
.slider-pause-hint i {
  font-size: 10px;
  color: var(--gold);
}
.collection-carousel-wrapper {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 10px 0;
}
.carousel-edge-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2d7c5;
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
}
.collection-carousel-wrapper:hover .carousel-edge-btn {
  opacity: 1;
  pointer-events: auto;
}
.carousel-edge-prev { left: 6px; }
.carousel-edge-next { right: 6px; }
.carousel-edge-btn:hover {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  transform: translateY(-50%) scale(1.1);
}
.collection-slider-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
}
.collection-slider-viewport:active {
  cursor: grabbing;
}
.collection-slider-viewport::-webkit-scrollbar {
  display: none;
}
.collection-slider-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 18px;
  width: max-content;
  align-items: stretch;
  padding: 8px 4px 16px;
}
.slider-card {
  flex: 0 0 250px;
  width: 250px;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-drag: none;
  text-decoration: none;
}
.slider-card .category-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.slider-card .category-body p {
  flex: 1;
}

.stats { background: var(--navy); color: #fff }
.stats-inner { max-width: 1440px; margin: auto; padding: 27px 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px }
.stat { text-align: center; border-right: 1px solid #ffffff26 }
.stat:last-child { border: 0 }
.stat strong { display: block; color: var(--gold2); font: 700 28px 'Playfair Display', serif }
.stat span { font-size: 12px; color: #d5e0e8 }

.latest-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 25px }
.latest-head h2 { margin-bottom: 7px }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px }
.article-card { background: #fff; border-radius: 15px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 6px 20px #0c2d4a0a }
.article-card > a img { display: block; width: 100%; height: 205px; object-fit: cover }
.article-content { padding: 20px }
.article-meta { display: flex; gap: 10px; color: #a86c0b; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 10px }
.article-content h3 { font: 700 21px/1.3 'Playfair Display', serif; color: var(--navy); margin-bottom: 10px }
.article-content p { font-size: 13px; line-height: 1.7; color: var(--muted) }
.read-more { font-size: 13px; font-weight: 800; color: #a86c0b }

.search-results { max-width: 1384px; margin: 22px auto 0; padding: 0 28px }
.results-box { background: #fff; border: 1px solid var(--line); padding: 20px; border-radius: 12px }
.results-box h2 { font: 700 23px 'Playfair Display', serif }
.results-box li { margin: 9px 0 }

/* --- PROVINCE INDEX --- */
.province-page { padding: 40px 28px; }
.page-hero { background: linear-gradient(120deg, #092b49, #164f70); color: #fff; padding: 42px; border-radius: 18px; margin-bottom: 25px; position: relative; overflow: hidden }
.page-hero:after { content: ""; position: absolute; right: -20px; top: -65px; width: 260px; height: 260px; border: 1px solid #e6a12a66; border-radius: 50%; box-shadow: 0 0 0 25px #e6a12a0b, 0 0 0 55px #e6a12a08; pointer-events: none; }
.page-hero > * { position: relative; z-index: 2; }
.page-hero h1 { font: 700 clamp(30px, 4vw, 44px) 'Playfair Display', serif; margin: 0 0 10px; position: relative; z-index: 1 }
.page-hero p { color: #dce8ef; max-width: 650px; line-height: 1.7; margin: 0; position: relative; z-index: 1 }

.filter-bar { display: flex; gap: 12px; margin-bottom: 25px; background: #fff; padding: 14px; border-radius: 13px; border: 1px solid var(--line) }
.filter-bar input, .filter-bar select { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid #e5dfd3; border-radius: 8px; background: #fff; color: var(--ink) }
.filter-bar .btn-gold { border: 0; cursor: pointer }
.province-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px }
.province-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 21px; box-shadow: 0 6px 22px #082c4b0a; transition: .2s }
.province-card:hover { transform: translateY(-4px); box-shadow: var(--shadow) }
.province-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px }
.province-emblem { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff2d7; color: #a66b0b; font-size: 21px }
.province-state { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: #9b6a19; background: #fff8e9; padding: 7px 9px; border-radius: 20px }
.province-card h2 { font: 700 22px 'Playfair Display', serif; color: var(--navy); margin: 0 0 5px }
.hindi-name { font-size: 14px; color: #a36b13; margin: 3px 0 8px }
.province-dynasty { font-size: 13px; color: var(--muted); margin: 10px 0 15px }
.province-meta { display: flex; flex-wrap: wrap; gap: 8px 13px; padding: 13px 0; border-top: 1px solid #eee7db; border-bottom: 1px solid #eee7db }
.province-meta span { font-size: 11px; color: #617287 }
.province-meta i { color: #bd7d15; margin-right: 5px }
.province-link { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; font-size: 13px; font-weight: 800; color: #a86c0b }

.empty-state { text-align: center; background: #fff; border: 1px dashed #d8c8a8; padding: 45px 20px; border-radius: 15px }
.empty-state > i { font-size: 34px; color: #b77b19 }
.empty-state h2, .empty-state h1, .empty-state h3 { font: 700 25px 'Playfair Display', serif; color: var(--navy); margin: 13px 0 8px }
.empty-state p { color: var(--muted); line-height: 1.7 }

/* --- MODERN PROVINCE DETAIL PAGE --- */

.modern-page-wrapper {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 22px 38px;
    background: #fbf8f1;
    min-height: 70vh;
}

.modern-breadcrumb {
    font-size: 13px;
    font-weight: 700;
    color: #b08d3a;
    margin-bottom: 20px;
}
.modern-breadcrumb a:hover {
    color: #d9aa41;
}

.modern-province-hero {
    background: linear-gradient(135deg, #093452, #14496b);
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(9, 52, 82, 0.15);
}

.modern-province-hero .hero-icon {
    font-size: 26px;
    color: #ffd36b;
    margin-bottom: 12px;
}

.modern-province-hero .hero-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffd36b;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
}

.modern-province-hero .hero-kicker::before, 
.modern-province-hero .hero-kicker::after {
    content: "";
    height: 2px;
    width: 25px;
    background: #ffd36b;
    border-radius: 2px;
}

.modern-province-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 4.5vw, 48px);
    font-weight: 700;
    margin: 0 0 10px;
    color: #ffffff;
    line-height: 1.25;
}

.modern-province-hero .hero-hindi {
    font-size: clamp(18px, 2.5vw, 22px);
    color: #ffd36b;
    margin: 0 0 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.95;
}

.modern-province-hero .hero-alias {
    font-size: 14.5px;
    color: #cbe3f5;
    font-style: italic;
    margin: 0 0 20px;
    letter-spacing: 0.3px;
}

/* Hero Badge Cluster (Replaces tight vertical stacking) */
.hero-badge-cluster {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 auto 26px;
    max-width: 850px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
    text-decoration: none;
}

.hero-badge.badge-estate {
    background: rgba(255, 211, 107, 0.16);
    border: 1px solid rgba(255, 211, 107, 0.7);
    color: #ffd36b;
}

.hero-badge.badge-region {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #e2e8f0;
}

.hero-badge.badge-salute {
    background: rgba(230, 161, 42, 0.22);
    border: 1px solid #e6a12a;
    color: #ffe08a;
}
.hero-badge.badge-salute:hover {
    background: rgba(230, 161, 42, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.province-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 5px;
}

.hero-btn {
    font-size: 13px !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    cursor: pointer;
}
.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-outline-gold {
    background: rgba(255, 211, 107, 0.1) !important;
    color: #ffd36b !important;
    border: 1px solid #ffd36b !important;
    backdrop-filter: blur(4px) !important;
}
.btn-outline-gold:hover {
    background: rgba(255, 211, 107, 0.25) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 211, 107, 0.2);
}

/* Modern Sections & Cards */
.modern-facts-section,
.modern-content-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.modern-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: #082c4b;
    margin: 0 0 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Province at a Glance Section --- */
.modern-facts-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.modern-facts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.modern-fact-card {
    background: #fdfaf4;
    border: 1px solid #f1e9d8;
    border-radius: 12px;
    padding: 18px 20px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    min-width: 0;
}

.modern-fact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border-color: #ebdccb;
    background: #fffdf9;
}

.modern-fact-card .fact-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9c8b6b;
    margin-bottom: 6px;
}

.modern-fact-card .fact-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #082c4b;
    line-height: 1.35;
    word-break: break-word;
}

/* Responsive Breakpoints for Province at a Glance */
@media (max-width: 992px) {
    .modern-facts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .modern-facts-section {
        padding: 24px 20px;
    }
}

@media (max-width: 640px) {
    .modern-facts-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .modern-facts-section {
        padding: 20px 16px;
    }
    .modern-fact-card {
        padding: 14px 16px;
    }
    .hero-badge-cluster {
        gap: 8px;
        margin-bottom: 20px;
    }
    .hero-badge {
        font-size: 11.5px;
        padding: 5px 12px;
    }
}

.legacy-history-copy {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.82;
  color: #2c3e50;
  text-align: justify;
}
.legacy-history-copy p,
.legacy-history-copy .history-paragraph {
  margin: 0 0 13px;
  line-height: 1.82;
}
.legacy-history-copy strong,
.legacy-history-copy .history-bold {
  color: #082c4b;
  font-weight: 700;
}
.legacy-history-copy em,
.legacy-history-copy .history-italic {
  font-style: italic;
  color: #3b4e61;
}

/* History Markdown Headings */
.legacy-history-copy .history-heading {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.35;
  position: relative;
  letter-spacing: 0.01em;
}

.legacy-history-copy .history-h1 {
  font-size: 21px;
  color: #082c4b;
  margin: 26px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #ecdcc8;
  position: relative;
}
.legacy-history-copy .history-h1::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2.5px;
  background: linear-gradient(90deg, #c59b27 0%, #d4af37 100%);
  border-radius: 2px;
}

.legacy-history-copy .history-h2 {
  font-size: 17.5px;
  color: #082c4b;
  margin: 24px 0 10px;
  padding: 4px 0 4px 12px;
  border-left: 3.5px solid #c59b27;
  background: linear-gradient(90deg, rgba(197, 155, 39, 0.07) 0%, transparent 85%);
  border-radius: 0 4px 4px 0;
  line-height: 1.4;
  display: block;
}

.legacy-history-copy .history-h3 {
  font-size: 15.5px;
  color: #8c600f;
  margin: 18px 0 8px;
  font-style: italic;
  font-weight: 600;
}

.legacy-history-copy .history-h4 {
  font-size: 13.5px;
  color: #55697d;
  margin: 14px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* History Markdown Links */
.legacy-history-copy .history-link {
  color: #0c4d87;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1.5px solid rgba(12, 77, 135, 0.35);
  padding: 0 3px 1px;
  transition: all 0.2s ease;
  display: inline;
  border-radius: 3px;
}
.legacy-history-copy .history-link:hover {
  color: #a86c0b;
  border-bottom-color: #a86c0b;
  background: rgba(197, 155, 39, 0.1);
}
.legacy-history-copy .history-link i {
  font-size: 0.72em;
  opacity: 0.8;
  margin-left: 3px;
  vertical-align: baseline;
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.legacy-history-copy .history-link:hover i {
  opacity: 1;
  transform: translate(1px, -1px);
}
.legacy-history-copy .history-internal-link {
  color: #7a520e;
  border-bottom-color: rgba(122, 82, 14, 0.4);
}
.legacy-history-copy .history-internal-link:hover {
  color: #082c4b;
  border-bottom-color: #082c4b;
  background: rgba(8, 44, 75, 0.08);
}

/* History Markdown Lists */
.legacy-history-copy .history-list {
  margin: 8px 0 14px 18px;
  padding: 0;
  list-style: none;
}
.legacy-history-copy .history-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  line-height: 1.65;
}
.legacy-history-copy .history-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0;
  color: #c59b27;
  font-size: 11px;
}
.legacy-history-copy .history-ordered-list {
  margin: 8px 0 14px 22px;
  padding-left: 12px;
  color: #2c3e50;
}
.legacy-history-copy .history-ordered-list li {
  margin-bottom: 6px;
  line-height: 1.65;
}

/* History Markdown Quotes & Dividers */
.legacy-history-copy .history-quote {
  margin: 14px 0 16px;
  padding: 12px 18px;
  background: #fdfaf4;
  border-left: 3.5px solid #c59b27;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #3b4e61;
  box-shadow: 0 1px 4px rgba(8, 44, 75, 0.04);
}
.legacy-history-copy .history-divider {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ecdcc8 30%, #ecdcc8 70%, transparent);
  margin: 20px 0;
}

/* Collapsible History Section for Long Chronicles */
.history-content-collapsible {
  position: relative;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
}
.history-content-collapsible.is-collapsed {
  max-height: 270px;
}
.history-content-collapsible .history-collapse-gradient {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 95px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 75%, #ffffff 100%);
  pointer-events: none;
}
.history-content-collapsible.is-collapsed .history-collapse-gradient {
  display: block;
}
.history-toggle-wrap {
  text-align: center;
  margin-top: 14px;
  position: relative;
  z-index: 2;
}
.btn-history-toggle {
  background: #fdfaf4;
  color: #082c4b;
  border: 1.5px solid #ecdcc8;
  padding: 8px 24px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(8, 44, 75, 0.06);
  transition: all 0.2s ease;
  user-select: none;
}
.btn-history-toggle:hover {
  background: #082c4b;
  color: #ffd36b;
  border-color: #082c4b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(8, 44, 75, 0.16);
}
.btn-history-toggle i {
  color: #a86c0b;
  transition: transform 0.2s ease, color 0.2s ease;
}
.btn-history-toggle:hover i {
  color: #ffd36b;
}

/* --- LEGACY GENEALOGY TREE (Inside Modern Card) --- */
.legacy-genealogy {
    padding: 10px;
    font: 13px/1.6 Georgia, 'Times New Roman', serif;
    color: #3d3522;
}

.legacy-tree-root, .legacy-tree-branch {
    list-style: none;
    margin: 0;
    padding: 0;
}

.legacy-tree-branch {
    padding-left: 72px; 
    margin: 6px 0 10px 0;
    position: relative;
}

.tree-node {
    position: relative;
    margin-bottom: 20px;
}

.legacy-tree-root > .tree-node::before {
    content: "";
    position: absolute;
    top: 15px;
    bottom: -10px;
    left: 4px;
    border-left: 2px dotted #9e1b1b;
    z-index: 1;
}
.legacy-tree-root > .tree-node:last-child::before {
    display: none; 
}

.legacy-tree-root > .tree-node > .legacy-person {
    position: relative;
    padding-left: 20px;
}
.legacy-tree-root > .tree-node > .legacy-person::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 6px;
    background-color: #9e1b1b; 
}
.legacy-tree-root > .tree-node > .legacy-person::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    width: 10px;
    height: 2px;
    background-color: #9e1b1b; 
}

.legacy-tree-branch > .tree-node::before {
    content: "";
    position: absolute;
    top: -15px;
    bottom: 0;
    left: -42px;
    border-left: 2px solid #c4b07b; 
}
.legacy-tree-branch > .tree-node:last-child::before {
    bottom: auto;
    height: 25px; 
}
.legacy-tree-branch > .tree-node::after {
    content: "";
    position: absolute;
    top: 10px;
    left: -42px;
    width: 36px;
    border-top: 2px solid #c4b07b; 
}

.legacy-person {
    display: inline-block;
    padding: 2px 0;
}
.legacy-person-name { font-weight: bold; color: #3d3522; }
.legacy-person-name.root-name { color: #9e1b1b; }
.legacy-person-title { color: #3d3522; font-size: 11px; }
.legacy-person-hindi { color: #76642b; }
.legacy-person-period { color: #776c54; font-style: italic; font-size: 11px; }
.legacy-person-notes { color: #51472f; font-size: 11px; }

.legacy-empty-note { font: italic 12px Georgia, serif; color: #74684e; padding: 8px 10px; border-left: 2px solid #a28b39; background: #faf8f0; }

/* Pictures & Map placeholders inside modern cards */
.legacy-picture-placeholder { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: #e8e7e2; border: 1px solid #d3c9ac; color: #7a6b45; text-align: center; padding: 18px; border-radius: 8px; }
.legacy-picture-placeholder > i { font-size: 30px; color: #a38b37; }
.legacy-picture-placeholder p { margin: 0; font: 14px Georgia, serif; color: #244867; }
.legacy-picture-placeholder small { font-size: 10px; }

.legacy-map-placeholder { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: linear-gradient(35deg, #e4e7d9, #f4f0df 45%, #e1e8dd); border: 1px solid #c9c7b8; color: #2e5d76; position: relative; text-align: center; padding: 18px; border-radius: 8px; overflow: hidden; }
.legacy-map-placeholder:before, .legacy-map-placeholder:after { content: ""; position: absolute; width: 80%; height: 1px; background: #c9d0bb; transform: rotate(-13deg); }
.legacy-map-placeholder:after { transform: rotate(18deg); }
.legacy-map-placeholder > * { position: relative; z-index: 1; }
.legacy-map-placeholder i { font-size: 24px; color: #c34e36; }
.legacy-map-placeholder span { font: 700 15px Georgia, serif; }
.legacy-map-placeholder small, .legacy-map-placeholder p { font-size: 10px; color: #657567; margin: 0; }

.legacy-related-list { margin: 0; padding: 0 0 0 20px; columns: 3; column-gap: 24px; }
.legacy-related-list li { padding: 3px 0; break-inside: avoid; color: #9b771c; }
.legacy-related-list a { color: #275a8b; text-decoration: underline; font-size: 13px; font-weight: bold; }
.legacy-related-list small { color: #776e5a; font-size: 11px; }

.legacy-up-links { text-align: right; font-size: 11px; margin: 14px 0 0; }
.legacy-up-links a { color: #275a8b; font-weight: bold; }

/* --- FOOTER --- */
.footer { background: #061f35; color: #d6e0e8 }
.footer-main { max-width: 1440px; margin: auto; padding: 45px 28px; display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 35px }
.footer .brand-name { color: white; font-size: 30px }
.footer .brand-mark { color: #fff }
.footer .tagline { color: #aebdca }
.footer p { font-size: 13px; line-height: 1.8; color: #aebdca; max-width: 390px; margin-top: 17px }
.footer h3 { font-size: 14px; color: var(--gold2); margin-bottom: 16px }
.footer ul { list-style: none; margin: 0; padding: 0 }
.footer li { margin: 11px 0; font-size: 13px; color: #c1ced9 }
.footer a:hover { color: var(--gold2) }
.footer-bottom { border-top: 1px solid #ffffff1c; text-align: center; padding: 17px 20px; font-size: 12px; color: #aebdca }

.back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #fff;
  box-shadow: 0 4px 14px rgba(8, 44, 75, 0.2);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.2s;
  cursor: pointer;
}
.back-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.back-top:hover {
  background: var(--navy);
  color: var(--gold2);
}

/* --- DASHBOARD --- */
.dashboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px }
.dashboard-heading h1 { font: 700 36px 'Playfair Display', serif; color: var(--navy); margin: 0 0 8px }
.dashboard-heading p { color: var(--muted) }
.admin-pill { background: #fff0d1; color: #8b590c; padding: 10px 14px; border-radius: 24px; font-size: 12px; font-weight: 800 }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px }
.dashboard-card, .dashboard-note { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 25px; box-shadow: 0 5px 18px #0c2d4a0a }
.dashboard-card > i { display: block; color: #bd7d15; font-size: 25px; margin-bottom: 18px }
.dashboard-card span { display: block; color: var(--muted); font-size: 13px }
.dashboard-card strong { display: block; font: 700 26px 'Playfair Display', serif; color: var(--navy); margin-top: 7px }
.dashboard-note { margin-top: 22px }
.dashboard-note h2 { font: 700 24px 'Playfair Display', serif; color: var(--navy) }
.dashboard-note p { line-height: 1.7; color: var(--muted) }

/* --- RESPONSIVE QUERIES & MOBILE ENGINE --- */
img, video, iframe, embed, object, svg {
  max-width: 100%;
  height: auto;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

.table-responsive,
.admin-table-wrap,
.responsive-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media(max-width:1200px){
  .nav-inner { flex-wrap: wrap }
  .nav-links { order: 3; width: 100%; justify-content: space-between }
  .nav-search { margin-left: auto }
  .collection { grid-template-columns: 1fr }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) }
  .hero-inner { grid-template-columns: 1fr 1fr }
}

@media(max-width:850px){
  .topbar-inner { padding: 9px 18px }
  .top-right { display: none }
  .nav-inner { padding: 14px 18px; min-height: 80px; gap: 15px; }
  .brand-name { font-size: 32px }
  .brand-mark { font-size: 34px }
  .tagline { letter-spacing: 2px }
  .menu-toggle { 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(8,44,75,0.15);
  }
  .nav-search-wrap { 
    order: 3; 
    width: 100%; 
    margin: 10px 0 0; 
    position: relative; 
    z-index: 10; 
  }
  .nav-search { 
    order: 1; 
    width: 100%; 
    margin: 0; 
    min-width: 0; 
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1.5px solid #e2d9cc;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(8, 44, 75, 0.06);
    overflow: hidden;
  }
  .nav-search input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 11px 16px;
    font-size: 15px;
    border: 0;
    outline: 0;
    background: transparent;
  }
  .nav-search button {
    width: 48px;
    min-width: 48px;
    height: auto;
    border: 0;
    border-radius: 0 30px 30px 0;
    background: linear-gradient(135deg, #f5bd4b, #d98908);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
  }
  .nav-search:focus-within {
    border-color: #d98908;
    box-shadow: 0 0 0 3px rgba(230, 161, 42, 0.2);
  }
  .nav-links { 
    display: none; 
    order: 4; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px; 
    padding: 16px 0 8px;
    width: 100%;
  }
  .nav-links.open { display: grid }
  .nav-links a {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    white-space: normal;
    color: #082c4b;
    transition: all 0.2s ease;
  }
  .nav-links a i {
    font-size: 16px;
    margin-bottom: 0;
    width: 20px;
    text-align: center;
    color: #a86c0b;
  }
  .nav-links a:hover, .nav-links a.active {
    background: #082c4b;
    color: #ffd36b;
    border-color: #082c4b;
  }
  .nav-links a:hover i, .nav-links a.active i {
    color: #ffd36b;
  }

  .hero-inner { grid-template-columns: 1fr; padding: 48px 20px 25px; gap: 30px }
  .hero-script { font-size: 22px; right: 5%; top: 5% }
  .section { padding: 42px 20px }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .stats-inner { grid-template-columns: repeat(2, 1fr) }
  .stat:nth-child(2) { border: 0 }
  .stat { padding: 12px }
  .article-grid { grid-template-columns: repeat(2, 1fr) }
  .footer-main { grid-template-columns: repeat(2, 1fr); padding: 38px 20px }
  .dashboard-grid { grid-template-columns: 1fr 1fr }
  
  .province-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .filter-bar { flex-wrap: wrap }
  .filter-bar input, .filter-bar select { flex-basis: 40% }
  .filter-bar .btn-gold { justify-content: center }

  .modern-facts-grid { grid-template-columns: repeat(2, 1fr); }
  .legacy-related-list { columns: 2; }
}

@media(max-width:520px){
  .topbar-inner { font-size: 11px }
  .top-left { gap: 10px }
  .brand { min-width: 0; }
  .brand-mark { font-size: 28px }
  .brand-name { font-size: 24px }
  .tagline { font-size: 8px; letter-spacing: 1.2px; margin-top: 4px; }
  .nav-inner { gap: 10px; padding: 12px 15px; }
  .menu-toggle { width: 42px; height: 42px; font-size: 17px; }
  .nav-search-wrap { margin-top: 6px; }
  .nav-search input { font-size: 15px; padding: 10px 14px; }
  .nav-search button { width: 44px; min-width: 44px; height: auto; }
  .nav-links { grid-template-columns: 1fr; gap: 8px; }
  .hero-inner { padding-top: 45px; padding-left: 15px; padding-right: 15px; }
  .hero h1 { font-size: 30px; letter-spacing: -.5px; }
  .hero-copy { font-size: 14px }
  .hero-script { display: none }
  
  .search-panel { 
    padding: 18px 14px; 
    width: 100%; 
    max-width: 100%; 
    box-sizing: border-box; 
  }
  .search-panel-top { grid-template-columns: 32px 1fr; gap: 10px; margin-bottom: 12px; }
  .search-panel-top > i { font-size: 24px }
  .search-panel h2 { font-size: 15px; line-height: 1.35; }
  .powered { margin-left: 0; margin-top: 10px; font-size: 11px; }
  
  .big-search { 
    width: 100%; 
    display: flex; 
    align-items: stretch; 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  }
  .big-search input { 
    flex: 1; 
    min-width: 0; 
    width: 100%; 
    padding: 13px 14px; 
    font-size: 15px; 
    border: 0; 
    outline: 0; 
    border-radius: 10px 0 0 10px; 
  }
  .big-search button { 
    width: 50px; 
    min-width: 50px; 
    padding: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 16px; 
    flex-shrink: 0; 
    border-radius: 0 10px 10px 0; 
    background: var(--gold); 
    color: #fff; 
  }
  .section-heading h2, .latest-head h2 { font-size: 25px }
  .category-grid, .article-grid, .dashboard-grid { grid-template-columns: 1fr }
  .category-image { height: 150px }
  .stats-inner { padding: 20px 12px; gap: 8px }
  .stat strong { font-size: 24px }
  .stat span { font-size: 10px }
  .latest-head { align-items: start; flex-direction: column }
  .footer-main { grid-template-columns: 1fr; gap: 24px }
  .search-results { padding: 0 15px }
  .dashboard-heading { align-items: start; flex-direction: column }

  .page-hero { padding: 25px 18px }
  .province-grid { grid-template-columns: 1fr }
  .filter-bar input, .filter-bar select { flex-basis: 100%; width: 100%; }
  .filter-bar .btn-gold { width: 100%; justify-content: center }
  
  .modern-facts-grid { grid-template-columns: 1fr; }
  .modern-province-hero { padding: 35px 14px; }
  .legacy-related-list { columns: 1; }
}

/* --- RESPONSIVE ON THIS DAY WIDGET --- */
.otd-widget-card {
  display: flex;
  flex-direction: row;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #e9e1d3;
  background: #fff;
  box-shadow: 0 6px 25px rgba(0,0,0,0.04);
  max-width: 1160px;
  margin: 0 auto;
}
.otd-date-pane {
  background: linear-gradient(135deg, #a72834 0%, #7a1d26 100%);
  color: #fff;
  padding: 40px 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 250px;
  flex: 0 0 250px;
  position: relative;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.otd-content-pane {
  padding: 30px 35px;
  flex: 1;
  min-width: 0;
  background: #fff;
}
.otd-filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .otd-widget-card {
    flex-direction: column !important;
  }
  .otd-date-pane {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 26px 18px !important;
  }
  .otd-content-pane {
    padding: 20px 14px !important;
    width: 100% !important;
  }
  .otd-filter-bar {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 8px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .otd-filter-bar::-webkit-scrollbar {
    display: none;
  }
  .otd-filter-btn {
    flex-shrink: 0;
  }
}

/* --- RESPONSIVE COMPARE STATES --- */
.compare-form-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 15px;
  align-items: center;
}
@media (max-width: 768px) {
  .compare-form-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 12px !important;
  }
  .compare-form-grid .vs-divider {
    padding: 0 !important;
  }
  .compare-form-grid button {
    width: 100% !important;
    justify-content: center !important;
  }
  .compare-container {
    padding: 25px 15px 50px !important;
  }
  .compare-card-head {
    padding: 20px 15px !important;
  }
  .compare-table td {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }
}

/* --- RESPONSIVE PROVINCE PROFILE & GENEALOGY TREE --- */
@media (max-width: 640px) {
  .modern-page-wrapper {
    padding: 12px 10px 32px !important;
  }
  .modern-content-section {
    padding: 18px 12px !important;
    border-radius: 12px !important;
    margin-bottom: 18px !important;
  }
  .province-hero-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }
  .province-hero-actions a,
  .province-hero-actions button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Genealogy Tree Mobile Optimization */
  .legacy-genealogy {
    padding: 2px 0 !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .legacy-tree-root {
    padding-left: 0 !important;
  }

  .tree-node {
    margin-bottom: 20px !important;
    position: relative !important;
  }

  .legacy-tree-root > .tree-node::before {
    left: 4px !important;
    top: 14px !important;
    bottom: -10px !important;
    border-left: 2px dotted #9e1b1b !important;
  }

  .legacy-tree-root > .tree-node > .legacy-person {
    padding-left: 22px !important;
    display: block !important;
  }

  .legacy-tree-root > .tree-node > .legacy-person::before {
    left: 1px !important;
    width: 6px !important;
    height: 6px !important;
    top: 6px !important;
  }

  .legacy-tree-root > .tree-node > .legacy-person::after {
    left: 7px !important;
    width: 9px !important;
    top: 8px !important;
  }

  /* Child Branch with Clean |_ Elbow on Mobile */
  .legacy-tree-branch {
    padding-left: 60px !important;
    margin: 6px 0 10px 0 !important;
    position: relative !important;
  }

  .legacy-tree-branch > .tree-node::before {
    content: "" !important;
    position: absolute !important;
    top: -14px !important;
    bottom: 0 !important;
    left: -30px !important;
    border-left: 2px solid #c4b07b !important;
  }

  .legacy-tree-branch > .tree-node:last-child::before {
    bottom: auto !important;
    height: 24px !important;
  }

  .legacy-tree-branch > .tree-node::after {
    content: "" !important;
    position: absolute !important;
    top: 10px !important;
    left: -30px !important;
    width: 25px !important;
    border-top: 2px solid #c4b07b !important;
  }

  .legacy-tree-branch > .tree-node > .legacy-person {
    padding-left: 0 !important;
    display: block !important;
  }

  /* Person Details Mobile Sizing */
  .legacy-person {
    font-size: 13px !important;
    line-height: 1.5 !important;
    display: block !important;
  }

  .legacy-person-name {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    display: inline !important;
  }

  .gen-badge {
    font-size: 10px !important;
    padding: 1px 6px !important;
    white-space: nowrap !important;
    margin-right: 4px !important;
  }

  .gen-badge i {
    font-size: 9px !important;
  }

  .royal-badge {
    font-size: 9.5px !important;
    padding: 1.5px 5px !important;
    margin-left: 3px !important;
    margin-top: 2px !important;
    line-height: 1.3 !important;
    display: inline-block !important;
    vertical-align: baseline !important;
    white-space: normal !important;
  }

  .tree-toggle-btn {
    width: 18px !important;
    height: 18px !important;
    font-size: 9px !important;
    margin-right: 4px !important;
    vertical-align: middle !important;
  }

  .tree-bullet {
    margin-right: 6px !important;
    font-size: 5px !important;
    vertical-align: middle !important;
  }

  .legacy-person-notes {
    padding-left: 4px !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    margin-top: 3px !important;
    color: #556575 !important;
  }

  .legacy-person-period {
    font-size: 11px !important;
    white-space: nowrap !important;
    display: inline-block !important;
  }

  .legacy-person-hindi {
    font-size: 12px !important;
    display: inline !important;
  }

  .tree-gap-node {
    margin: 6px 0 6px 14px !important;
  }

  .tree-gap-badge {
    font-size: 10px !important;
    padding: 2px 7px !important;
  }

  .state-emblem-section img {
    max-width: 160px !important;
  }
}

/* --- RESPONSIVE PROVINCE DIRECTORY --- */
.province-filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 15px;
  align-items: center;
}
@media (max-width: 768px) {
  .province-filter-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .province-filter-grid button {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* --- RESPONSIVE ADMIN DASHBOARD --- */
.normalizer-grid,
.events-mgmt-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 30px;
  align-items: start;
}
@media (max-width: 900px) {
  .normalizer-grid,
  .events-mgmt-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .admin-panel {
    padding: 20px 15px !important;
    overflow-x: auto !important;
  }
  .admin-form-card {
    padding: 20px 15px !important;
  }
  .page-hero {
    padding: 25px 18px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .page-hero div:last-child {
    width: 100% !important;
  }
  .page-hero .btn-gold {
    flex: 1 !important;
    justify-content: center !important;
  }
}



/* --- ADMIN DASHBOARD FORMS --- */
.admin-form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 18px #0c2d4a0a;
}
.admin-form-card h2 {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1e9d8;
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-form-card h2 i {
    color: var(--gold);
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-group label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
}
.form-group input[type="text"], 
.form-group input[type="number"], 
.form-group select, 
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #dcdfe5;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: #fbfcfd;
    transition: border-color 0.2s;
}
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: #fff;
}
.form-group textarea {
    resize: vertical;
}
.btn-submit {
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    margin-top: 25px;
    transition: 0.2s;
}
.btn-submit:hover {
    background: var(--navy2);
    box-shadow: 0 4px 12px rgba(8, 44, 75, 0.15);
}
.admin-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 14px;
}
.alert-success {
    background: #eef8f1;
    color: #1a6e34;
    border: 1px solid #c9e8d4;
}
.alert-error {
    background: #fdf3f4;
    color: #a72834;
    border: 1px solid #f6d2d6;
}

@media(max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* --- LIGHTBOX & IMAGE GALLERY --- */
.gallery-card {
    border: 1px solid #dcdfe5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
.gallery-caption {
    padding: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #082c4b;
    text-align: center;
    border-top: 1px solid #f1e9d8;
    background: #fbfcfd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modern-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(4, 21, 36, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.modern-lightbox .lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    object-fit: contain;
}
.modern-lightbox #lightboxCaption {
    margin-top: 15px;
    color: #ffd36b;
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    text-align: center;
    max-width: 80%;
}
.modern-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.modern-lightbox .lightbox-close:hover {
    color: #e6a12a;
}

/* --- LIVE SEARCH DROPDOWN --- */
.live-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: 90vw;
  background: #fff;
  border: 1px solid #e9e1d3;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(8, 44, 75, 0.15);
  z-index: 1000;
  max-height: 420px;
  overflow-y: auto;
}
@media (max-width: 850px) {
  .live-search-dropdown {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
}

/* --- RESPONSIVE SEARCH BARS --- */
.archive-search-form {
  display: flex;
  gap: 12px;
  background: #fbfcfd;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #dcdfe5;
  max-width: 700px;
  margin-bottom: 35px;
  align-items: center;
  box-sizing: border-box;
}
.archive-search-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid #c5d5e6;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
}
.archive-search-form button {
  padding: 12px 22px;
  font-size: 15px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .error-search-form {
    border-radius: 12px !important;
    padding: 8px !important;
  }
  .error-search-form input {
    font-size: 14px !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
  }
  .error-search-form button {
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
  .archive-search-form {
    flex-direction: column !important;
    padding: 14px 12px !important;
    gap: 10px !important;
    width: 100% !important;
  }
  .archive-search-form input {
    width: 100% !important;
    padding: 11px 14px !important;
    font-size: 14px !important;
    box-sizing: border-box;
  }
  .archive-search-form button {
    width: 100% !important;
    justify-content: center !important;
  }
}
.live-search-header {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #a72834;
  letter-spacing: 1px;
  background: #fbfcfd;
  border-bottom: 1px solid #f1eee9;
}
.live-search-header i { margin-right: 6px; }
.live-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #f8f6f2;
  transition: background 0.15s;
}
.live-search-item:hover {
  background: #fdf8ef;
}
.live-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f2f5f8;
  color: #082c4b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.live-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #082c4b;
  line-height: 1.3;
}
.live-item-sub {
  font-size: 12px;
  color: #64758a;
  line-height: 1.3;
}
.live-search-empty {
  padding: 20px;
  text-align: center;
  color: #64758a;
  font-size: 13px;
}

/* --- RESPONSIVE PAGINATION STYLES --- */
.pagination-wrapper {
  margin-top: 45px;
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  color: #102e46;
  background: #ffffff;
  border: 1px solid #dce4ed;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  transition: all 0.2s ease;
}
.pagination-link:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #082c4b;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.07);
}
.pagination-link.active {
  background: #082c4b;
  color: #ffffff;
  border-color: #082c4b;
  box-shadow: 0 6px 14px rgba(8, 44, 75, 0.28);
  cursor: default;
  pointer-events: none;
  transform: none;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(238, 164, 27, 0.25);
}
.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 42px;
  font-size: 18px;
  font-weight: 800;
  color: #8fa0b5;
  letter-spacing: 2px;
  user-select: none;
}
.pagination-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: #64758a;
  flex-wrap: wrap;
  justify-content: center;
}
.pagination-jump-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pagination-jump-input {
  width: 58px;
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  color: #102e46;
  background: #ffffff;
}
.pagination-jump-input:focus {
  outline: none;
  border-color: #082c4b;
  box-shadow: 0 0 0 2px rgba(8, 44, 75, 0.15);
}
.pagination-jump-btn {
  padding: 5px 14px !important;
  font-size: 12px !important;
  border: none;
  border-radius: 6px !important;
  cursor: pointer;
}

@media (max-width: 600px) {
  .pagination-wrapper {
    margin-top: 30px;
    gap: 12px;
  }
  .pagination {
    gap: 5px;
  }
  .pagination-link {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 12px;
  }
  .pagination-btn {
    padding: 8px 14px !important;
    font-size: 12px !important;
    gap: 5px;
  }
  .pagination-ellipsis {
    min-width: 18px;
    height: 36px;
    font-size: 15px;
  }
  .pagination-meta {
    font-size: 12px;
    flex-direction: column;
    gap: 8px;
  }
}

/* --- PRINT & PDF EXPORT OPTIMIZATIONS --- */
@media print {
  .topbar, .mainnav, .footer, .back-top, .legacy-up-links, 
  .comments-section, .btn-print, .modern-breadcrumb, .tree-toggle-btn {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .modern-page-wrapper, .section {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
  .legacy-tree-branch {
    display: block !important;
  }
  .royal-badge {
    border: 1px solid #999 !important;
    color: #000 !important;
  }
}

/* --- HERITAGE TOURISM & PLAN YOUR VISIT --- */
.tourism-guide-section {
  background: #fff;
  border: 1px solid #e9e1d3;
  border-radius: 14px;
  padding: 30px;
  margin-bottom: 35px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.tourism-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
  border-bottom: 1px solid #f1ece4;
  padding-bottom: 20px;
}
.tourism-title {
  margin: 0 0 6px 0;
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: #082c4b;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tourism-subtitle {
  margin: 0;
  font-size: 14px;
  color: #64758a;
}
.connectivity-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.connectivity-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fbf8f3;
  border: 1px solid #ecdcc8;
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 13px;
  color: #4a3b2c;
  font-weight: 500;
}
.connectivity-pill i {
  color: #a86c0b;
}
.connectivity-pill strong {
  color: #082c4b;
}
.connectivity-pill-map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #082c4b !important;
  border: 1px solid #082c4b !important;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(8, 44, 75, 0.15);
  transition: all 0.2s ease;
}
.connectivity-pill-map i {
  color: #ffd36b !important;
}
.connectivity-pill-map strong,
.connectivity-pill-map span {
  color: #ffffff !important;
  font-weight: 700;
}
.connectivity-pill-map:hover {
  background: #11426a !important;
  border-color: #11426a !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(8, 44, 75, 0.25);
}
.connectivity-pill-map:hover strong,
.connectivity-pill-map:hover span,
.connectivity-pill-map:hover i {
  color: #ffffff !important;
}
.monuments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 22px;
}
.monument-item-card {
  background: #fff;
  border: 1px solid #e8e2d7;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.monument-item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.monument-img-container {
  height: 190px;
  position: relative;
  overflow: hidden;
  background: #112d48;
}
.monument-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.monument-item-card:hover .monument-img-container img {
  transform: scale(1.04);
}
.monument-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(8, 44, 75, 0.9);
  color: #ffd36b;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.heritage-hotel-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #b45309;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.monument-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.monument-name {
  margin: 0 0 10px 0;
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  color: #082c4b;
  font-weight: 700;
}
.monument-meta {
  font-size: 12px;
  color: #64758a;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e9e1d3;
}
.monument-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.monument-meta i {
  color: #a86c0b;
  width: 14px;
}
.monument-desc {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.6;
  margin: 0 0 18px 0;
  flex: 1;
}
.monument-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.btn-nav-directions {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #082c4b;
  color: #ffd36b;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.1s ease;
}
.btn-nav-directions:hover {
  background: #11426a;
  color: #fff;
  transform: translateY(-1px);
}
.btn-book-stay {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #166534;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 6px rgba(22, 101, 52, 0.2);
}
.btn-book-stay:hover {
  background: #14532d;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(22, 101, 52, 0.3);
}
.btn-book-tour {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fdf6ec;
  color: #a86c0b;
  border: 1px solid #ecdcc8;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-book-tour:hover {
  background: #a86c0b;
  color: #ffffff;
  border-color: #a86c0b;
  transform: translateY(-1px);
}
.pill-affiliate-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #082c4b;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  margin-left: 6px;
  transition: all 0.2s ease;
}
.pill-affiliate-link:hover {
  background: #082c4b;
  color: #ffd36b;
  border-color: #082c4b;
}
.affiliate-disclosure-note {
  margin-top: 25px;
  padding: 12px 18px;
  background: #fbfbfd;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.affiliate-disclosure-note i {
  color: #a86c0b;
  margin-top: 2px;
  font-size: 14px;
}

/* --- CONTRIBUTION MODAL & PROMPT --- */
.heritage-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 44, 75, 0.75);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.heritage-modal-overlay.active {
  display: flex;
}
.heritage-modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  border-radius: 16px;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid #d5c3aa;
  animation: modalSlideIn 0.25s ease-out;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.heritage-modal-header {
  background: linear-gradient(135deg, #082c4b, #124874);
  color: #fff;
  padding: 20px 25px;
  position: relative;
  border-bottom: 2px solid #ffd36b;
}
.heritage-modal-title {
  margin: 0 0 5px 0;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: #ffd36b;
  display: flex;
  align-items: center;
  gap: 10px;
}
.heritage-modal-subtitle {
  margin: 0;
  font-size: 13px;
  color: #dce8ef;
}
.heritage-modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.heritage-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.heritage-modal-body {
  padding: 25px;
}
.contrib-form-group {
  margin-bottom: 18px;
}
.contrib-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #082c4b;
  margin-bottom: 6px;
}
.contrib-form-group input,
.contrib-form-group select,
.contrib-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
}
.contrib-form-group input:focus,
.contrib-form-group select:focus,
.contrib-form-group textarea:focus {
  border-color: #a86c0b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(168, 108, 11, 0.15);
}
.contrib-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
@media (max-width: 600px) {
  .contrib-form-row {
    grid-template-columns: 1fr;
  }
}
.contrib-hint {
  font-size: 11px;
  color: #64758a;
  margin-top: 4px;
}
.contrib-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
  border-top: 1px solid #f1ece4;
  padding-top: 18px;
}
