/* ==========================================================================
   Today On General Hospital - Facebook inspired theme
   ========================================================================== */

:root {
  --fb-blue: #1877f2;
  --fb-blue-dark: #166fe5;
  --fb-green: #42b72a;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #050505;
  --text-muted: #65676b;
  --border: #dddfe2;
  --hover: #f2f2f2;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

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

/* -------------------- Header -------------------- */
.site-header {
  background: var(--fb-blue);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand:hover {
  text-decoration: none;
}

.brand .logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--fb-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1;
}

.brand .brand-text small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  opacity: 0.9;
}

/* Navigation */
.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-nav a {
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
  transition: background 0.15s;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

/* -------------------- Layout -------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}

/* -------------------- Cover / Hero -------------------- */
.cover {
  background: linear-gradient(135deg, #0a2540 0%, #1877f2 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.cover h1 {
  font-size: 2rem;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.cover p {
  opacity: 0.92;
  max-width: 640px;
  margin: 0 auto;
}

.cover .cover-cta {
  margin-top: 18px;
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  background: var(--fb-blue);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: var(--fb-blue-dark);
  text-decoration: none;
}

.btn.btn-fb {
  background: #fff;
  color: var(--fb-blue);
}

.btn.btn-green {
  background: var(--fb-green);
}

/* -------------------- Cards / Feed -------------------- */
.section-title {
  font-size: 1.25rem;
  margin: 4px 0 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.post-card .post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.post-card .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fb-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.post-card .post-meta strong {
  display: block;
  font-size: 0.95rem;
}

.post-card .post-meta span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-spoiler { background: #ffe0e0; color: #d81a1a; }
.badge-recap   { background: #e0ecff; color: #1877f2; }
.badge-news    { background: #e2f7e1; color: #2f9e26; }

.post-card .post-title {
  padding: 0 16px 8px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.post-card .post-title a {
  color: var(--text);
}

.post-card .post-excerpt {
  padding: 0 16px 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.post-card .post-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e4e6eb;
}

.post-card .post-actions {
  display: flex;
  border-top: 1px solid var(--border);
}

.post-card .post-actions a {
  flex: 1;
  text-align: center;
  padding: 10px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.post-card .post-actions a:hover {
  background: var(--hover);
  text-decoration: none;
}

/* Post image gallery (many images per post) */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  background: #fff;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e4e6eb;
}

.gallery.count-1 { grid-template-columns: 1fr; }
.gallery.count-1 img { aspect-ratio: 16 / 9; }
.gallery.count-3 img:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }

/* -------------------- Sidebar -------------------- */
.sidebar .widget {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.sidebar .widget h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.sidebar .widget ul {
  list-style: none;
}

.sidebar .widget li {
  padding: 7px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.92rem;
}

.sidebar .widget li:last-child {
  border-bottom: none;
}

.fb-follow {
  text-align: center;
}

.fb-follow p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* -------------------- Article page -------------------- */
.article {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.article h1 {
  font-size: 1.7rem;
  line-height: 1.3;
  margin-bottom: 10px;
}

.article .article-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.article p {
  margin-bottom: 16px;
  font-size: 1.02rem;
}

.article h2 {
  margin: 22px 0 10px;
  font-size: 1.3rem;
}

.article img {
  border-radius: 6px;
  margin: 16px 0;
}

.article figure {
  margin: 18px 0;
}

.article figure img {
  margin: 0 0 6px;
}

.article figcaption {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-style: italic;
  text-align: center;
}

.article .article-dek {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 20px;
}

.post-figure {
  margin: 18px 0;
}

.post-figure img {
  width: 100%;
  border-radius: 8px;
  margin: 0 0 6px;
}

.post-figure figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.post-source {
  margin-top: 22px;
  padding: 14px 16px;
  background: #f0f6ff;
  border-left: 4px solid var(--fb-blue);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Static content pages */
.page-content {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  max-width: 820px;
  margin: 0 auto;
}

.page-content h1 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--fb-blue);
}

.page-content h2 {
  font-size: 1.25rem;
  margin: 22px 0 10px;
}

.page-content p {
  margin-bottom: 14px;
}

.page-content ul {
  margin: 0 0 14px 22px;
}

.page-content li {
  margin-bottom: 6px;
}

/* Contact */
.contact-box {
  text-align: center;
  padding: 20px;
  background: #f7f9fc;
  border-radius: 8px;
  margin: 18px 0;
}

.contact-box a {
  font-size: 1.2rem;
  font-weight: 700;
}

/* -------------------- Footer -------------------- */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px;
}

.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
}

.footer-cols h4 {
  margin-bottom: 10px;
  font-size: 1rem;
}

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

.footer-cols li {
  padding: 4px 0;
  font-size: 0.9rem;
}

.footer-cols p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* -------------------- Responsive -------------------- */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--fb-blue);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open {
    max-height: 400px;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px;
  }
  .main-nav a {
    padding: 12px;
    border-radius: 6px;
  }
  .cover h1 {
    font-size: 1.5rem;
  }
  .brand .brand-text .full {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }
  .brand .brand-text small {
    display: none;
  }
}
