@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --navy-dark: #000080;
  --navy-medium: #0000CC;
  --navy-light: #4169E1;
  --navy-gradient: linear-gradient(135deg, #000066 0%, #0047AB 50%, #4169E1 100%);
  --cream: #F8F7F4;
  --white: #FFFFFF;
  --gray-light: #F5F5F5;
  --gray-medium: #8B8B8B;
  --gray-dark: #2D2D2D;
  --accent-gold: #FFD700;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 40px rgba(0, 0, 128, 0.15);
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--gray-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navigation */
nav {
  background: var(--white);
  padding: 1.25rem 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-dark);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--navy-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray-dark);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  background: var(--gray-light);
  color: var(--navy-dark);
}

.nav-links a.active {
  background: var(--navy-dark);
  color: var(--white);
}

/* Hero Section */
.hero {
  background: var(--navy-gradient);
  padding: 5rem 2rem;
  margin: 2rem;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  max-width: 600px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
}

.btn-primary {
  background: var(--white);
  color: var(--navy-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Main Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--gray-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 1rem;
}

/* Announcements */
.announcement {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--navy-dark);
  box-shadow: var(--shadow-sm);
}

.announcement-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--gray-medium);
}

.announcement-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.announcement h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--navy-dark);
}

.announcement-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 0.5rem;
}

.announcement-body {
  color: var(--gray-medium);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.announcement-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--gray-light);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--navy-dark);
  font-weight: 500;
}

/* Leaderboard Card */
.leaderboard-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  color: var(--white);
}

.leaderboard-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.trophy-icon {
  font-size: 2rem;
}

.leaderboard-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
}

.leaderboard-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.125rem;
}

/* Page Header */
.page-header {
  margin-bottom: 3rem;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--navy-dark);
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.25rem;
  color: var(--gray-medium);
}

/* Officers Grid */
.officers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.officer-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

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

.officer-photo {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: var(--gray-light);
}

.officer-info {
  padding: 1.5rem;
}

.officer-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.5rem;
}

.officer-role {
  color: var(--gray-medium);
  font-size: 1rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

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

/* Leaderboard Embed */
.leaderboard-embed {
  width: 100%;
  height: 800px;
  border: none;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

/* Officer Portal */
.officer-portal {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
}

.portal-trigger {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy-gradient);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.portal-trigger:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.portal-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.portal-modal.active {
  opacity: 1;
  pointer-events: all;
}

.portal-content {
  background: var(--white);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.portal-modal.active .portal-content {
  transform: scale(1);
}

.portal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.portal-header h2 {
  font-family: 'Playfair Display', serif;
  color: var(--navy-dark);
}

.portal-form {
  display: flex;
  gap: 1rem;
}

.portal-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.3s ease;
}

.portal-input:focus {
  outline: none;
  border-color: var(--navy-dark);
}

.edit-controls {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--gray-light);
}

.edit-controls.active {
  display: block;
}

.edit-btn {
  padding: 0.5rem 1rem;
  background: var(--gray-light);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
}

.edit-btn:hover {
  background: var(--gray-medium);
  color: var(--white);
}

.edit-btn.delete {
  background: #FF4444;
  color: var(--white);
}

.edit-btn.delete:hover {
  background: #CC0000;
}

/* Responsive */
@media (max-width: 968px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    flex-wrap: wrap;
  }
  
  .page-header h1 {
    font-size: 2.5rem;
  }
  
  .officers-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 3rem 1.5rem;
    margin: 1rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
}
