/* ==========================================================================
   WEBSITE RESMI RW (RUKUN WARGA) - STYLESHEET
   Design System: Emerald Civic Modern & Dark/Light Mode
   ========================================================================== */

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

:root {
  /* Color Palette - Light Mode */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #d1fae5;
  --primary-dark: #064e3b;
  --secondary: #0284c7;
  --secondary-light: #e0f2fe;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-nav: rgba(255, 255, 255, 0.85);
  --bg-modal: rgba(15, 23, 42, 0.65);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #059669;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 30px -10px rgba(5, 150, 105, 0.15);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Color Palette - Dark Mode */
  --bg-main: #0b1329;
  --bg-card: #141e38;
  --bg-card-hover: #1c294a;
  --bg-nav: rgba(15, 23, 42, 0.85);
  --bg-modal: rgba(0, 0, 0, 0.75);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: #243256;
  --border-focus: #10b981;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 35px rgba(0, 0, 0, 0.6);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

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

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

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

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

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

.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #047857);
  color: white;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
  color: white;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

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

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
  border-color: var(--primary);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.12) 0%, transparent 40%),
              radial-gradient(circle at 20% 80%, rgba(2, 132, 199, 0.12) 0%, transparent 40%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-card-visual {
  position: relative;
}

.hero-main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 2;
}

.hero-card-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.floating-badge-1 {
  position: absolute;
  top: -20px;
  right: -20px;
  background: var(--bg-card);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 3;
}

.floating-badge-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Section Spacing */
.section-padding {
  padding: 90px 0;
}

/* Pinned Announcement Banner */
.pinned-announcement-card {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(2, 132, 199, 0.08));
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.pinned-badge-label {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 1.25rem;
  border-bottom-left-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pinned-content {
  flex: 1;
}

.pinned-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pinned-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

/* News Controls (Search & Filter) */
.news-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.category-filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.search-box {
  position: relative;
  min-width: 280px;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* News Grid & Cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(5, 150, 105, 0.3);
}

.news-card-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
}

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

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

.news-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.3rem 0.85rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.news-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.news-card-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
  color: var(--text-main);
}

.news-card-excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.read-more-btn {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.read-more-btn:hover {
  gap: 0.6rem;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Structure Section (Struktur RW) */
.structure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.75rem;
}

.member-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.member-role-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.member-avatar-wrap {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.25rem;
  border-radius: var(--radius-full);
  padding: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.member-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
  background: var(--bg-card);
}

.member-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.member-title {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.member-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Services & RT Directory */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.service-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.rt-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.rt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rt-badge {
  width: 48px;
  height: 48px;
  background: var(--secondary-light);
  color: var(--secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

.gallery-count-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

/* Gallery Slider / Carousel Modal Styles */
.slider-container {
  position: relative;
  width: 100%;
  height: 380px;
  background: #091021;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.slider-nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.slider-prev {
  left: 1rem;
}

.slider-next {
  right: 1rem;
}

.slider-counter {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.gallery-thumbs-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.gallery-thumb-img {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: var(--transition);
  flex-shrink: 0;
}

.gallery-thumb-img:hover, .gallery-thumb-img.active {
  opacity: 1;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Modal Overlay & Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg-modal);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.modal-body {
  padding: 2rem;
}

/* Admin Dashboard Modal Specifics */
.admin-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-data-list {
  margin-top: 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
}

.admin-list-item:last-child {
  border-bottom: none;
}

.admin-list-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-list-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.admin-list-actions {
  display: flex;
  gap: 0.5rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-success {
  border-left: 4px solid var(--primary);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Footer */
.footer {
  background: #091021;
  color: #94a3b8;
  padding: 80px 0 30px;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
}

/* Responsive Rules */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 2rem;
    flex-direction: column;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    transition: var(--transition);
  }
  .nav-menu.active {
    transform: translateY(0);
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.35rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .news-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ADMIN FILE UPLOAD & PREVIEW STYLES
   ========================================================================== */
.file-upload-box {
  position: relative;
  width: 100%;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.file-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: var(--bg-main);
  border: 2px dashed var(--primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.file-dropzone:hover {
  background: var(--primary-light);
  border-color: var(--primary-hover);
}

[data-theme="dark"] .file-dropzone:hover {
  background: rgba(5, 150, 105, 0.2);
}

.file-drop-icon {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.file-drop-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.image-preview-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.image-preview-container img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.gallery-upload-thumbs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.gallery-upload-thumb-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

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

.gallery-upload-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-upload-thumb-remove:hover {
  background: var(--danger);
  transform: scale(1.1);
}

