/* ============================================================
   Discover Ugep – Main Stylesheet
   Design: Earthy palette + bold serif headings + warm cultural feel
   ============================================================ */

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  /* Palette */
  --clr-primary:       #8B4513; /* Saddle brown – rich earth */
  --clr-primary-dark:  #6B3410;
  --clr-primary-light: #C4773B;
  --clr-accent:        #DAA520; /* Golden rod – harvest gold */
  --clr-accent-light:  #F5C842;
  --clr-green:         #2D6A4F; /* Forest green */
  --clr-green-light:   #52B788;

  --clr-bg:            #FDFAF5; /* Warm white */
  --clr-bg-alt:        #F5EFE6; /* Parchment */
  --clr-surface:       #FFFFFF;
  --clr-border:        #E8DDD0;

  --clr-text:          #1A1208; /* Deep warm black */
  --clr-text-muted:    #6B5B4E;
  --clr-text-light:    #9B8B7E;

  /* Typography */
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Inter', system-ui, sans-serif;
  --font-serif:    'Libre Baskerville', Georgia, serif;

  /* Spacing */
  --section-py:    5rem;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(139,69,19,.10);
  --shadow-md:     0 4px 16px rgba(139,69,19,.12);
  --shadow-lg:     0 12px 40px rgba(139,69,19,.15);
  --shadow-xl:     0 24px 64px rgba(139,69,19,.20);

  /* Radius */
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     32px;

  /* Navbar */
  --navbar-h:      76px;

  /* Transitions */
  --ease:          cubic-bezier(.4,0,.2,1);
}

/* Dark Mode Overrides */
[data-bs-theme="dark"] {
  --clr-bg:        #0F0A05;
  --clr-bg-alt:    #1A1208;
  --clr-surface:   #1E150A;
  --clr-border:    #2E2015;
  --clr-text:      #F5EFE6;
  --clr-text-muted:#B8A898;
  --clr-text-light:#7A6A5E;
}

/* ── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-h);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

::selection { background: var(--clr-accent); color: #000; }

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

a { color: var(--clr-primary); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--clr-accent); }

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.25;
  font-weight: 700;
  color: var(--clr-text);
}

.display-hero {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  font-family: var(--font-display);
}

.section-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--clr-primary);
  display: block;
  margin-bottom: .5rem;
}

.lead {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--clr-text-muted);
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all .25s var(--ease);
}

.btn-primary {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--clr-primary-dark);
  border-color: var(--clr-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #000;
}
.btn-accent:hover {
  background: var(--clr-accent-light);
  border-color: var(--clr-accent-light);
  transform: translateY(-2px);
}

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

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s var(--ease);
}
.btn-icon:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  transform: scale(1.05);
}

.btn-lg { padding: .875rem 2rem; font-size: 1.05rem; }
.btn-pill { border-radius: 50px; }

/* ── NAVBAR ──────────────────────────────────────────────────── */
.navbar-main {
  height: var(--navbar-h);
  background: rgba(253, 250, 245, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--clr-border);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
  z-index: 1030;
}

[data-bs-theme="dark"] .navbar-main {
  background: rgba(15,10,5,.92);
}

.navbar-main.scrolled {
  box-shadow: var(--shadow-md);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.brand-text { line-height: 1.2; }

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--clr-primary);
}

.brand-sub {
  display: block;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

.navbar-main .nav-link {
  font-weight: 500;
  font-size: .9rem;
  color: var(--clr-text-muted) !important;
  padding: .5rem .9rem !important;
  border-radius: var(--radius-sm);
  transition: all .2s var(--ease);
  position: relative;
}

.navbar-main .nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--clr-accent);
  border-radius: 2px;
  transition: width .25s var(--ease);
}

.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
  color: var(--clr-primary) !important;
}

.navbar-main .nav-link:hover::after,
.navbar-main .nav-link.active::after {
  width: 70%;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(253,250,245,.97);
  backdrop-filter: blur(20px);
  padding: 1.5rem 0;
  transform: translateY(-100%);
  transition: transform .3s var(--ease);
  z-index: 1040;
  border-bottom: 2px solid var(--clr-primary);
}

[data-bs-theme="dark"] .search-overlay {
  background: rgba(15,10,5,.97);
}

.search-overlay.active { transform: translateY(0); }

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.25rem;
  border: 2px solid var(--clr-primary);
  border-radius: var(--radius-md);
  background: var(--clr-surface);
}

.search-input-wrap i:first-child { color: var(--clr-primary); font-size: 1.1rem; }

.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--clr-text);
}

.search-close {
  background: none;
  border: none;
  color: var(--clr-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color .2s;
}
.search-close:hover { color: var(--clr-primary); }

/* ── HERO SLIDER ─────────────────────────────────────────────── */

/* Wrapper */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #1A0A02;
  user-select: none;
}

/* ── Track & Slides ── */
.hs-track {
  position: absolute;
  inset: 0;
}

.hs-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s var(--ease), visibility .9s;
  will-change: opacity;
}

.hs-slide--active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Exiting slide stays visible until new one is fully in */
.hs-slide--leaving {
  opacity: 0;
  visibility: visible;
  z-index: 1;
  transition: opacity .9s var(--ease);
}

/* ── Background Image ── */
.hs-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hs-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Ken-Burns zoom — subtle & cinematic */
  transform: scale(1.08);
  transition: transform 7s ease-out;
  filter: brightness(.52);
}

.hs-slide--active .hs-bg img {
  transform: scale(1);
}

/* ── Colour Overlay ── */
.hs-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right,  rgba(10,4,0,.72) 0%, rgba(10,4,0,.1) 65%),
    linear-gradient(to top,    rgba(10,4,0,.70) 0%, transparent 50%);
}

/* ── Content ── */
.hs-content {
  position: relative;
  z-index: 3;
  color: #fff;
  padding-top: var(--navbar-h);
}

/* Animated children */
[data-hs-anim] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}

.hs-slide--active [data-hs-anim] {
  opacity: 1;
  transform: translateY(0);
}

.hs-slide--active [data-hs-anim][data-hs-delay="0"]   { transition-delay: .15s; }
.hs-slide--active [data-hs-anim][data-hs-delay="120"] { transition-delay: .27s; }
.hs-slide--active [data-hs-anim][data-hs-delay="240"] { transition-delay: .39s; }
.hs-slide--active [data-hs-anim][data-hs-delay="360"] { transition-delay: .51s; }
.hs-slide--active [data-hs-anim][data-hs-delay="480"] { transition-delay: .63s; }

/* ── Badge ── */
.hs-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(218,165,32,.18);
  border: 1px solid rgba(218,165,32,.55);
  border-radius: 50px;
  padding: .38rem 1.1rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--clr-accent-light);
  margin-bottom: 1.4rem;
  backdrop-filter: blur(6px);
}

/* ── Title ── */
.hs-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
}

.hs-accent {
  color: var(--clr-accent-light);
  font-style: italic;
}

/* ── Subtitle ── */
.hs-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  color: rgba(255,255,255,.84);
  max-width: 580px;
  line-height: 1.75;
  margin-bottom: 2.2rem;
}

/* ── CTA Buttons ── */
.hs-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hs-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .82rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .25s var(--ease);
}

.btn-hs-primary {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #000;
}
.btn-hs-primary:hover {
  background: var(--clr-accent-light);
  border-color: var(--clr-accent-light);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(218,165,32,.4);
}

.btn-hs-outline {
  background: transparent;
  border-color: rgba(255,255,255,.55);
  color: #fff;
  backdrop-filter: blur(4px);
}
.btn-hs-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
  color: #fff;
  transform: translateY(-3px);
}

/* ── Stats Row ── */
.hs-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,.18);
}

.hs-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--clr-accent-light);
  line-height: 1;
}

.hs-stat-label {
  font-size: .78rem;
  color: rgba(255,255,255,.68);
  letter-spacing: .05em;
  margin-top: .3rem;
}

/* ── Slide Number (bottom-right) ── */
.hs-slide-num {
  position: absolute;
  bottom: 5.5rem;
  right: 2.5rem;
  z-index: 4;
  display: flex;
  align-items: baseline;
  gap: .3rem;
  color: rgba(255,255,255,.5);
  font-size: .75rem;
  font-family: var(--font-display);
  letter-spacing: .05em;
  /* only show on active slide */
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.hs-slide--active .hs-slide-num { opacity: 1; }

.hs-slide-cur {
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  line-height: 1;
}

/* ── Navigation Arrows ── */
.hs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all .25s var(--ease);
}

.hs-arrow:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  transform: translateY(-50%) scale(1.08);
}

.hs-arrow--prev { left: 1.75rem; }
.hs-arrow--next { right: 1.75rem; }

/* ── Dot Indicators ── */
.hs-dots {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: .6rem;
  align-items: center;
}

.hs-dot {
  position: relative;
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.3);
  border: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: width .3s var(--ease), background .3s var(--ease);
}

.hs-dot--active {
  width: 52px;
  background: rgba(255,255,255,.25);
}

/* Animated fill inside active dot */
.hs-dot-progress {
  position: absolute;
  inset: 0;
  background: var(--clr-accent);
  transform: scaleX(0);
  transform-origin: left;
  border-radius: 2px;
}

.hs-dot--active .hs-dot-progress {
  animation: dotFill var(--hs-duration, 6000ms) linear forwards;
}

@keyframes dotFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Thin progress bar (top edge) ── */
.hs-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,.12);
  z-index: 6;
}

.hs-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--clr-primary), var(--clr-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .1s linear;
}

/* ── Scroll Hint ── */
.hs-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.45);
  font-size: .65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hs-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.5));
  animation: scrollLine 1.6s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  45%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  55%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .hs-arrow { width: 42px; height: 42px; font-size: .85rem; }
  .hs-arrow--prev { left: 1rem; }
  .hs-arrow--next { right: 1rem; }
  .hs-scroll-hint { display: none; }
  .hs-slide-num   { display: none; }
}

@media (max-width: 575px) {
  .hero-slider { height: 100svh; }
  .hs-stats { gap: 1.5rem; }
  .hs-stat-num { font-size: 1.6rem; }
  .hs-arrow { display: none; }
  .hs-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
}

/* ── SECTIONS ────────────────────────────────────────────────── */
section { padding: var(--section-py) 0; }

.section-alt { background: var(--clr-bg-alt); }

.section-header { margin-bottom: 3rem; }

.divider-ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem auto;
  width: fit-content;
}

.divider-ornament::before,
.divider-ornament::after {
  content: '';
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--clr-accent));
}

.divider-ornament::after {
  background: linear-gradient(to left, transparent, var(--clr-accent));
}

.divider-ornament i { color: var(--clr-accent); font-size: .9rem; }

/* ── CARDS ───────────────────────────────────────────────────── */
.ugep-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  height: 100%;
}

.ugep-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.ugep-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.ugep-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.ugep-card:hover .card-img-wrap img {
  transform: scale(1.08);
}

.ugep-card .card-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: var(--clr-primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 50px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ugep-card .card-featured-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: var(--clr-accent);
  color: #000;
  font-size: .7rem;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 50px;
}

.ugep-card .card-body {
  padding: 1.5rem;
}

.ugep-card .card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: .5rem;
  color: var(--clr-text);
}

.ugep-card .card-text {
  font-size: .9rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

.ugep-card .card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .8rem;
  color: var(--clr-text-light);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--clr-border);
}

.ugep-card .card-meta i {
  color: var(--clr-primary);
  font-size: .85rem;
}

/* ── FACT CARDS ──────────────────────────────────────────────── */
.fact-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-accent);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  height: 100%;
}

.fact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.fact-card .fact-year {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clr-accent);
  margin-bottom: .5rem;
}

.fact-card .fact-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: .75rem;
}

/* ── GALLERY GRID ────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(139,69,19,.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity .3s var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay-content { color: #fff; }

.gallery-overlay .gallery-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.8);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  transition: all .3s var(--ease);
}

.gallery-item:hover .gallery-icon {
  transform: translate(-50%, -50%) scale(1);
  background: rgba(255,255,255,.3);
}

/* ── TIMELINE ────────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--clr-accent), var(--clr-primary));
  transform: translateX(-50%);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-item:nth-child(even) .timeline-content { order: 1; text-align: right; }
.timeline-item:nth-child(even) .timeline-dot { order: 2; }
.timeline-item:nth-child(even) .timeline-empty { order: 3; }

.timeline-dot {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--clr-bg), 0 0 0 6px var(--clr-accent);
  z-index: 1;
}

.timeline-content {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.timeline-content:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.timeline-year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--clr-accent);
  margin-bottom: .25rem;
}

.timeline-empty { flex: 1; }

@media (max-width: 767px) {
  .timeline::before { left: 24px; }
  .timeline-item { grid-template-columns: auto 1fr; }
  .timeline-item:nth-child(even) .timeline-content { order: 2; text-align: left; }
  .timeline-item:nth-child(even) .timeline-dot { order: 1; }
  .timeline-item:nth-child(even) .timeline-empty { display: none; }
  .timeline-item .timeline-empty { display: none; }
}

/* ── TESTIMONIALS ────────────────────────────────────────────── */
.testimonial-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  height: 100%;
}

.testimonial-card::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--clr-accent);
  opacity: .2;
  position: absolute;
  top: -.5rem;
  left: 1.25rem;
  line-height: 1;
}

.testimonial-stars { color: var(--clr-accent); margin-bottom: 1rem; }

.testimonial-text {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--clr-text-muted);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.testimonial-author { display: flex; align-items: center; gap: 1rem; }

.testimonial-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--clr-accent);
  background: var(--clr-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.testimonial-name { font-weight: 600; font-size: .95rem; }
.testimonial-role { font-size: .8rem; color: var(--clr-text-muted); }

/* ── STAT COUNTERS ───────────────────────────────────────────── */
.stat-block {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--clr-primary);
  line-height: 1;
}

.stat-label {
  font-size: .85rem;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: .5rem;
}

/* ── CATEGORY FILTER ─────────────────────────────────────────── */
.category-filter {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: .45rem 1.25rem;
  border: 1.5px solid var(--clr-border);
  border-radius: 50px;
  background: var(--clr-surface);
  color: var(--clr-text-muted);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s var(--ease);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}

/* ── EVENT CARDS ─────────────────────────────────────────────── */
.event-card {
  display: flex;
  gap: 1.5rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.event-date-block {
  background: var(--clr-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  text-align: center;
  min-width: 70px;
  flex-shrink: 0;
}

.event-date-day {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.event-date-month {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .85;
}

.event-info { flex: 1; }
.event-title { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: .5rem; }
.event-meta { font-size: .85rem; color: var(--clr-text-muted); }
.event-meta i { color: var(--clr-primary); }

/* ── NEWS CARDS ──────────────────────────────────────────────── */
.news-card { height: 100%; }

.news-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.news-card:hover .news-card-img img { transform: scale(1.06); }

/* ── PAGE HERO ───────────────────────────────────────────────── */
.page-hero {
  padding: calc(var(--navbar-h) + 3rem) 0 3rem;
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-dark) 100%);
  position: relative;
  overflow: hidden;
  color: #fff;
}

.page-hero::before {
  content: '';
  position: absolute;
  right: -100px;
  top: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(218,165,32,.2) 0%, transparent 70%);
  border-radius: 50%;
}

.page-hero::after {
  content: '';
  position: absolute;
  left: -80px;
  bottom: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(45,106,79,.3) 0%, transparent 70%);
  border-radius: 50%;
}

.page-hero-content { position: relative; z-index: 1; }

.page-hero .section-label { color: var(--clr-accent-light); }

.page-hero .page-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #fff;
  margin-bottom: 1rem;
}

.page-hero .lead { color: rgba(255,255,255,.82); }

/* ── BREADCRUMB ──────────────────────────────────────────────── */
.breadcrumb { margin: 0; padding: 0; background: none; }
.breadcrumb-item a { color: rgba(255,255,255,.7); }
.breadcrumb-item a:hover { color: var(--clr-accent-light); }
.breadcrumb-item.active { color: rgba(255,255,255,.9); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* ── CULTURE CARDS ───────────────────────────────────────────── */
.culture-icon-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  height: 100%;
}

.culture-icon-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.culture-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  margin: 0 auto 1.25rem;
  transition: transform .3s var(--ease);
}

.culture-icon-card:hover .culture-icon { transform: scale(1.1) rotate(5deg); }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-control, .form-select {
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-family: var(--font-body);
  background: var(--clr-surface);
  color: var(--clr-text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.form-control:focus, .form-select:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(139,69,19,.15);
  background: var(--clr-surface);
  color: var(--clr-text);
}

.form-label { font-weight: 500; font-size: .9rem; margin-bottom: .4rem; }

/* ── MAP EMBED ───────────────────────────────────────────────── */
.map-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.map-embed iframe { display: block; width: 100%; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: #0F0A05;
  color: #B8A898;
}

.footer-top { padding: 4rem 0 2.5rem; }

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #F5EFE6;
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-about { font-size: .9rem; line-height: 1.7; margin-bottom: 1.5rem; }

.social-links { display: flex; gap: .5rem; flex-wrap: wrap; }

.social-link {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B8A898;
  transition: all .2s var(--ease);
}

.social-link:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  transform: translateY(-3px);
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #F5EFE6;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .6rem; }
.footer-links a { color: #B8A898; font-size: .9rem; transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--clr-accent); padding-left: 4px; }

.footer-contact { list-style: none; padding: 0; }
.footer-contact li {
  display: flex;
  gap: .75rem;
  margin-bottom: .75rem;
  font-size: .9rem;
  align-items: flex-start;
}
.footer-contact i { color: var(--clr-accent); margin-top: 3px; flex-shrink: 0; }
.footer-contact a { color: #B8A898; }
.footer-contact a:hover { color: var(--clr-accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 0;
  font-size: .85rem;
}

/* ── BACK TO TOP ─────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s var(--ease);
  z-index: 999;
}

.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--clr-accent); transform: translateY(-3px); }

/* ── FLASH MESSAGES ──────────────────────────────────────────── */
.flash-container {
  position: fixed;
  top: calc(var(--navbar-h) + .5rem);
  right: 1rem;
  z-index: 1050;
  min-width: 300px;
  max-width: 420px;
}

/* ── SEARCH PAGE ─────────────────────────────────────────────── */
.search-result-item {
  border-bottom: 1px solid var(--clr-border);
  padding: 1.5rem 0;
}

.search-result-item:last-child { border-bottom: none; }

.result-type-badge {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .2rem .6rem;
  border-radius: 50px;
  background: var(--clr-bg-alt);
  color: var(--clr-primary);
  border: 1px solid var(--clr-border);
}

/* ── PLACE DETAIL ────────────────────────────────────────────── */
.place-detail-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: .75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.place-detail-gallery .main-img { grid-row: 1 / 3; }
.place-detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: filter .3s var(--ease);
}
.place-detail-gallery img:hover { filter: brightness(.85); }

/* ── INFO BOX ────────────────────────────────────────────────── */
.info-box {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.info-row {
  display: flex;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--clr-border);
  font-size: .9rem;
}
.info-row:last-child { border-bottom: none; }
.info-row i { color: var(--clr-primary); width: 20px; flex-shrink: 0; margin-top: 2px; }
.info-label { font-weight: 600; min-width: 110px; color: var(--clr-text-muted); }

/* ── RELATED CARDS ───────────────────────────────────────────── */
.related-section { padding-top: 3rem; margin-top: 3rem; border-top: 1px solid var(--clr-border); }

/* ── 404 PAGE ────────────────────────────────────────────────── */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--navbar-h);
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 12rem);
  font-weight: 700;
  color: var(--clr-primary);
  opacity: .15;
  line-height: 1;
}

/* ── SKELETON LOADER ─────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--clr-bg-alt) 25%, var(--clr-border) 50%, var(--clr-bg-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── ROYAL INSTITUTION DROPDOWN ─────────────────────────────── */
.royal-dropdown {
    min-width: 240px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: .5rem 0;
    background: var(--clr-surface);
    margin-top: .5rem;
}

.royal-dropdown .dropdown-item {
    font-size: .875rem;
    color: var(--clr-text-muted);
    padding: .55rem 1.1rem;
    transition: all .2s var(--ease);
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
}

.royal-dropdown .dropdown-item i {
    color: var(--clr-primary);
    width: 20px;
    flex-shrink: 0;
}

.royal-dropdown .dropdown-item:hover,
.royal-dropdown .dropdown-item:focus {
    background: var(--clr-bg-alt);
    color: var(--clr-primary);
    border-left-color: var(--clr-accent);
}

.royal-dropdown .dropdown-item.active {
    background: var(--clr-bg-alt);
    color: var(--clr-primary);
    border-left-color: var(--clr-accent);
    font-weight: 600;
}

.dropdown-header-item {
    border-bottom: none !important;
    background: linear-gradient(135deg, rgba(139,69,19,.06), rgba(218,165,32,.06));
}

.royal-dropdown .dropdown-divider {
    margin: .25rem 0;
    border-color: var(--clr-border);
}

[data-bs-theme="dark"] .royal-dropdown {
    background: var(--clr-surface);
    border-color: var(--clr-border);
}

/* Dropdown arrow animation */
.navbar-main .dropdown-toggle::after {
    transition: transform .2s var(--ease);
}
.navbar-main .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* ── UTILITIES ───────────────────────────────────────────────── */
.text-primary { color: var(--clr-primary) !important; }
.text-accent  { color: var(--clr-accent) !important; }
.text-green   { color: var(--clr-green) !important; }
.bg-primary-soft { background: rgba(139,69,19,.1); }
.bg-accent-soft  { background: rgba(218,165,32,.1); }

.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }

/* ── PRELOADER ───────────────────────────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--clr-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .5s var(--ease), visibility .5s;
}

#preloader.done { opacity: 0; visibility: hidden; }

.preloader-inner {
  text-align: center;
}

.preloader-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: 1.5rem;
}

.preloader-bar {
  width: 200px;
  height: 3px;
  background: var(--clr-border);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
}

.preloader-progress {
  height: 100%;
  background: linear-gradient(to right, var(--clr-primary), var(--clr-accent));
  border-radius: 3px;
  animation: loading 1.2s ease forwards;
}

@keyframes loading {
  0% { width: 0; }
  100% { width: 100%; }
}

/* ── RESPONSIVE TWEAKS ───────────────────────────────────────── */
@media (max-width: 991px) {
  :root { --section-py: 3.5rem; }

  .navbar-main { height: auto; padding: 1rem 0; }
  .hero { min-height: 90vh; }

  .navbar-collapse {
    background: var(--clr-surface);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: .5rem;
    border: 1px solid var(--clr-border);
  }

  .navbar-actions { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--clr-border); }

  .place-detail-gallery { grid-template-columns: 1fr; }
  .place-detail-gallery .main-img { grid-row: auto; }
}

@media (max-width: 575px) {
  :root { --section-py: 2.5rem; }
  .hero-stats { gap: 1.5rem; }
  .event-card { flex-direction: column; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
/* ============================================================
   MOBILE RESPONSIVE HARDENING
   Fixes horizontal scrolling, overflow and inconsistent
   layouts on narrow phone screens.
   Add this AFTER all existing CSS.
   ============================================================ */

/* ---------- GLOBAL MOBILE SAFETY ---------- */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    position: relative;
}

*,
*::before,
*::after {
    max-width: 100%;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

iframe {
    border: 0;
}

.row > *,
.container,
.container-fluid {
    min-width: 0;
}


/* ---------- BOOTSTRAP ROW PROTECTION ---------- */

/*
   Bootstrap .row uses negative margins.
   On some narrow screens this can create a few pixels
   of horizontal overflow.
*/

.row {
    --bs-gutter-x: 1.5rem;
    margin-right: 0;
    margin-left: 0;
}

.row > * {
    padding-right: calc(var(--bs-gutter-x) * .5);
    padding-left: calc(var(--bs-gutter-x) * .5);
}


/* ---------- TEXT PROTECTION ---------- */

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
div,
li {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.text-nowrap {
    max-width: 100%;
}


/* ---------- BUTTON PROTECTION ---------- */

button,
.btn,
.hs-btn,
.filter-btn {
    max-width: 100%;
}

.btn,
.hs-btn {
    white-space: normal;
}

.hs-ctas {
    min-width: 0;
}


/* ============================================================
   TABLETS
   ============================================================ */

@media (max-width: 991.98px) {

    html {
        scroll-padding-top: 70px;
    }

    :root {
        --navbar-h: 70px;
        --section-py: 3.5rem;
    }

    body {
        font-size: .96rem;
    }

    section {
        padding: var(--section-py) 0;
    }

    /* Bootstrap containers */
    .container,
    .container-fluid {
        width: 100%;
        max-width: 100%;
    }

    /* Navbar */
    .navbar-main {
        width: 100%;
        max-width: 100%;
    }

    .navbar-main .container,
    .navbar-main .container-fluid {
        width: 100%;
        max-width: 100%;
    }

    .navbar-collapse {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .navbar-nav {
        min-width: 0;
    }

    /* Hero */
    .hero-slider {
        width: 100%;
        max-width: 100%;
        min-height: 600px;
    }

    .hs-content {
        width: 100%;
        min-width: 0;
    }

    .hs-title,
    .hs-subtitle {
        max-width: 100%;
    }

    /* Prevent hero controls from creating overflow */
    .hs-arrow--prev {
        left: .75rem;
    }

    .hs-arrow--next {
        right: .75rem;
    }

    /* Gallery */
    .gallery-grid {
        width: 100%;
        max-width: 100%;
    }

    /* Place gallery */
    .place-detail-gallery {
        width: 100%;
        max-width: 100%;
    }

    /* Cards */
    .ugep-card,
    .fact-card,
    .testimonial-card,
    .culture-icon-card,
    .event-card {
        min-width: 0;
        max-width: 100%;
    }

    /* Forms */
    .form-control,
    .form-select {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* Footer */
    .site-footer {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    /* Search */
    .search-overlay {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .search-input-wrap {
        width: 100%;
        min-width: 0;
    }

    .search-input-wrap input {
        min-width: 0;
        width: 100%;
    }
}


/* ============================================================
   PHONES
   ============================================================ */

@media (max-width: 767.98px) {

    :root {
        --navbar-h: 68px;
        --section-py: 3rem;
    }

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    section {
        padding: var(--section-py) 0;
    }

    /* ---------- CONTAINERS ---------- */

    .container,
    .container-fluid {
        width: 100%;
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* ---------- NAVBAR ---------- */

    .navbar-main {
        min-height: 68px;
        height: auto;
        padding: .7rem 0;
    }

    .brand-logo {
        min-width: 0;
        max-width: calc(100% - 60px);
        gap: .55rem;
    }

    .brand-text {
        min-width: 0;
    }

    .brand-name {
        font-size: 1rem;
        white-space: nowrap;
    }

    .brand-sub {
        font-size: .58rem;
        white-space: nowrap;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }

    .navbar-toggler {
        flex-shrink: 0;
    }

    .navbar-collapse {
        margin-top: .6rem;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .navbar-main .nav-link {
        padding: .65rem .75rem !important;
    }

    .navbar-actions {
        width: 100%;
        max-width: 100%;
    }


    /* ========================================================
       HERO
       ======================================================== */

    .hero-slider {
        width: 100%;
        height: 100svh;
        min-height: 620px;
        max-height: 900px;
        overflow: hidden;
    }

    /*
       Don't use 100vh alone on phones.
       Mobile browser address bars can make 100vh jump
       while scrolling, which looks like shaking.
    */

    .hs-slide {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .hs-bg {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .hs-bg img {
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
        object-position: center center;
    }

    .hs-content {
        width: 100%;
        max-width: 100%;
        padding-top: calc(var(--navbar-h) + 1rem);
        padding-bottom: 5rem;
    }

    .hs-title {
        width: 100%;
        max-width: 100%;
        font-size: clamp(1.85rem, 8vw, 2.7rem);
        line-height: 1.15;
        margin-bottom: 1rem;
    }

    .hs-subtitle {
        width: 100%;
        max-width: 100%;
        font-size: .95rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }

    .hs-badge {
        max-width: 100%;
        padding: .35rem .85rem;
        font-size: .65rem;
        white-space: normal;
    }

    .hs-ctas {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: .7rem;
    }

    .hs-btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding: .8rem 1rem;
    }

    /* Stats */
    .hs-stats {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 1.25rem;
    }

    .hs-stat {
        min-width: 0;
    }

    .hs-stat-num {
        font-size: 1.45rem;
    }

    .hs-stat-label {
        font-size: .7rem;
        line-height: 1.35;
    }

    .hs-arrow {
        display: none;
    }

    .hs-slide-num {
        display: none;
    }

    .hs-scroll-hint {
        display: none;
    }

    .hs-dots {
        bottom: 1.25rem;
        max-width: calc(100% - 2rem);
        gap: .4rem;
    }

    .hs-dot {
        width: 24px;
    }

    .hs-dot--active {
        width: 38px;
    }


    /* ========================================================
       TYPOGRAPHY
       ======================================================== */

    .display-hero {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .section-title {
        font-size: clamp(1.55rem, 7vw, 2.2rem);
        line-height: 1.2;
    }

    .lead {
        font-size: 1rem;
        line-height: 1.6;
    }

    .section-header {
        margin-bottom: 2rem;
    }


    /* ========================================================
       DIVIDER
       ======================================================== */

    .divider-ornament {
        max-width: 100%;
        gap: .6rem;
    }

    .divider-ornament::before,
    .divider-ornament::after {
        width: 35px;
    }


    /* ========================================================
       CARDS
       ======================================================== */

    .ugep-card .card-body {
        padding: 1.15rem;
    }

    .ugep-card .card-title {
        font-size: 1.05rem;
    }

    .ugep-card .card-text {
        font-size: .88rem;
    }

    .ugep-card .card-meta {
        gap: .65rem;
        flex-wrap: wrap;
    }

    .fact-card {
        padding: 1.25rem;
    }

    .testimonial-card {
        padding: 1.4rem;
    }

    .culture-icon-card {
        padding: 1.75rem 1rem;
    }


    /* ========================================================
       GALLERY
       ======================================================== */

    .gallery-grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .6rem;
    }

    .gallery-item {
        min-width: 0;
        width: 100%;
    }

    .gallery-overlay {
        padding: .8rem;
    }


    /* ========================================================
       TIMELINE
       ======================================================== */

    .timeline {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .timeline::before {
        left: 18px;
    }

    .timeline-item {
        width: 100%;
        max-width: 100%;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: .75rem;
        margin-bottom: 1.5rem;
    }

    .timeline-dot {
        width: 36px;
        height: 36px;
        font-size: .8rem;
        box-shadow:
            0 0 0 3px var(--clr-bg),
            0 0 0 5px var(--clr-accent);
    }

    .timeline-content {
        min-width: 0;
        width: 100%;
        padding: 1rem;
    }

    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
    }


    /* ========================================================
       EVENTS
       ======================================================== */

    .event-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex-direction: row;
        align-items: flex-start;
        gap: .9rem;
        padding: 1rem;
    }

    .event-date-block {
        min-width: 58px;
        width: 58px;
        padding: .6rem .4rem;
    }

    .event-date-day {
        font-size: 1.5rem;
    }

    .event-info {
        min-width: 0;
    }

    .event-title {
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    .event-meta {
        font-size: .78rem;
        overflow-wrap: anywhere;
    }


    /* ========================================================
       PAGE HERO
       ======================================================== */

    .page-hero {
        padding: calc(var(--navbar-h) + 2rem) 0 2.5rem;
    }

    .page-hero .page-title {
        font-size: clamp(1.7rem, 8vw, 2.5rem);
        line-height: 1.15;
    }

    .page-hero .lead {
        font-size: .95rem;
    }


    /* ========================================================
       PLACE DETAIL GALLERY
       ======================================================== */

    .place-detail-gallery {
        width: 100%;
        grid-template-columns: 1fr;
        gap: .5rem;
    }

    .place-detail-gallery .main-img {
        grid-row: auto;
    }


    /* ========================================================
       INFO BOX
       ======================================================== */

    .info-box {
        padding: 1rem;
    }

    .info-row {
        gap: .7rem;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .info-label {
        min-width: 90px;
    }


    /* ========================================================
       CATEGORY FILTER
       ======================================================== */

    .category-filter {
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
        gap: .4rem;
        margin-bottom: 1.75rem;
    }

    .filter-btn {
        padding: .4rem .8rem;
        font-size: .78rem;
    }


    /* ========================================================
       SEARCH
       ======================================================== */

    .search-overlay {
        padding: 1rem 0;
    }

    .search-input-wrap {
        gap: .6rem;
        padding: .65rem .8rem;
    }

    .search-input-wrap input {
        font-size: 1rem;
        min-width: 0;
    }

    .flash-container {
        left: 1rem;
        right: 1rem;
        width: auto;
        min-width: 0;
        max-width: none;
    }


    /* ========================================================
       FOOTER
       ======================================================== */

    .footer-top {
        padding: 3rem 0 2rem;
    }

    .footer-contact li {
        min-width: 0;
    }

    .footer-contact li span,
    .footer-contact li a {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .footer-bottom {
        text-align: center;
    }


    /* ========================================================
       BACK TO TOP
       ======================================================== */

    .back-to-top {
        width: 42px;
        height: 42px;
        right: 1rem;
        bottom: 1rem;
    }


    /* ========================================================
       BUTTONS
       ======================================================== */

    .btn-lg {
        padding: .75rem 1.25rem;
        font-size: .95rem;
    }


    /* ========================================================
       MAP
       ======================================================== */

    .map-embed {
        width: 100%;
        max-width: 100%;
    }

    .map-embed iframe {
        width: 100%;
        max-width: 100%;
        min-height: 300px;
    }
}


/* ============================================================
   VERY SMALL PHONES
   320px – 374px
   ============================================================ */

@media (max-width: 374.98px) {

    :root {
        --section-py: 2.25rem;
    }

    .container,
    .container-fluid {
        padding-left: .8rem;
        padding-right: .8rem;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .brand-name {
        font-size: .9rem;
    }

    .brand-sub {
        font-size: .5rem;
    }

    .hs-content {
        padding-top: calc(var(--navbar-h) + .5rem);
    }

    .hs-title {
        font-size: 1.8rem;
    }

    .hs-subtitle {
        font-size: .88rem;
    }

    .hs-stats {
        gap: .7rem;
    }

    .hs-stat-num {
        font-size: 1.3rem;
    }

    .hs-stat-label {
        font-size: .65rem;
    }

    .gallery-grid {
        gap: .4rem;
    }

    .event-card {
        padding: .8rem;
    }

    .event-date-block {
        min-width: 52px;
        width: 52px;
    }

    .event-date-day {
        font-size: 1.35rem;
    }

    .event-title {
        font-size: .95rem;
    }
}


/* ============================================================
   EXTRA NARROW PHONES
   Around 320px and below
   ============================================================ */

@media (max-width: 330px) {

    .container,
    .container-fluid {
        padding-left: .7rem;
        padding-right: .7rem;
    }

    .hs-ctas {
        gap: .5rem;
    }

    .hs-btn {
        font-size: .82rem;
        padding: .7rem .8rem;
    }

    .hs-title {
        font-size: 1.65rem;
    }

    .hs-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* ============================================================
   PREVENT COMMON ELEMENTS FROM FORCING PAGE WIDTH
   ============================================================ */

table {
    width: 100%;
    max-width: 100%;
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

pre,
code {
    max-width: 100%;
}

pre {
    overflow-x: auto;
}

input,
textarea,
select {
    max-width: 100%;
}

iframe,
embed,
object {
    max-width: 100%;
}


/* ============================================================
   MOBILE HOVER FIX
   Prevent hover transforms from causing visual jumping
   on touch devices.
   ============================================================ */

@media (hover: none) and (pointer: coarse) {

    .ugep-card:hover,
    .fact-card:hover,
    .testimonial-card:hover,
    .culture-icon-card:hover,
    .event-card:hover {
        transform: none;
        box-shadow: none;
    }

    .ugep-card:hover .card-img-wrap img,
    .news-card:hover .news-card-img img,
    .gallery-item:hover img {
        transform: none;
    }

    .btn-primary:hover,
    .btn-accent:hover,
    .btn-hs-primary:hover,
    .btn-hs-outline:hover {
        transform: none;
    }
}


/* ============================================================
   REDUCE MOBILE MOTION
   Helps eliminate visual "shaking" caused by transforms
   and mobile browser scrolling.
   ============================================================ */

@media (max-width: 767.98px) {

    .ugep-card,
    .fact-card,
    .event-card,
    .testimonial-card,
    .culture-icon-card {
        transform: none;
    }

    .btn:hover,
    .btn-icon:hover {
        transform: none;
    }
}


/* ============================================================
   SAFE AREA FOR MODERN PHONES
   iPhone notch / home indicator support
   ============================================================ */

@supports (padding: max(0px)) {

    .navbar-main {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    .back-to-top {
        right: max(1rem, env(safe-area-inset-right));
        bottom: max(1rem, env(safe-area-inset-bottom));
    }

    .hs-content {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}
