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

/* Global box-sizing reset — ensures padding/border are included in element widths */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  /* Fraternal Heritage System Colors - Light Mode */
  --background: #fbf9f8;
  --surface: #ffffff;
  --surface-dim: #f0ece9;
  --surface-hover: #f7f4f2;
  --primary: #2e0052;
  --primary-container: #4b0082;
  --primary-light: #6a1b9a;
  --accent: #d4af37;
  --accent-hover: #b89628;
  --accent-glow: rgba(212, 175, 55, 0.35);
  --text-primary: #1b1c1c;
  --text-secondary: #4c4451;
  --text-muted: #7d7483;
  --border: #d4af37;
  --border-subtle: rgba(212, 175, 55, 0.25);
  --card-border: rgba(212, 175, 55, 0.35);
  --outline: #7d7483;
  --success: #10B981;
  --danger: #ba1a1a;
  --shadow-sm: 0 2px 8px rgba(27, 28, 28, 0.05);
  --shadow-md: 0 10px 25px rgba(27, 28, 28, 0.08);
  --shadow-lg: 0 18px 40px rgba(27, 28, 28, 0.12);
  --input-bg: #ffffff;
  --input-text: #1b1c1c;
  --input-border: #dcd9d9;
  --modal-overlay: rgba(15, 10, 25, 0.65);
  --header-bg: rgba(255, 255, 255, 0.95);
  --dropdown-bg: #ffffff;
  --dropdown-hover: rgba(184, 134, 11, 0.12);
  --fab-bg: rgba(255, 255, 255, 0.9);
  --fab-border: #d4af37;
  --fab-icon: #2e0052;
  --fab-glow: rgba(212, 175, 55, 0.4);

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  /* Fraternal Heritage System Colors - Dark Mode ("Royal Obsidian & Gold") */
  --background: #0d0814;
  --surface: #171022;
  --surface-dim: #120b1b;
  --surface-hover: #221832;
  --primary: #c499ff;
  --primary-container: #3a1563;
  --primary-light: #ddbaff;
  --accent: #f5c842;
  --accent-hover: #ffd966;
  --accent-glow: rgba(245, 200, 66, 0.5);
  --text-primary: #f5f2f8;
  --text-secondary: #c7bcd2;
  --text-muted: #8e809d;
  --border: #d4af37;
  --border-subtle: rgba(212, 175, 55, 0.25);
  --card-border: rgba(212, 175, 55, 0.35);
  --outline: #625376;
  --success: #34d399;
  --danger: #f87171;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.75);
  --input-bg: #1f1530;
  --input-text: #f5f2f8;
  --input-border: #4a3862;
  --modal-overlay: rgba(0, 0, 0, 0.85);
  --header-bg: rgba(23, 16, 34, 0.95);
  --dropdown-bg: #1e152d;
  --dropdown-hover: rgba(245, 200, 66, 0.15);
  --fab-bg: rgba(23, 16, 34, 0.92);
  --fab-border: #f5c842;
  --fab-icon: #f5c842;
  --fab-glow: rgba(245, 200, 66, 0.5);
  color-scheme: dark;
}

/* Base element transitions for smooth theme switching */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

/* Header & Navigation */
header {
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  font-family: var(--font-heading);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

nav a {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

nav a.active {
  color: var(--primary);
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--border);
  border-radius: 2px;
}

/* Dropdown Navigation Menu */
nav ul li.dropdown {
  position: relative;
}

nav ul li.dropdown .dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

nav ul li.dropdown .dropdown-toggle::after {
  content: '▾';
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

nav ul li.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

nav ul li.dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 170px;
  background: var(--dropdown-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  z-index: 1000;
  list-style: none;
  margin-top: 0.4rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Transparent bridge to prevent losing hover between toggle and menu */
nav ul li.dropdown .dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 10px;
}

nav ul li.dropdown:hover .dropdown-menu,
nav ul li.dropdown:focus-within .dropdown-menu {
  display: block;
  animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

nav ul li.dropdown .dropdown-menu li {
  margin: 0;
  padding: 0;
  display: block !important;
}

nav ul li.dropdown .dropdown-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  text-align: left;
}

nav ul li.dropdown .dropdown-menu a:hover,
nav ul li.dropdown .dropdown-menu a.active {
  background-color: var(--dropdown-hover);
  color: var(--accent);
}

nav ul li.dropdown .dropdown-menu a::after {
  display: none !important;
}

/* Profile Icon Navigation Dropdown */
nav ul li.dropdown.profile-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

nav ul li.dropdown.profile-dropdown .profile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--primary);
  background: var(--surface-hover);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  cursor: pointer;
  padding: 0;
  margin-left: 0.5rem;
}

nav ul li.dropdown.profile-dropdown:hover .profile-toggle,
nav ul li.dropdown.profile-dropdown .profile-toggle:hover {
  background: var(--primary);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(46, 0, 82, 0.25);
  transform: translateY(-1px);
}

nav ul li.dropdown.profile-dropdown .profile-toggle::after {
  display: none !important;
}

nav ul li.dropdown.profile-dropdown .dropdown-menu {
  left: auto;
  right: 0;
  transform: none;
  min-width: 170px;
  margin-top: 0.5rem;
}

nav ul li.dropdown.profile-dropdown:hover .dropdown-menu,
nav ul li.dropdown.profile-dropdown:focus-within .dropdown-menu {
  display: block;
  animation: dropdownFadeInRight 0.2s ease-out;
}

@keyframes dropdownFadeInRight {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Admin Key Link inside Profile Dropdown Submenu */
nav ul li.dropdown .dropdown-menu li.admin-menu-item {
  border-top: 1px solid var(--border-light, rgba(184, 134, 11, 0.2));
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}

nav ul li.dropdown .dropdown-menu a.admin-menu-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary, #2e0052);
}

nav ul li.dropdown .dropdown-menu a.admin-menu-link svg.key-icon-svg {
  flex-shrink: 0;
  stroke: currentColor;
  transition: transform 0.2s ease;
}

nav ul li.dropdown .dropdown-menu a.admin-menu-link:hover svg.key-icon-svg {
  transform: rotate(-15deg);
}

/* Gated Access Navigation Styles */
html.gtfiji-unauthenticated nav ul li:not(:first-child):not(.login-item):not(.contact-item) {
  display: none !important;
}


/* Main Content Area */
main {
  flex: 1;
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

h1,
h2,
h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Cards & Surface Elements */
.card {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 10px 20px rgba(27, 28, 28, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(27, 28, 28, 0.08);
}

/* Tree & Hierarchy (About Us) */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.person-card {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 10px 20px rgba(27, 28, 28, 0.04);
}

.person-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.person-card .role {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.person-card a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.person-card a:hover {
  color: var(--accent);
}

.tree-section {
  margin-top: 2rem;
  padding-left: 2rem;
  border-left: 2px dashed var(--border);
  position: relative;
}

.sub-committee {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  box-shadow: 0 10px 20px rgba(27, 28, 28, 0.04);
}

.sub-committee::before {
  content: '';
  position: absolute;
  top: 2rem;
  left: -2rem;
  width: 2rem;
  height: 2px;
  background-image: linear-gradient(to right, transparent, var(--border) 50%, var(--border));
}

.sub-committee h3 {
  color: var(--accent);
}

.committee-members {
  list-style: none;
  margin-top: 1rem;
}

.committee-members li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.committee-members li:last-child {
  border-bottom: none;
}

/* Forms & Tables (My Account) */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  background-color: var(--background);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.btn {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background-color: var(--primary-container);
}

.btn:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: #fff;
  border: 1px solid var(--border);
  color: var(--border);
}

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Login specific */
.login-container {
  max-width: 400px;
  margin: 4rem auto;
}

/* Layout Utilities */
.section-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

/* Hero Section */
.hero {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: -3rem;
  margin-left: -2rem;
  margin-right: -2rem;
  margin-bottom: 3rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.9;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(139, 92, 246, 0.4), transparent);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: #fff;
}

.hero-content p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.bento-card {
  background-color: var(--surface);
  padding: 3rem;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 10px 20px rgba(27, 28, 28, 0.04);
}

.bento-col-8 {
  grid-column: span 8;
}

.bento-col-4 {
  grid-column: span 4;
}

.bento-col-12 {
  grid-column: span 12;
}

.bento-card-primary {
  background-color: var(--primary);
  color: #fff;
  border-top: none;
}

.bento-card-primary h3 {
  color: #fff;
}

.bento-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* House Corporation Responsive Layout */
.house-corp-grid {
  display: flex;
  justify-content: center;
  gap: 2rem 2.5rem;
  flex-wrap: wrap;
  text-align: center;
  margin-bottom: 2.5rem;
}

.house-corp-members-grid {
  display: flex;
  justify-content: center;
  gap: 2rem 2.5rem;
  flex-wrap: wrap;
  text-align: center;
  margin-bottom: 2.5rem;
}

.house-corp-member {
  min-width: 130px;
}

.committees-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 3rem auto 4rem auto;
  max-width: 900px;
}

.committees-row .bento-card {
  flex: 1;
  min-width: 260px;
  max-width: 400px;
}

/* Event Cards Horizontal */
.event-card-horizontal {
  background-color: var(--surface);
  display: flex;
  flex-direction: row;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.event-card-horizontal:hover {
  border-color: var(--primary);
}

.event-date-col {
  width: 250px;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.event-date-col .month {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.event-date-col .day {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin: 0.5rem 0;
}

.event-date-col .year {
  color: var(--text-secondary);
}

.event-info-col {
  flex: 1;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  nav a {
    font-size: 11px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .bento-col-8,
  .bento-col-4 {
    grid-column: span 12;
  }

  .event-card-horizontal {
    flex-direction: column;
  }

  .event-date-col {
    width: 100%;
  }

  .event-info-col {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Photo Carousel & Lightbox Modal (Modern Traditionalism Styling)
   ========================================================================== */

.carousel-section {
  margin-bottom: 4rem;
  background: var(--surface);
  border: 1px solid var(--accent);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.carousel-main {
  position: relative;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: #120c18; /* Sophisticated deep dark surface to focus on photos */
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-active-area {
  position: relative;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.carousel-active-area img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.carousel-active-area.transitioning img {
  opacity: 0;
}

.carousel-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(1);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: rgba(46, 0, 82, 0.8); /* Chapter Royal Purple */
  color: #ffffff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.carousel-arrow-btn:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.carousel-arrow-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-prev-btn {
  left: 20px;
}

.carousel-next-btn {
  right: 20px;
}

.carousel-caption-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8) 40%, rgba(0, 0, 0, 0.95));
  color: #ffffff;
  padding: 3rem 2rem 1.5rem 2rem;
  text-align: left;
  pointer-events: none;
}

.carousel-caption-bar h4 {
  margin: 0 0 0.4rem 0;
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.carousel-caption-bar p {
  margin: 0;
  color: #e4e2e1;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 300;
}

.carousel-counter {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(212, 175, 55, 0.4);
  z-index: 10;
  letter-spacing: 0.5px;
}

.carousel-thumbnails-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  overflow-y: auto;
  max-height: 380px; /* fits ~3 rows of 120px thumbnails + gaps */
  margin-top: 1.25rem;
  padding: 0.5rem 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(0, 0, 0, 0.1);
  scroll-behavior: smooth;
}

.carousel-thumbnails-row::-webkit-scrollbar {
  width: 6px;
}

.carousel-thumbnails-row::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.carousel-thumbnails-row::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 3px;
}

.carousel-thumb-item {
  flex: 0 0 160px;
  height: 120px;
  border-radius: 4px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  background: #000;
}

.carousel-thumb-item:hover {
  border-color: rgba(212, 175, 55, 0.5);
}

.carousel-thumb-item.active {
  border: 4px solid var(--accent);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.75);
}

.carousel-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox Dialog Styling */
.lightbox-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: none;
  margin: auto;
}

.lightbox-dialog::backdrop {
  background-color: rgba(10, 5, 18, 0.95);
  backdrop-filter: blur(15px);
}

.lightbox-content {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-image-container {
  position: relative;
  max-width: 90vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.lightbox-img.transitioning {
  opacity: 0;
}

.lightbox-caption-area {
  text-align: center;
  color: #ffffff;
  max-width: 700px;
  margin-top: 1.5rem;
  padding: 0 1rem;
}

.lightbox-caption-area h3 {
  margin: 0 0 0.4rem 0;
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 1.8rem;
  letter-spacing: 0.5px;
}

.lightbox-caption-area p {
  margin: 0;
  color: var(--surface-dim);
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 300;
}

.lightbox-close-btn {
  position: absolute;
  top: 25px;
  right: 35px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 3rem;
  cursor: pointer;
  z-index: 100;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.lightbox-close-btn:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.lightbox-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(1);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: rgba(46, 0, 82, 0.75);
  color: #ffffff;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-arrow-btn:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
}

.lightbox-arrow-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-prev-btn {
  left: 40px;
}

.lightbox-next-btn {
  right: 40px;
}

.lightbox-hint {
  position: absolute;
  bottom: 25px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  z-index: 100;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.lightbox-hint kbd {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffffff;
  font-family: inherit;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive Overrides for Carousel & Lightbox */
@media (max-width: 768px) {
  .carousel-section {
    padding: 1.5rem;
    margin-bottom: 2.5rem;
  }
  
  .carousel-active-area {
    height: 320px;
  }
  
  .carousel-arrow-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  
  .carousel-prev-btn {
    left: 10px;
  }
  
  .carousel-next-btn {
    right: 10px;
  }
  
  .carousel-caption-bar {
    padding: 2rem 1.25rem 1rem 1.25rem;
  }
  
  .carousel-caption-bar h4 {
    font-size: 1.15rem;
  }
  
  .carousel-caption-bar p {
    font-size: 0.85rem;
  }
  
  .lightbox-content {
    padding: 1rem;
  }
  
  .lightbox-arrow-btn {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }
  
  .lightbox-prev-btn {
    left: 15px;
  }
  
  .lightbox-next-btn {
    right: 15px;
  }
  
  .lightbox-close-btn {
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
  }
  
  .lightbox-caption-area h3 {
    font-size: 1.4rem;
  }
  
  .lightbox-caption-area p {
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   News & Newsletter Browser
   ========================================================================== */

.newsletter-breadcrumbs {
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.newsletter-breadcrumbs a {
  color: var(--text-secondary);
  font-weight: 600;
  transition: color 0.2s ease;
}

.newsletter-breadcrumbs a:hover {
  color: var(--primary);
}

.newsletter-breadcrumbs .separator {
  color: var(--border);
  margin: 0 0.75rem;
  font-weight: normal;
  user-select: none;
}

.newsletter-breadcrumbs .current {
  color: var(--text-primary);
  font-weight: 700;
}

/* Header bar for section view */
.browser-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.browser-header-row h2 {
  margin-bottom: 0;
}

/* Folders Grid */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.folder-card {
  background-color: var(--surface);
  border-top: 3px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(27, 28, 28, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              border-top-color 0.3s ease;
}

.folder-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(27, 28, 28, 0.08);
  border-top-color: var(--primary);
}

.folder-card:active {
  transform: translateY(-2px);
}

.folder-icon-wrapper {
  margin-bottom: 1.25rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.folder-card:hover .folder-icon-wrapper {
  transform: scale(1.1);
}

.folder-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.folder-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* File list grid */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.file-card {
  background-color: var(--surface);
  border-left: 3px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(27, 28, 28, 0.02);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              border-left-color 0.2s ease;
}

.file-card:hover {
  transform: translateX(6px);
  border-left-color: var(--primary);
  box-shadow: 0 8px 16px rgba(27, 28, 28, 0.05);
}

.file-card:active {
  transform: translateX(2px);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.file-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-text-wrapper {
  display: flex;
  flex-direction: column;
}

.file-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.file-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.file-action {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.file-card:hover .file-action {
  color: var(--primary);
}

/* PDF Viewer component styling */
.pdf-viewer-container {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(27, 28, 28, 0.06);
  margin-bottom: 3rem;
}

.pdf-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.pdf-viewer-title-area {
  display: flex;
  flex-direction: column;
}

.pdf-viewer-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.pdf-viewer-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pdf-viewer-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.pdf-iframe-wrapper {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 650px;
  border-radius: 4px;
  overflow: hidden;
  background-color: #eae8e7;
  border: 1px solid rgba(27, 28, 28, 0.1);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.pdf-iframe {
  border: none;
  width: 100%;
  height: 100%;
  display: block;
}

/* View transitions page animations */
.fade-in {
  animation: viewFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced Motion preferences */
@media (prefers-reduced-motion: reduce) {
  .folder-card, .file-card, .fade-in, .folder-icon-wrapper {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* Footer Styling */
footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1rem;
  text-align: center;
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  width: 100%;
}

footer a {
  color: var(--primary);
  font-weight: 600;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--accent);
}

/* News & Newsletters Tabs Layout */
.news-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 2px solid var(--surface-dim);
  margin-bottom: 2.5rem;
}

.tab-button {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.tab-button:hover {
  color: var(--primary);
}

.tab-button.active {
  color: var(--primary);
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--border); /* Gold */
  border-radius: 2px 2px 0 0;
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: tabFadeIn 0.3s ease;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fb-card {
  border-top: 3px solid var(--border);
  padding: 2rem;
  box-shadow: 0 10px 20px rgba(27, 28, 28, 0.04);
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--surface);
}

.fb-card .sidebar-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary);
  margin-top: 0;
}

.fb-feed-wrapper {
  background: var(--background);
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--surface-dim);
}

/* Modal Dialog Styling (Admin & Contribution) */
.image-modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 850px;
  width: 90%;
  background: var(--surface);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  font-family: inherit;
}
.image-modal-dialog::backdrop {
  background: rgba(18, 12, 24, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.modal-header h3 {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
  line-height: 1;
}
.modal-close-btn:hover {
  color: var(--danger);
}
.modal-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  padding: 2rem;
}
@media (max-width: 768px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
}
.modal-preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.02);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-sizing: border-box;
}
.modal-preview-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #120c18;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.modal-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.modal-form-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.btn-action {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-action:hover {
  background-color: var(--primary-container);
}
.btn-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Status Toast Notifications */
.status-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  color: white;
  z-index: 1000;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.status-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  background-color: var(--success);
}

.toast-error {
  background-color: var(--danger);
}

/* Media Gallery Animations */
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

.audio-icon-wrapper {
  animation: pulse 2s infinite ease-in-out;
}

/* ==========================================================================
   Royal Fiji Floating Circular Theme Toggle Button (Lower Left FAB)
   ========================================================================== */
.theme-toggle-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--fab-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 2px solid var(--fab-border);
  color: var(--fab-icon);
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2), 0 0 14px var(--fab-glow);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease,
              background-color 0.3s ease,
              border-color 0.3s ease,
              color 0.3s ease;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle-fab:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 0 22px var(--fab-glow);
  border-color: var(--accent);
}

.theme-toggle-fab:active {
  transform: translateY(-1px) scale(0.96);
}

.theme-toggle-fab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Ambient Subtle Pulsing Glow Ring */
.theme-toggle-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--fab-glow) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.theme-toggle-fab:hover .theme-toggle-glow {
  opacity: 1;
}

/* Icon Container & Morph Transitions */
.theme-toggle-icon-container {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle-fab.theme-toggle-animating .theme-toggle-icon-container {
  animation: fabSpin 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fabSpin {
  0% { transform: rotate(0deg) scale(0.85); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}

.theme-icon-moon,
.theme-icon-sun {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  stroke: var(--fab-icon);
}

/* Light Mode: Moon is visible (inviting to dark mode), Sun is hidden */
html:not([data-theme="dark"]) .theme-icon-moon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

html:not([data-theme="dark"]) .theme-icon-sun {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4) rotate(-90deg);
  pointer-events: none;
}

/* Dark Mode: Sun is visible (inviting to light mode), Moon is hidden */
html[data-theme="dark"] .theme-icon-moon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4) rotate(90deg);
  pointer-events: none;
}

html[data-theme="dark"] .theme-icon-sun {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
  filter: drop-shadow(0 0 5px rgba(245, 200, 66, 0.75));
}

/* Hover Tooltip */
.theme-toggle-tooltip {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100000;
}

.theme-toggle-tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent var(--border-subtle) transparent transparent;
}

.theme-toggle-fab:hover .theme-toggle-tooltip,
.theme-toggle-fab:focus-visible .theme-toggle-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 600px) {
  .theme-toggle-fab {
    bottom: 16px;
    left: 16px;
    width: 46px;
    height: 46px;
  }
  .theme-toggle-tooltip {
    display: none;
  }
}

/* Dark Mode Specific Component Overrides */
[data-theme="dark"] .card,
[data-theme="dark"] .person-card,
[data-theme="dark"] .sub-committee,
[data-theme="dark"] .bento-card {
  background-color: var(--surface);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .bento-card:hover {
  box-shadow: var(--shadow-lg), 0 0 15px rgba(212, 175, 55, 0.15);
}

[data-theme="dark"] .btn-secondary {
  background-color: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

[data-theme="dark"] .btn-secondary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

[data-theme="dark"] .event-card-horizontal {
  background-color: var(--surface);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .event-date-col {
  background-color: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--input-text);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 200, 66, 0.25);
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-preview-panel {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .modal-preview-panel {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .document-row,
[data-theme="dark"] .table-row,
[data-theme="dark"] tr:hover {
  background-color: var(--surface-hover);
}

[data-theme="dark"] .tabs-nav button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Contact Us Popup Modal Dialog */
.contact-modal-dialog {
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  width: 92%;
  max-width: 540px;
  padding: 0;
  margin: auto;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 2147483640;
}

.contact-modal-dialog::backdrop {
  background: var(--modal-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.contact-modal-dialog[open] {
  animation: contactModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes contactModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.contact-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 1.75rem 1rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
}

.contact-modal-header-text h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.4rem;
  font-family: var(--font-heading);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-modal-header-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact-modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.contact-modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.contact-modal-body {
  padding: 1.5rem 1.75rem;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
}

.contact-form-group {
  margin-bottom: 1.2rem;
  text-align: left;
}

.contact-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.contact-form-group label .required-star {
  color: #ef4444;
  margin-left: 2px;
}

.contact-form-input,
.contact-form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--input-text);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 200, 66, 0.2);
}

.contact-form-textarea {
  min-height: 105px;
  resize: vertical;
}

/* Captcha Challenge Box */
.contact-captcha-wrapper {
  background: var(--surface-dim, rgba(179, 163, 105, 0.08));
  border: 1px dashed var(--border-subtle);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
}

.contact-captcha-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.contact-captcha-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.contact-captcha-refresh-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.contact-captcha-refresh-btn:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--accent);
}

.contact-captcha-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-captcha-badge {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  user-select: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.contact-captcha-input {
  flex: 1;
  min-width: 0;
}

/* Status message */
.contact-status-box {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.contact-status-box.status-error {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.contact-status-box.status-success {
  display: block;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .contact-status-box.status-success {
  color: #4ade80;
}

/* Footer / Actions */
.contact-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.contact-btn-cancel {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-btn-cancel:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.contact-btn-submit {
  background: var(--primary);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(46, 0, 82, 0.2);
  transition: all 0.2s ease;
}

.contact-btn-submit:hover:not(:disabled) {
  background: var(--primary-container);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(46, 0, 82, 0.3);
}

.contact-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================================================
   Brothers' Photos Year & Tag Secondary Filter Bar and Badges
   ========================================================================== */
.carousel-secondary-filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: -0.5rem;
  margin-bottom: 2rem;
  padding: 0.85rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.carousel-secondary-filters-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  width: 100%;
}

.year-filter-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.year-filter-wrapper label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.year-filter-select {
  padding: 0.35rem 1.8rem 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-hover);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23d4af37' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  transition: all 0.2s ease;
  min-width: 120px;
}

.year-filter-select:hover,
.year-filter-select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.tags-filter-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}

.tags-filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.tag-chips-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-chip {
  padding: 0.25rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  user-select: none;
}

.tag-chip:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tag-chip.active {
  background: var(--primary);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(46, 0, 82, 0.25);
}

/* Photo Metadata Badges in Player Caption & Lightbox */
.photo-metadata-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.photo-year-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.photo-tag-chip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* Admin Card Tags & Year Badges */
.admin-card-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.admin-card-year {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
}

.admin-card-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  background: var(--surface-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
}

/* ==========================================================================
   Circular Magnifying Glass Loupe & Viewer Toolbar
   ========================================================================== */

.modal-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-top-toolbar {
  position: absolute;
  top: 25px;
  right: 95px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 100;
}

.btn-magnifier {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  backdrop-filter: blur(6px);
}

.btn-magnifier:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-magnifier.active {
  background: var(--accent);
  color: #1a1024;
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.55);
  font-weight: 700;
}

.magnifier-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(20, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 0.15rem 0.35rem;
  backdrop-filter: blur(6px);
}

.magnifier-zoom-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.magnifier-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--accent);
}

.magnifier-zoom-btn:active {
  transform: scale(0.9);
}

.magnifier-zoom-level {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  padding: 0 0.35rem;
  min-width: 38px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

/* Circular Loupe Element */
.image-loupe-lens {
  position: fixed;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.65), inset 0 0 15px rgba(0, 0, 0, 0.45);
  background-repeat: no-repeat;
  background-color: #0b0810;
  pointer-events: none;
  z-index: 10010;
  display: none;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.15s ease;
  overflow: hidden;
}

.image-loupe-lens.visible {
  display: block;
  opacity: 1;
  transform: scale(1);
}

/* Glass Reflection Highlight */
.image-loupe-lens::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.08) 35%, rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
  z-index: 2;
}

/* Loupe Subtle Center Focus Reticle */
.image-loupe-lens::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.75);
  background: rgba(212, 175, 55, 0.25);
  pointer-events: none;
  z-index: 3;
}

.magnifier-active-target {
  cursor: crosshair !important;
}

.composite-bottom-bar {
  width: 100%;
  max-width: 1400px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  z-index: 10001;
  padding-top: 0.5rem;
}

.composite-interaction-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

.composite-interaction-hint kbd {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.72rem;
  color: #fff;
  font-family: inherit;
}

@media (max-width: 768px) {
  .image-loupe-lens {
    width: 160px;
    height: 160px;
  }
  .modal-top-actions {
    gap: 0.4rem;
  }
  .btn-magnifier span.btn-label {
    display: none;
  }
  .composite-interaction-hint {
    display: none;
  }
}