/* ================================================================
   GLOBAL
   ================================================================ */
body { font-size:16px; line-height:1.8; color:#1a2535; -webkit-font-smoothing:antialiased; background: #f0f2f5; }
p, li { font-size:1rem; line-height:1.85; color:#2d3a4a; }
h1,h2,h3,h4 { line-height:1.25; color:#0a2154; letter-spacing:-.01em; }

/* ================================================================
   PAGE HERO
   ================================================================ */
.page-hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(7,24,64,.90) 0%, rgba(13,43,110,.82) 60%, rgba(26,74,138,.78) 100%),
    url('img/quare.png') center / cover no-repeat;
  padding: calc(3rem + 70px) 0 4rem;
  overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 50px; background: #f0f2f5;
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; color: rgba(255,255,255,.45); margin-bottom: .9rem;
}
.page-hero-breadcrumb a { color: rgba(255,255,255,.6); text-decoration: none; transition: color .2s; }
.page-hero-breadcrumb a:hover { color: #c8a415; }
.page-hero-breadcrumb span { color: rgba(255,255,255,.25); }
.page-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800; color: #fff;
  line-height: 1.15; margin-bottom: .4rem;
  text-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.page-hero-sub { font-size: .92rem; color: rgba(255,255,255,.58); max-width: 480px; }

/* ================================================================
   SECTION
   ================================================================ */
.ep-section { background: #f0f2f5; padding: 2.5rem 0 5rem; }

/* Two-column layout - Facebook style */
.ep-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ================================================================
   LEFT SIDEBAR - Facebook Style
   ================================================================ */
.ep-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Facebook-style card */
.fb-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border: 1px solid #dddfe2;
  overflow: hidden;
}

/* Page Header Section */
.fb-page-header {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid #e4e6eb;
}
.fb-page-logo-wrap {
  width: 80px; height: 80px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  background: #fff;
}
.fb-page-logo-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.fb-page-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #050505;
  margin-bottom: 4px;
}
.fb-page-handle {
  font-size: 0.85rem;
  color: #65676b;
}

/* Intro Section */
.fb-intro {
  padding: 16px;
  border-bottom: 1px solid #e4e6eb;
}
.fb-intro-text {
  font-size: 0.9rem;
  color: #050505;
  line-height: 1.5;
  text-align: center;
}

/* Info List */
.fb-info-list {
  padding: 12px 16px;
}
.fb-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.85rem;
  color: #050505;
}
.fb-info-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: #8c939d;
  margin-top: 2px;
}
.fb-info-text {
  flex: 1;
  line-height: 1.4;
}
.fb-info-text a {
  color: #216fdb;
  text-decoration: none;
}
.fb-info-text a:hover {
  text-decoration: underline;
}

/* Photos Section */
.fb-photos-section {
  padding: 16px;
}
.fb-photos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.fb-photos-title {
  font-size: 1rem;
  font-weight: 700;
  color: #050505;
}
.fb-photos-see-all {
  font-size: 0.85rem;
  color: #216fdb;
  text-decoration: none;
  cursor: pointer;
}
.fb-photos-see-all:hover {
  text-decoration: underline;
}

/* Facebook-style 3x3 photo grid */
.fb-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-radius: 8px;
  overflow: hidden;
}
.fb-photo-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #f0f2f5;
}
.fb-photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.fb-photo-item:hover img {
  transform: scale(1.05);
}
.fb-photo-more {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}

/* ================================================================
   RIGHT FEED - Facebook Style
   ================================================================ */
.ep-feed { display: flex; flex-direction: column; gap: 1rem; }

/* Feed header */
.fb-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border: 1px solid #dddfe2;
}
.fb-feed-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #050505;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fb-feed-count {
  font-size: 0.85rem;
  color: #65676b;
}

/* Sort dropdown */
.fb-sort-wrap {
  padding: 12px 16px;
  border-top: 1px solid #e4e6eb;
}
.fb-sort-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #65676b;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}
.fb-sort-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 6px;
  background: #f5f6f7;
  font-size: 0.9rem;
  color: #050505;
  cursor: pointer;
  outline: none;
}
.fb-sort-select:hover {
  background: #ebedf0;
}

/* Facebook Post Card */
.fb-post {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border: 1px solid #dddfe2;
  overflow: hidden;
}

/* Post Header */
.fb-post-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  flex-wrap: wrap;
}
.fb-post-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #e4e6eb;
  background: #f0f2f5;
}
.fb-post-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.fb-post-meta {
  flex: 1;
  min-width: 0; /* allow text to truncate/wrap inside flex child */
}
.fb-post-time {
  font-size: 0.8rem;
  color: #65676b;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  line-height: 1.4;
  margin-top: 1px;
}
.fb-post-time svg {
  width: 12px; height: 12px;
  flex-shrink: 0;
}

/* Post Content */
.fb-post-content {
  padding: 0 16px 12px;
}
.fb-post-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #050505;
  margin-bottom: 8px;
  line-height: 1.4;
}
.fb-post-text {
  font-size: 0.95rem;
  color: #050505;
  line-height: 1.5;
}

/* Facebook-style Photo Grid */
.fb-post-photos {
  position: relative;
}
.fb-grid {
  display: grid;
  gap: 2px;
  cursor: pointer;
}

/* 1 photo */
.fb-grid-1 {
  grid-template-columns: 1fr;
}
.fb-grid-1 .fb-grid-cell {
  height: 400px;
}

/* 2 photos */
.fb-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.fb-grid-2 .fb-grid-cell {
  height: 250px;
}

/* 3 photos - one large left, two stacked right */
.fb-grid-3 {
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.fb-grid-3 .fb-grid-cell:first-child {
  grid-row: span 2;
  height: 400px;
}
.fb-grid-3 .fb-grid-cell:not(:first-child) {
  height: 199px;
}

/* 4 photos - 2x2 grid */
.fb-grid-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.fb-grid-4 .fb-grid-cell {
  height: 200px;
}

/* 5+ photos - 2 equal squares on top, 3 equal squares on bottom */
.fb-grid-5 {
  grid-template-columns: repeat(6, 1fr);
}
.fb-grid-5 .fb-grid-cell:nth-child(1) {
  grid-column: span 3;
  aspect-ratio: 1 / 1;
  height: auto;
}
.fb-grid-5 .fb-grid-cell:nth-child(2) {
  grid-column: span 3;
  aspect-ratio: 1 / 1;
  height: auto;
}
.fb-grid-5 .fb-grid-cell:nth-child(3) {
  grid-column: span 2;
  aspect-ratio: 1 / 1;
  height: auto;
}
.fb-grid-5 .fb-grid-cell:nth-child(4) {
  grid-column: span 2;
  aspect-ratio: 1 / 1;
  height: auto;
}
.fb-grid-5 .fb-grid-cell:nth-child(5) {
  grid-column: span 2;
  aspect-ratio: 1 / 1;
  height: auto;
}

.fb-grid-cell {
  position: relative;
  overflow: hidden;
  background: #f0f2f5;
}
.fb-grid-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.2s;
}
.fb-grid-cell:hover img {
  transform: scale(1.02);
}

/* More overlay */
.fb-more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}
.fb-more-overlay span {
  font-size: 1rem;
  font-weight: 600;
}

/* Category badge */
.fb-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #65676b;
  background: #f0f2f5;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

/* Empty state */
.fb-empty {
  text-align: center;
  padding: 3rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dddfe2;
  color: #65676b;
}
.fb-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ================================================================
   PHOTO GALLERY MODAL (Facebook-style)
   ================================================================ */
.fb-gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.95);
  flex-direction: column;
}
.fb-gallery-modal.open {
  display: flex;
}

/* Gallery Header */
.fb-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #dddfe2;
  flex-shrink: 0;
}
.fb-gallery-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #050505;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fb-gallery-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: #e4e6eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #050505;
  transition: background 0.2s;
}
.fb-gallery-close:hover {
  background: #d8dadf;
}

/* Gallery Grid */
.fb-gallery-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.fb-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
}
.fb-gallery-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: #1c1e21;
  position: relative;
}
.fb-gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.fb-gallery-item:hover img {
  transform: scale(1.05);
}
.fb-gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.2s;
}
.fb-gallery-item:hover::after {
  background: rgba(0,0,0,0.1);
}

/* ================================================================
   FACEBOOK-STYLE LIGHTBOX  (main image + horizontal filmstrip)
   ================================================================ */

/* --- Shared shell --- */
.fb-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: #18191a;
  flex-direction: column;
}
.fb-lightbox.open { display: flex; }

/* --- Top bar --- */
.fb-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #242526;
  flex-shrink: 0;
  border-bottom: 1px solid #3a3b3c;
}
.fb-lightbox-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fb-lightbox-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #3a3b3c;
  flex-shrink: 0;
}
.fb-lightbox-avatar img { width:100%; height:100%; object-fit:cover; }
.fb-lightbox-info { display: flex; flex-direction: column; }
.fb-lightbox-page-name {
  font-size: .84rem;
  font-weight: 700;
  color: #e4e6eb;
  line-height: 1.2;
}
.fb-lightbox-counter {
  font-size: .72rem;
  color: #b0b3b8;
  line-height: 1.3;
}
.fb-lightbox-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: #3a3b3c;
  color: #e4e6eb;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.fb-lightbox-close:hover { background: #4e4f50; }

/* --- Main image area --- */
.fb-lightbox-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.fb-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 3px;
  user-select: none;
  transition: opacity .15s;
}
.fb-lightbox-img.fading { opacity: 0; }

/* --- Arrow buttons --- */
.fb-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, opacity .15s;
  z-index: 2;
}
.fb-lightbox-nav:hover  { background: rgba(255,255,255,.28); }
.fb-lightbox-nav.prev   { left: 12px; }
.fb-lightbox-nav.next   { right: 12px; }
.fb-lightbox-nav:disabled { opacity: .25; cursor: not-allowed; pointer-events: none; }

/* --- Caption --- */
.fb-lightbox-caption {
  text-align: center;
  color: #b0b3b8;
  font-size: .82rem;
  padding: 6px 16px 0;
  min-height: 22px;
  flex-shrink: 0;
  background: #18191a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Filmstrip --- */
.fb-lightbox-strip {
  flex-shrink: 0;
  background: #242526;
  border-top: 1px solid #3a3b3c;
  padding: 8px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* hide scrollbar but keep scrolling */
  scrollbar-width: thin;
  scrollbar-color: #4e4f50 #242526;
}
.fb-lightbox-strip::-webkit-scrollbar { height: 4px; }
.fb-lightbox-strip::-webkit-scrollbar-track { background: #242526; }
.fb-lightbox-strip::-webkit-scrollbar-thumb { background: #4e4f50; border-radius: 2px; }

.fb-strip-thumb {
  display: inline-block;
  width: 64px; height: 64px;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  margin-right: 5px;
  border: 2.5px solid transparent;
  transition: border-color .15s, opacity .15s, transform .15s;
  vertical-align: top;
  flex-shrink: 0;
  background: #3a3b3c;
}
.fb-strip-thumb:last-child { margin-right: 0; }
.fb-strip-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.fb-strip-thumb:hover  { opacity: .85; transform: scale(1.04); }
.fb-strip-thumb.active {
  border-color: #1877f2;
  opacity: 1;
  transform: scale(1.06);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .fb-lightbox-nav { width: 36px; height: 36px; font-size: 1.1rem; }
  .fb-lightbox-nav.prev { left: 6px; }
  .fb-lightbox-nav.next { right: 6px; }
  .fb-strip-thumb { width: 52px; height: 52px; }
  .fb-lightbox-page-name { font-size: .78rem; }
}
@media (max-width: 375px) {
  .fb-strip-thumb { width: 46px; height: 46px; }
}
@media (max-width: 320px) {
  .fb-lightbox-nav.prev { left: 3px; }
  .fb-lightbox-nav.next { right: 3px; }
  .fb-strip-thumb { width: 42px; height: 42px; }
}

/* ================================================================
   RESPONSIVE — 900px (tablet collapse)
   ================================================================ */
@media (max-width: 900px) {
  .ep-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 .75rem;
  }
  .ep-sidebar { position: static; }
  .fb-grid-1 .fb-grid-cell { height: 300px; }
  .fb-grid-2 .fb-grid-cell { height: 200px; }
  .fb-grid-3 .fb-grid-cell:first-child { height: 300px; }
  .fb-grid-3 .fb-grid-cell:not(:first-child) { height: 149px; }
  .fb-grid-4 .fb-grid-cell { height: 150px; }
  .fb-grid-5 { grid-template-rows: unset; }
  .fb-grid-5 .fb-grid-cell { aspect-ratio: 1 / 1; height: auto; }
  .fb-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ================================================================
   MOBILE — 480px and below
   ================================================================ */
@media (max-width: 480px) {
  /* Section padding */
  .ep-section { padding: 1.25rem 0 3rem; }

  /* Layout — zero side padding for true edge-to-edge */
  .ep-layout {
    padding: 0;
    gap: 0;
  }

  /* Posts & cards: no rounded corners, no side borders — flush to screen edges */
  .fb-post {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    margin-bottom: 8px;
  }
  .fb-card {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    margin-bottom: 8px;
  }
  .fb-feed-header {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    margin-bottom: 8px;
  }

  /* Kill the global .container padding so cards reach both edges */
  .ep-section .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Hero tighten */
  .page-hero { padding: calc(2.25rem + 60px) 0 2.75rem; }
  .page-hero-title { font-size: 1.55rem; }
  .page-hero-sub   { font-size: .82rem; }

  /* Sidebar — hide contact card, keep photo grid */
  .contact-card { display: none; }
  .fb-card { border-radius: 10px; }

  /* ── Feed header ── */
  .fb-feed-header {
    padding: 10px 12px;
    border-radius: 10px;
  }
  .fb-feed-title { font-size: .95rem; gap: 6px; }
  .fb-feed-count { font-size: .78rem; }

  /* ── Post card ── */
  .fb-post { border-radius: 10px; }

  .fb-post-header {
    flex-wrap: wrap;
    padding: 10px 12px 8px;
    gap: 8px;
  }
  .fb-post-time {
    font-size: .72rem;
    flex-wrap: wrap;
    gap: 2px;
    line-height: 1.4;
  }
  .fb-post-time svg { width: 11px; height: 11px; flex-shrink: 0; }
  .fb-category-badge {
    /* Move badge to its own row under the meta block */
    margin-left: 0;
    margin-top: 2px;
    font-size: .68rem;
    padding: 3px 8px;
  }

  /* ── Post content ── */
  .fb-post-content { padding: 0 12px 10px; }
  .fb-post-title {
    font-size: .95rem;
    margin-bottom: 6px;
    line-height: 1.35;
  }
  .fb-post-text { font-size: .85rem; line-height: 1.55; }

  /* ── Photo grids — tighter heights ── */
  .fb-grid-1 .fb-grid-cell { height: 220px; }
  .fb-grid-2 .fb-grid-cell { height: 140px; }
  .fb-grid-3 { grid-template-columns: 1.4fr 1fr; }
  .fb-grid-3 .fb-grid-cell:first-child  { height: 190px; }
  .fb-grid-3 .fb-grid-cell:not(:first-child) { height: 94px; }
  .fb-grid-4 .fb-grid-cell { height: 110px; }
  .fb-grid-5 { grid-template-rows: unset; }
  .fb-grid-5 .fb-grid-cell { aspect-ratio: 1 / 1; height: auto; }
  .fb-more-overlay { font-size: 1.4rem; }

  /* ── Sidebar photos ── */
  .fb-photos-section { padding: 12px; }
  .fb-photos-title { font-size: .9rem; }
  .fb-photos-see-all { font-size: .78rem; }

  /* ── Gallery modal ── */
  .fb-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .fb-gallery-body { padding: 10px; }
  .fb-gallery-header { padding: 10px 12px; }
  .fb-gallery-title  { font-size: .92rem; }

  /* ── Lightbox ── */
  .fb-lightbox-page-name { font-size: .76rem; }
  .fb-lightbox-counter   { font-size: .68rem; }
}

/* ================================================================
   EXTRA SMALL — 375px (iPhone SE / standard)
   ================================================================ */
@media (max-width: 375px) {
  .ep-layout { padding: 0; }

  .fb-post-time   { font-size: .70rem; }
  .fb-post-title  { font-size: .9rem; }
  .fb-post-text   { font-size: .82rem; }
  .fb-category-badge { font-size: .65rem; padding: 2px 7px; }

  .fb-grid-1 .fb-grid-cell  { height: 200px; }
  .fb-grid-2 .fb-grid-cell  { height: 120px; }
  .fb-grid-3 .fb-grid-cell:first-child       { height: 170px; }
  .fb-grid-3 .fb-grid-cell:not(:first-child) { height: 84px; }
  .fb-grid-4 .fb-grid-cell  { height: 100px; }
  .fb-grid-5 { grid-template-rows: unset; }
  .fb-grid-5 .fb-grid-cell { aspect-ratio: 1 / 1; height: auto; }

  .fb-feed-title { font-size: .88rem; }
  .fb-photos-title { font-size: .84rem; }
}

/* ================================================================
   EXTRA SMALL — 320px (Galaxy Fold, old iPhones)
   ================================================================ */
@media (max-width: 320px) {
  .ep-layout { padding: 0; }

  .fb-post-header { padding: 8px 10px 6px; gap: 6px; }
  .fb-post-time   { font-size: .67rem; }
  .fb-post-title  { font-size: .85rem; }
  .fb-post-text   { font-size: .8rem; }
  .fb-post-content { padding: 0 10px 8px; }
  .fb-category-badge { font-size: .62rem; padding: 2px 6px; }

  .fb-grid-1 .fb-grid-cell  { height: 175px; }
  .fb-grid-2 .fb-grid-cell  { height: 105px; }
  .fb-grid-3 .fb-grid-cell:first-child       { height: 150px; }
  .fb-grid-3 .fb-grid-cell:not(:first-child) { height: 74px; }
  .fb-grid-4 .fb-grid-cell  { height: 88px; }
  .fb-grid-5 { grid-template-rows: unset; }
  .fb-grid-5 .fb-grid-cell { aspect-ratio: 1 / 1; height: auto; }

  .fb-feed-header { padding: 8px 10px; }
  .fb-feed-title  { font-size: .82rem; }
  .fb-feed-count  { font-size: .72rem; }

  .fb-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 3px; }
  .fb-lightbox-nav.prev { left: 4px; }
  .fb-lightbox-nav.next { right: 4px; }
}
/* ================================================================
   FACEBOOK-STYLE SOCIAL LINK BUTTONS
   ================================================================ */
.fb-social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}
.fb-social-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .18s, transform .15s, box-shadow .18s;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}
.fb-social-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
/* El Royale main page — Facebook blue */
.fb-social-btn.fb-main {
  background: linear-gradient(135deg, #1877f2 0%, #0d5fd6 100%);
  color: #fff;
  border-color: #1877f2;
}
.fb-social-btn.fb-main:hover { background: linear-gradient(135deg, #1565d8 0%, #0b4fbb 100%); }
/* SSC page — white card */
.fb-social-btn.fb-ssc {
  background: #fff;
  color: #050505;
  border-color: #dddfe2;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.fb-social-btn.fb-ssc:hover { background: #f5f6f7; border-color: #c8cacd; }

/* Icon circle */
.fb-social-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.fb-social-btn.fb-ssc .fb-social-icon {
  background: #e7f0fd;
}
.fb-ssc-icon img {
  width: 28px; height: 28px;
  object-fit: contain;
  border-radius: 50%;
}

/* Text stack */
.fb-social-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.fb-social-label {
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-social-sub {
  font-size: .72rem;
  opacity: .75;
  line-height: 1.3;
  margin-top: 1px;
}
.fb-social-btn.fb-ssc .fb-social-sub { color: #65676b; }

/* Arrow icon */
.fb-social-arrow {
  flex-shrink: 0;
  opacity: .7;
}
.fb-social-btn.fb-main .fb-social-arrow { color: #fff; }
.fb-social-btn.fb-ssc .fb-social-arrow { color: #65676b; }

/* ================================================================
   SEE MORE / SEE LESS  (Facebook style)
   ================================================================ */
.fb-see-more-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: inherit;
  font-family: inherit;
  font-weight: 700;
  color: #050505;
  cursor: pointer;
  line-height: inherit;
  display: inline;
  text-decoration: none;
}
.fb-see-more-btn:hover { text-decoration: underline; }
.fb-desc-ellipsis { color: #65676b; }

/* ================================================================
   POST AUTHOR — always 1 line on mobile
   ================================================================ */
.fb-post-author {
  font-size: .95rem;
  font-weight: 700;
  color: #050505;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 425px) {
  .fb-post-author { font-size: .82rem; }
}
@media (max-width: 375px) {
  .fb-post-author { font-size: .78rem; }
}
@media (max-width: 320px) {
  .fb-post-author { font-size: .74rem; }
  /* Abbreviate on 320px via CSS — actual text stays */
}