/* -------------------------------------------------------
   Auburn Social — Facebook Feed Styles
   -------------------------------------------------------
   A polished, flexible layout for displaying Facebook posts
   pulled via the Graph API and rendered by the [facebook_feed] shortcode.
---------------------------------------------------------- */

.auburn-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 30px auto;
  padding: 0 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* -------------------------------------------------------
   BASE POST STYLES
---------------------------------------------------------- */

.auburn-feed-post {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  padding: 20px;
  transition: all 0.2s ease-in-out;
  overflow: hidden;
}

.auburn-feed-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.auburn-feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.auburn-feed-header img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.auburn-feed-header .auburn-feed-meta {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.4;
}

.auburn-feed-header .auburn-feed-meta .auburn-feed-page {
  font-weight: 600;
  color: #222;
}

.auburn-feed-header .auburn-feed-meta .auburn-feed-date {
  color: #777;
  font-size: 13px;
}

.auburn-feed-content {
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 12px;
}

.auburn-feed-content a {
  color: #1456F1;
  text-decoration: none;
}

.auburn-feed-content a:hover {
  text-decoration: underline;
}

.auburn-feed-image {
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}

.auburn-feed-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.auburn-feed-image img:hover {
  transform: scale(1.02);
}

.auburn-feed-footer {
  display: flex;
  justify-content: flex-end;
  font-size: 13px;
  color: #555;
}

.auburn-feed-footer a {
  color: #1456F1;
  text-decoration: none;
}

.auburn-feed-footer a:hover {
  text-decoration: underline;
}

/* "Load More" Button */
.auburn-feed-loadmore {
  display: block;
  width: fit-content;
  margin: 20px auto;
  padding: 10px 18px;
  background-color: #1456F1;
  color: #fff;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(20, 86, 241, 0.2);
}

.auburn-feed-loadmore:hover {
  background-color: #0e3ec0;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(20, 86, 241, 0.3);
}

/* Empty / Error states */
.auburn-feed-empty,
.auburn-feed-error {
  text-align: center;
  padding: 40px;
  background: #f7f8fa;
  border-radius: 10px;
  color: #555;
  font-size: 15px;
}

/* -------------------------------------------------------
   LAYOUT VARIATIONS
---------------------------------------------------------- */

/* === Classic Layout === */
.auburn-feed-classic {
  display: block !important;
  flex-direction: column !important;
}
.auburn-feed-classic .auburn-feed-post {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1rem;
  border-radius: 0;
  box-shadow: none;
  padding: 1rem 0;
}
.auburn-feed-classic .auburn-feed-post:hover {
  transform: none;
  box-shadow: none;
}

/* === Grid Layout === */
.auburn-feed-grid {
  display: grid !important;
  grid-template-columns: var(--auburn-feed-cols, repeat(3, 1fr)) !important;
  flex-direction: initial !important;
  gap: 20px;
  max-width: 1200px;
  margin: 30px auto;
  width: 100%;
}

.auburn-feed-grid > * {
  display: block !important;
}

/* Column configurations */
.auburn-feed-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.auburn-feed-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.auburn-feed-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Card styling */
.auburn-feed-grid .auburn-feed-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease-in-out;
}
.auburn-feed-grid .auburn-feed-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.auburn-feed-grid .auburn-feed-card img {
  width: 100%;
  height: auto;
  display: block;
}
.auburn-feed-grid .auburn-feed-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 10px;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.4;
}
.auburn-feed-grid .auburn-feed-overlay p { margin: 0 0 4px; }
.auburn-feed-grid .auburn-feed-overlay time { font-size: 12px; opacity: 0.8; }

/* Responsive collapse */
@media (max-width: 900px) {
  .auburn-feed-grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .auburn-feed-grid-cols-3,
  .auburn-feed-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .auburn-feed-grid-cols-2,
  .auburn-feed-grid-cols-3,
  .auburn-feed-grid-cols-4 { grid-template-columns: 1fr; }
}

/* === Minimal Layout === */
.auburn-feed-minimal {
  display: block !important;
  flex-direction: column !important;
}
.auburn-feed-minimal .auburn-feed-line {
  border-left: 3px solid #1456F1;
  padding-left: 1rem;
  margin-bottom: 1.5rem;
  background: transparent;
  box-shadow: none;
}
.auburn-feed-minimal .auburn-feed-line p {
  font-size: 15px;
  color: #222;
  margin-bottom: 4px;
}
.auburn-feed-minimal .auburn-feed-date {
  color: #777;
  font-size: 0.85em;
}

/* -------------------------------------------------------
   OVERRIDES FOR FLEX-BASED PARENTS (UAGB / ASTRA)
---------------------------------------------------------- */

/* Only apply the flex fix to grid layouts */
.uagb-container-inner-blocks-wrap > .auburn-feed-grid,
.uagb-container > .auburn-feed-grid,
.wp-block-uagb-container .auburn-feed-grid,
.wp-block-group .auburn-feed-grid,
.uagb-layout-grid .auburn-feed-grid,
.ast-container .auburn-feed-grid {
  display: grid !important;
  grid-template-columns: var(--auburn-feed-cols, repeat(3, 1fr)) !important;
  flex: none !important;
  align-items: start !important;
  justify-content: normal !important;
  width: 100% !important;
  max-width: 1200px;
  margin: 30px auto;
}

/* Break inherited flex on wrapper containers */
.uagb-container-inner-blocks-wrap,
.uagb-layout-grid {
  display: block !important;
}

/* -------------------------------------------------------
   Responsive adjustments
---------------------------------------------------------- */
@media screen and (max-width: 600px) {
  .auburn-feed { gap: 16px; }
  .auburn-feed-post { padding: 16px; }
  .auburn-feed-header img { width: 36px; height: 36px; }
  .auburn-feed-header .auburn-feed-meta .auburn-feed-page { font-size: 15px; }
  .auburn-feed-grid { grid-template-columns: 1fr; }
}
