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

:root {
  --bg-color: #0b1120;
  --surface-color: rgba(30, 41, 59, 0.7);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-color: #ff6b6b;
  --accent-secondary: #20c997;
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* Glassmorphism Utilities */
.glass {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

/* Button Utilities */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), #ff8e8e);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--glass-border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-primary);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(11, 17, 32, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--text-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(11, 17, 32, 0.9) 0%, rgba(11, 17, 32, 0.4) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 600px;
  animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content h1 {
  font-size: 4.5rem;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-content h1 span {
  color: var(--accent-color);
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 20px;
}

/* Sections */
section {
  padding: 80px 5%;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 3rem;
  margin-bottom: 15px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Map specific */
#map-container {
  height: 80vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
}

/* Map Legend */
.map-legend {
  padding: 15px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  min-width: 150px;
}

.map-legend h4 {
  margin-bottom: 12px;
  font-family: var(--font-heading);
  color: var(--accent-secondary);
  font-size: 1.1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.legend-color {
  width: 24px;
  height: 4px;
  margin-right: 12px;
  border-radius: 2px;
}

.legend-icon {
  width: 16px;
  height: 24px;
  margin-right: 16px;
  margin-left: 4px;
  object-fit: contain;
}

.map-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

/* Notice Boards */
.board-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--surface-color);
  color: var(--text-primary);
  border-color: var(--accent-secondary);
}

.notices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.notice-card {
  padding: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notice-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.notice-tag {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(32, 201, 151, 0.2);
  color: var(--accent-secondary);
  margin-bottom: 15px;
}

.notice-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.notice-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.notice-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Gallery for multiple images */
.notice-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 12px;
}

.notice-gallery {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.notice-gallery::-webkit-scrollbar {
  height: 4px;
}

.notice-gallery::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 2px;
}

.notice-gallery-img {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.notice-gallery-img:hover {
  transform: scale(1.05);
}

.notice-gallery-img.active {
  border-color: var(--accent-secondary);
}

/* Notice attachments and documents */
.notice-attachments {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--glass-border);
}

.attachments-title {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}

.attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--accent-secondary) !important;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

.attachment-link:hover {
  color: var(--accent-color) !important;
  text-decoration: underline;
}

.pdf-icon {
  flex-shrink: 0;
}

/* Lightbox Modal Overlay */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10001;
  transition: transform 0.2s ease, color 0.2s ease;
}

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

.lightbox-content {
  width: 90%;
  max-width: 1200px;
  height: 85vh;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  background: var(--surface-color);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 30px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Media Section (Left side) */
.lightbox-media-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 100%;
  box-sizing: border-box;
}

.lightbox-media-section.has-gallery {
  padding-bottom: 80px; /* Only reserve bottom space if there are thumbnails */
}

.lightbox-large-image {
  max-width: 100%;
  max-height: 100%; /* Take full available space within the padded container */
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  transition: opacity 0.2s ease;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.lightbox-nav:hover {
  background: var(--accent-secondary);
  color: var(--bg-color);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

.lightbox-thumbnails {
  display: flex;
  gap: 10px;
  position: absolute;
  bottom: 0;
  width: 100%;
  overflow-x: auto;
  padding: 5px 0;
  justify-content: center;
}

.lightbox-thumb {
  width: 70px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.lightbox-thumb:hover,
.lightbox-thumb.active {
  opacity: 1;
  transform: scale(1.05);
}

.lightbox-thumb.active {
  border-color: var(--accent-secondary);
}

/* Info Section (Right side) */
.lightbox-info-section {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  overflow-y: auto;
  padding-right: 10px;
}

.lightbox-info-section::-webkit-scrollbar {
  width: 6px;
}

.lightbox-info-section::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 3px;
}

.lightbox-title {
  font-size: 2rem;
  margin-top: 10px;
  margin-bottom: 15px;
  background: linear-gradient(to right, var(--text-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lightbox-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 25px;
}

/* Responsive Lightbox */
@media (max-width: 900px) {
  .lightbox-content {
    grid-template-columns: 1fr;
    grid-template-rows: 1.2fr 1fr;
    height: 90vh;
    padding: 20px;
    gap: 20px;
  }
  .lightbox-large-image {
    max-height: 60%;
  }
  .lightbox-close {
    top: 15px;
    right: 20px;
    font-size: 2rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 3rem;
  }

  .nav-links {
    display: none;
    /* Add hamburger later */
  }
}