/* ============================================
   THE PENSACOLA BEACON - Magazine Stylesheet
   ============================================ */

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

:root {
  --gold: #D4A843;
  --gold-light: #F0D68A;
  --gold-dim: rgba(212,168,67,0.15);
  --dark: #0D0D0D;
  --dark-warm: #1A1714;
  --dark-card: #1E1B17;
  --cream: #FDF8F0;
  --cream-dim: #F5EDE0;
  --text: #2B2520;
  --text-light: #6B6058;
  --accent: #C45D3E;
  --green: #6B8F5E;
  --blue: #5B7BA8;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

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

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }

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

/* ---- NAVIGATION ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--dark);
  border-bottom: 1px solid rgba(253,248,240,0.06);
  transition: background var(--transition);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(253,248,240,0.6);
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
  margin: 5px 0;
  transition: var(--transition);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--dark);
  border-bottom: 1px solid rgba(253,248,240,0.08);
  padding: 16px 24px 24px;
  z-index: 999;
}

.nav-mobile.open {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  color: rgba(253,248,240,0.7);
  border-bottom: 1px solid rgba(253,248,240,0.06);
  transition: color var(--transition);
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a:hover {
  color: var(--gold);
}

/* ---- LAYOUT ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-content {
  padding-top: 64px;
}

/* ---- HOMEPAGE HERO ---- */
.magazine-hero {
  background: var(--dark);
  color: var(--cream);
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
}

.magazine-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,168,67,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-label {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.magazine-hero h1 {
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.08;
  margin-bottom: 20px;
  max-width: 800px;
}

.magazine-hero h1 .highlight {
  color: var(--gold);
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(253,248,240,0.6);
  max-width: 560px;
  margin-bottom: 40px;
}

/* ---- FEATURED ARTICLE ---- */
.featured-section {
  padding: 60px 24px;
  background: var(--cream);
}

.section-header {
  max-width: 1200px;
  margin: 0 auto 32px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-header h2 {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--dark);
}

.section-header a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity var(--transition);
}

.section-header a:hover {
  opacity: 0.7;
}

.featured-card {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.featured-card-image {
  position: relative;
  min-height: 400px;
  overflow: hidden;
}

.featured-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.featured-card:hover .featured-card-image img {
  transform: scale(1.03);
}

.featured-card-content {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--cream);
}

.category-tag {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.featured-card-content h3 {
  font-weight: 700;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.featured-card-content .excerpt {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(253,248,240,0.6);
  margin-bottom: 24px;
}

.article-meta {
  font-size: 0.85rem;
  color: rgba(253,248,240,0.4);
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(253,248,240,0.3);
}

/* ---- ARTICLE GRID ---- */
.articles-section {
  padding: 60px 24px 80px;
  background: var(--cream);
}

.articles-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.article-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(43,37,32,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.article-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

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

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

.article-card-body {
  padding: 24px;
}

.article-card-body .category-tag {
  color: var(--accent);
  margin-bottom: 10px;
}

.article-card-body h3 {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-body .excerpt {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.article-card-body .article-meta {
  color: var(--text-light);
}

.article-card-body .article-meta .dot {
  background: var(--text-light);
}

/* ---- CATEGORIES BAR ---- */
.categories-bar {
  padding: 40px 24px;
  background: var(--dark-warm);
}

.categories-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  background: rgba(253,248,240,0.04);
  border: 1px solid rgba(253,248,240,0.08);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.category-card:hover {
  border-color: rgba(212,168,67,0.3);
  background: rgba(253,248,240,0.07);
  transform: translateY(-2px);
}

.category-card h3 {
  font-weight: 700;
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 8px;
}

.category-card p {
  font-size: 0.82rem;
  color: rgba(253,248,240,0.45);
  line-height: 1.5;
}

/* ---- SINGLE ARTICLE ---- */
.article-hero {
  background: var(--dark);
  padding: 100px 24px 60px;
  color: var(--cream);
}

.article-hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.article-hero .category-tag {
  margin-bottom: 20px;
}

.article-hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 16px;
}

.article-hero .excerpt {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(253,248,240,0.6);
  margin-bottom: 24px;
}

.article-hero .article-meta {
  color: rgba(253,248,240,0.5);
}

.article-image-full {
  max-width: 960px;
  margin: -20px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.article-image-full img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.article-image-full .caption {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 12px;
  font-style: italic;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-body h2 {
  font-weight: 700;
  font-size: 1.6rem;
  margin: 40px 0 16px;
  color: var(--dark);
}

.article-body h3 {
  font-weight: 700;
  font-size: 1.3rem;
  margin: 32px 0 12px;
  color: var(--dark);
}

.article-body p {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 20px;
}

.article-body ul, .article-body ol {
  margin: 16px 0 24px 24px;
}

.article-body li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--dark);
}

.article-body em {
  font-style: italic;
}

.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--cream-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-body blockquote p {
  color: var(--text-light);
  font-size: 1.05rem;
}

/* Author box */
.author-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px;
  background: var(--cream-dim);
  border-radius: var(--radius);
  margin-top: 48px;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--gold);
  flex-shrink: 0;
}

.author-info h4 {
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 4px;
}

.author-info p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-light);
  margin-bottom: 0;
}

/* ---- CATEGORY PAGE ---- */
.category-hero {
  background: var(--dark);
  padding: 100px 24px 60px;
  color: var(--cream);
  text-align: center;
}

.category-hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.category-hero p {
  font-size: 1.1rem;
  color: rgba(253,248,240,0.55);
  max-width: 550px;
  margin: 0 auto;
}

.category-articles {
  padding: 60px 24px 80px;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--dark);
  border-top: 1px solid rgba(253,248,240,0.06);
  padding: 60px 24px 40px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .footer-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.92rem;
  color: rgba(253,248,240,0.4);
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(253,248,240,0.5);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: rgba(253,248,240,0.45);
  padding: 6px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(253,248,240,0.06);
  text-align: center;
  font-size: 0.82rem;
  color: rgba(253,248,240,0.25);
}

/* ---- ADMIN STYLES ---- */
.admin-layout {
  min-height: 100vh;
  background: #f5f5f0;
}

.admin-header {
  background: var(--dark);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.admin-header .logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 1px;
}

.admin-header .badge {
  font-size: 0.72rem;
  background: rgba(212,168,67,0.15);
  color: var(--gold);
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 600;
}

.admin-header nav a {
  font-size: 0.85rem;
  color: rgba(253,248,240,0.5);
  margin-left: 20px;
  transition: color var(--transition);
}

.admin-header nav a:hover {
  color: var(--cream);
}

.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 24px;
}

.admin-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #fafaf5;
}

.admin-table td {
  padding: 14px 20px;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: middle;
}

.admin-table tr:hover {
  background: rgba(212,168,67,0.03);
}

.admin-table .title-cell {
  font-weight: 600;
  color: var(--dark);
}

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.published {
  background: rgba(107,143,94,0.12);
  color: var(--green);
}

.status-badge.draft {
  background: rgba(107,96,88,0.1);
  color: var(--text-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--gold-light);
}

.btn-sm {
  font-size: 0.8rem;
  padding: 6px 14px;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.12);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-danger {
  background: rgba(196,93,62,0.1);
  color: var(--accent);
  border: none;
}

.btn-danger:hover {
  background: rgba(196,93,62,0.2);
}

/* Admin form */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 12px 16px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  background: white;
  color: var(--text);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group textarea {
  min-height: 300px;
  resize: vertical;
  font-size: 0.95rem;
  line-height: 1.6;
}

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

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* Admin login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
}

.login-card {
  background: var(--dark-warm);
  border: 1px solid rgba(253,248,240,0.08);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
}

.login-card h1 {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--cream);
  margin-bottom: 8px;
}

.login-card p {
  color: rgba(253,248,240,0.45);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.login-card input {
  width: 100%;
  padding: 14px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  background: rgba(253,248,240,0.05);
  border: 1px solid rgba(253,248,240,0.1);
  border-radius: 8px;
  color: var(--cream);
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.login-card input:focus {
  outline: none;
  border-color: var(--gold);
}

.login-card .btn {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1rem;
}

.login-error {
  background: rgba(196,93,62,0.1);
  color: var(--accent);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* ---- ALL ARTICLES PAGE ---- */
.all-articles-hero {
  background: var(--dark);
  padding: 100px 24px 60px;
  color: var(--cream);
}

.all-articles-hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-state h3 {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-light);
  font-size: 1rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: block;
  }
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .categories-grid {
    grid-template-columns: 1fr;
  }
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-card-image {
    min-height: 240px;
  }
  .featured-card-content {
    padding: 28px 24px 36px;
  }
  .magazine-hero {
    padding: 80px 24px 60px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .article-hero h1 {
    font-size: 1.8rem;
  }
  .section-header {
    flex-direction: column;
    gap: 8px;
  }
}
