/* === Serrano HS Alumni — Main Stylesheet === */
:root {
  --blue: #1B3A8C;
  --gold: #F5C518;
  --white: #FFFFFF;
  --dark: #222222;
  --gray: #6b7280;
  --light: #f3f4f6;
  --border: #e5e7eb;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.10);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', Arial, sans-serif;
  background: #f8f9fb;
  color: var(--dark);
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--gold); }

h1,h2,h3,h4,h5 { font-family: 'Montserrat', Arial, sans-serif; font-weight: 700; line-height: 1.2; }

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

/* === Navbar === */
.navbar {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: 'Montserrat', Arial, sans-serif;
  text-decoration: none;
}
.navbar-brand:hover { color: var(--gold); }
.navbar-logo { flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 1.1rem; font-weight: 800; color: var(--white); }
.brand-tag { font-size: 0.65rem; color: var(--gold); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links li a {
  color: rgba(255,255,255,0.85);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s;
}
.nav-links li a:hover { background: rgba(245,197,24,0.15); color: var(--gold); }
.nav-links li a.active { background: rgba(245,197,24,0.2); color: var(--gold); }
.btn-nav {
  background: rgba(255,255,255,0.1) !important;
  border: 1px solid rgba(255,255,255,0.3) !important;
}
.btn-nav-gold {
  background: var(--gold) !important;
  color: var(--blue) !important;
  font-weight: 700 !important;
  border-color: var(--gold) !important;
}
.btn-nav-gold:hover { background: #e6b800 !important; color: var(--blue) !important; }
.nav-admin a { color: var(--gold) !important; }
.nav-logout a { color: #ff6b6b !important; }
.badge {
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* === Main Content === */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* === Floating Social Sidebar === */
.social-sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #fff;
  text-decoration: none;
  transition: width 0.2s, opacity 0.2s;
  border-radius: 4px 0 0 4px;
}
.social-btn:hover { width: 48px; opacity: 0.9; color: #fff; }
.social-btn.fb { background: #1877F2; }
.social-btn.ig { background: radial-gradient(circle at 30% 110%, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%); }
.social-btn.tt { background: #010101; }
.social-btn.yt { background: #FF0000; }
.social-btn.tw { background: #000; }

/* === Cards === */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.card-sm { padding: 16px; }
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 4px; color: var(--dark); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: 'Inter', Arial, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
  color: var(--dark);
}
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,58,140,0.1);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.78rem; color: var(--gray); margin-top: 3px; }
.text-danger { color: #ef4444; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Montserrat', Arial, sans-serif;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: #162e6e; color: var(--white); }
.btn-gold { background: var(--gold); color: var(--blue); }
.btn-gold:hover { background: #e6b800; color: var(--blue); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* === Alerts === */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  border-left: 4px solid transparent;
}
.alert-success { background: #f0fdf4; color: #166534; border-color: #22c55e; }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: #ef4444; }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: #3b82f6; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #f59e0b; }

/* === Page Header === */
.page-header {
  background: linear-gradient(135deg, var(--blue) 0%, #2a4fa8 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '🐍';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;
  opacity: 0.1;
}
.page-header h1 { color: var(--white); font-size: 1.75rem; }
.page-header p { color: rgba(255,255,255,0.8); margin-top: 6px; }
.page-header .gold { color: var(--gold); }

/* === Post / Feed Cards === */
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.post-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 0;
}
.post-card-meta { flex: 1; }
.post-card-meta .name { font-weight: 700; color: var(--blue); font-size: 0.95rem; }
.post-card-meta .time { font-size: 0.78rem; color: var(--gray); }
.post-card-body { padding: 12px 20px; }
.post-card-text { line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.post-card-photo { cursor: pointer; display: block; margin: 12px 20px; }
.post-card-photo img { max-height: 300px; border-radius: 6px; object-fit: cover; }
.post-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.like-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s, border-color 0.2s;
  color: var(--dark);
}
.like-btn:hover, .like-btn.liked { background: #fef3c7; border-color: var(--gold); color: var(--blue); }
.like-btn.liked { background: #fef3c7; }
.year-tag {
  background: var(--blue);
  color: var(--gold);
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* === Year Grid (Classmates) === */
.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.year-card {
  background: var(--blue);
  color: var(--gold);
  border-radius: 6px;
  padding: 12px 8px;
  text-align: center;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  font-size: 1rem;
  transition: transform 0.2s, background 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.year-card:hover { transform: scale(1.05); background: #2a4fa8; color: var(--gold); }
.year-card .count { font-size: 0.72rem; color: rgba(255,255,255,0.7); font-weight: 400; font-family: 'Inter', Arial, sans-serif; margin-top: 2px; }

/* === Profile === */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.profile-avatar img, .profile-avatar .avatar-initials {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50%;
  border: 3px solid var(--gold);
  font-size: 2rem !important;
}
.profile-info h2 { color: var(--blue); margin-bottom: 4px; }
.profile-info .grad-year { color: var(--gold); font-weight: 700; font-size: 1rem; }
.profile-info .location { color: var(--gray); font-size: 0.875rem; margin-top: 4px; }

/* === Member List === */
.member-list { display: flex; flex-direction: column; gap: 10px; }
.member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--dark);
  transition: background 0.2s;
}
.member-item:hover { background: var(--light); color: var(--dark); }
.member-item .member-info { flex: 1; }
.member-item .member-name { font-weight: 600; color: var(--blue); font-size: 0.95rem; }
.member-item .member-sub { font-size: 0.78rem; color: var(--gray); }

/* === Forum === */
.forum-category {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.forum-cat-header {
  background: var(--blue);
  color: var(--white);
  padding: 12px 16px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.forum-cat-header a { color: var(--gold); text-decoration: none; }
.forum-thread-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  gap: 12px;
}
.forum-thread-row:hover { background: var(--light); }
.forum-thread-title { flex: 1; font-weight: 600; color: var(--blue); font-size: 0.9rem; }
.forum-thread-meta { font-size: 0.75rem; color: var(--gray); white-space: nowrap; }

/* === Messages === */
.conversation-list { display: flex; flex-direction: column; gap: 0; }
.conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--dark);
  transition: background 0.2s;
}
.conversation-item:hover { background: var(--light); }
.conversation-item.unread { background: #eff6ff; }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 700; color: var(--blue); font-size: 0.9rem; }
.conv-preview { font-size: 0.8rem; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 0.75rem; color: var(--gray); white-space: nowrap; }

.chat-box {
  height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.chat-msg { display: flex; gap: 8px; align-items: flex-start; max-width: 80%; }
.chat-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg .bubble {
  background: var(--light);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg.mine .bubble { background: var(--blue); color: var(--white); }
.chat-msg .bubble-meta { font-size: 0.7rem; color: var(--gray); margin-top: 2px; text-align: right; }
.chat-input-row { display: flex; gap: 8px; margin-top: 12px; }
.chat-input-row .form-control { flex: 1; }

/* === Blog === */
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.blog-card-body { padding: 20px; }
.blog-card-title { font-size: 1.2rem; color: var(--blue); margin-bottom: 8px; }
.blog-card-title a { color: var(--blue); }
.blog-card-title a:hover { color: var(--gold); }
.blog-card-meta { font-size: 0.78rem; color: var(--gray); margin-bottom: 12px; }
.blog-card-excerpt { color: var(--dark); line-height: 1.6; font-size: 0.9rem; }

/* === Admin === */
.admin-dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.admin-stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  border-top: 4px solid var(--blue);
}
.admin-stat-card .stat-num { font-size: 2rem; font-weight: 800; color: var(--blue); font-family: 'Montserrat', Arial, sans-serif; }
.admin-stat-card .stat-label { font-size: 0.8rem; color: var(--gray); margin-top: 4px; }
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.admin-nav a {
  background: var(--blue);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.admin-nav a:hover, .admin-nav a.active { background: var(--gold); color: var(--blue); }

/* === Tables === */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { background: var(--blue); color: var(--white); padding: 10px 12px; text-align: left; font-family: 'Montserrat', Arial, sans-serif; font-size: 0.8rem; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: var(--light); }

/* === Modals === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-inner {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  padding: 12px;
}
.modal-video { width: 800px; }
.modal-close {
  position: absolute;
  top: -16px;
  right: -16px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, #0d2260 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 48px 32px;
  margin-bottom: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23F5C518' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 2.2rem; color: var(--gold); margin-bottom: 8px; }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,0.85); margin-bottom: 20px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* === Find Your Year Section === */
.find-year-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 24px; }
.find-year-section h2 { color: var(--blue); margin-bottom: 8px; font-size: 1.4rem; }
.find-year-section .subtitle { color: var(--gray); margin-bottom: 16px; font-size: 0.9rem; }
.year-decade-group { margin-bottom: 12px; }
.year-decade-label { font-size: 0.75rem; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.year-btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.year-btn {
  background: var(--blue);
  color: var(--gold);
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Montserrat', Arial, sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.1s;
}
.year-btn:hover { background: var(--gold); color: var(--blue); transform: scale(1.05); }

/* === Embed Containers === */
.embed-container { margin: 12px 20px; }
.embed-instagram, .embed-tiktok, .embed-twitter { max-width: 500px; }

/* === Misc === */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.text-muted { color: var(--gray); }
.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.inline-block { display: inline-block; }
.w-full { width: 100%; }
.avatar { border-radius: 50%; object-fit: cover; }
.loading { text-align: center; color: var(--gray); padding: 20px; }
.empty-state { text-align: center; color: var(--gray); padding: 40px 20px; }
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { color: var(--dark); margin-bottom: 8px; }
.comment-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-bubble { background: var(--light); border-radius: 8px; padding: 8px 12px; flex: 1; }
.comment-author { font-weight: 700; font-size: 0.8rem; color: var(--blue); }
.comment-time { font-size: 0.72rem; color: var(--gray); }
.comment-text { font-size: 0.875rem; margin-top: 4px; line-height: 1.5; white-space: pre-wrap; }
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar .form-control { flex: 1; }
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--blue);
  text-decoration: none;
  transition: background 0.2s;
}
.pagination a:hover { background: var(--blue); color: var(--white); }
.pagination .current { background: var(--blue); color: var(--white); border-color: var(--blue); }
.tag { display: inline-block; background: var(--light); border-radius: 4px; padding: 2px 8px; font-size: 0.75rem; color: var(--gray); }

/* === Responsive === */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--blue);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { width: 100%; padding: 10px 12px; }
  .navbar { position: relative; }
  .hero h1 { font-size: 1.5rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .social-sidebar { display: none; }
  .main-content { padding: 16px 12px 40px; }
  .year-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
  .modal-video { width: 95vw; }
  .admin-dashboard-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero { padding: 28px 16px; }
  .card { padding: 16px; }
  .page-header { padding: 20px 16px; }
  .page-header h1 { font-size: 1.3rem; }
}
