/* ==================================================
   1. ROOT + BASE
================================================== */
:root {
  --gap: 1rem;
  --card-radius: 12px;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #ffffff;
}
html, body {
    margin: 0 !important;
    padding: 0 !important;
}
body {
    padding-left: env(safe-area-inset-left, 0) !important;
    padding-right: env(safe-area-inset-right, 0) !important;
}

.header{
  background: #222;
  color: #fff;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* ==================================================
   2. HEADER + NAVIGATION
================================================== */
.rs-header {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 2000;
  backdrop-filter: blur(4px);
  padding: 0;
}

.rs-header-inner {
  width: 100%;
  margin: 0;
  padding: 5px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
}

.rs-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.rs-logo-img {
  height: 32px;
  width: auto;
}

.rs-logo-text {
  font-size: 32px;
  font-weight: bold;
  color: inherit;
}


/* ==================================================
   3. HAMBURGER MENU
================================================== */
.rs-hamburger {
  width: 36px;
  height: 28px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 1300;
}

.rs-hamburger span {
  display: block;
  height: 3px;
  background: #111;
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(.2,.9,.2,1), opacity 0.18s ease;
}

/* Hamburger → X */
.rs-hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.rs-hamburger.active span:nth-child(2) {
  opacity: 0;
}
.rs-hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}


/* ==================================================
   4. SLIDE-OUT MENU
================================================== */
.rs-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.85);
  border-left: 1px solid rgba(0,0,0,0.06);
  box-shadow: -8px 0 24px rgba(0,0,0,0.06);
  transition: right 0.32s cubic-bezier(.2,.9,.2,1);
  backdrop-filter: blur(6px);
  padding-top: 44px;
  z-index: 1250;
  overflow-y: auto;
}

.rs-menu.open {
  right: 0;
}

.rs-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rs-menu li {
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.rs-menu a {
  display: block;
  padding: 16px 22px;
  text-decoration: none;
  color: #111;
  font-size: 1.05rem;
  text-transform: lowercase;
}

@media (max-width: 420px) {
  .rs-menu {
    width: 100%;
    right: -100%;
  }
}


/* ==================================================
   5. CAROUSEL
================================================== */
.carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  width: 100%;
  transition: transform 1s ease-in-out;
}

.carousel-item {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  color: #fff;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 800px) {
  .carousel-item {
    max-height: 420px;
  }
}


/* ==================================================
   6. CAROUSEL CAPTIONS
================================================== */
.carousel-caption {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
  font-weight: 700;
}

.carousel-caption.title {
  top: 8%;
  font-size: 2rem;
}

.carousel-caption.subtext {
  bottom: 8%;
  font-size: 1.1rem;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 10px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
}

@media (max-width: 600px) {
  .carousel-caption.subtext {
    font-size: 0.9rem;
    padding: 0 1rem;
  }
}


/* ==================================================
   7. WINNER CARD
================================================== */
.winner-card {
  background: #ffe680;
  max-width: 100%;
  margin: 0rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.winner-hero {
  position: relative;
  height: 60vh;
  overflow: hidden;
}

@media (max-width: 600px) {
  .winner-hero {
    height: 320px;
  }
}

.winner-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.winner-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 90px;
  height: auto;
  z-index: 5;
}


.winner-hero-text {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  color: white;
font-size: 1.8rem;

}
@media (max-width: 768px) {
  .winner-hero-text {
   font-size: 1.5rem;
  }
}
.winner-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.75rem 0 0.5rem;
margin-left:20px;
}

@media (max-width: 600px) {
  .winner-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.winner-author {
  font-size: 1.2rem;
  font-weight: 700;
}

.winner-social {
  display: flex;
  gap: 0.5rem;
}

.social-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.winner-body {
  padding: 1.2rem;
  font-size: 1rem;
  line-height: 1.5;
}

.winner-inline-image {
  width: 100%;
  height: auto;
  margin: 0.5rem 0 1.5rem;
}

@media (min-width: 768px) {
  .winner-inline-image {
    width: 250px;
    float: left;
    margin: 0 1.5rem 1rem 0;
  }
}
/* FIX: Prevent badge from being stretched by .winner-hero img rule */
.winner-badge {
  width: 300px !important;
  height: auto !important;
  object-fit: contain !important;
 background: rgba(0, 0, 0, 0.6);
}
.winner-inline-image {
    clear: both;
    display: block;
    margin-top: 2rem 0;
}
.winner-inline-wrapper {
    display: block;
    width: 100%;
    clear: both;
    margin: 2rem 0;
}

/* Mobile first — full width */
.winner-inline-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Desktop override */
@media (min-width: 768px) {
    .winner-inline-image {
        width: 52%;
    }
}
.winner-hero-text h3 {
  margin: 0;
}


/* ==================================================
   8. FEED SECTION + CARDS
================================================== */
.feed-section {
  width: 100%;
  margin: 20px auto;
}

.card-feed {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.feed-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.feed-card:hover {
  background: #fafafa;
}

.feed-card h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Mobile accordion content */
.feed-content {
  display: none;
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.feed-card.open .feed-content {
  display: block;
}

/* Desktop grid */
@media (min-width: 768px) {
  .card-feed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .feed-content {
    display: block;
  }

  .feed-card {
    cursor: default;
  }
}


/* ==================================================
   9. FEED CARD HERO + META
================================================== */
.hero-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
}

.feed-hero {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 8px 12px;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.60) 0%,
    rgba(0,0,0,0.80) 100%
  );
  width: 100%;
}

.hero-title h3 {
  margin: 0;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 10px 0;
}

.author {
  font-size: 1.1rem;
  font-weight: 700;
  color: #666;
}

.social-icons img {
  width: 25px;
  height: 25px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

/* Mobile overrides */
@media (max-width: 768px) {
  .author {
    font-size: 1.3rem;
  }

  .social-icons img {
    width: 30px;
    height: 30px;
  }
}


.social-icons img:hover {
  opacity: 1;
}


/* ==================================================
   10. SUBMIT SECTION
================================================== */


/* ==================================================
   11. DESKTOP + MOBILE BEHAVIOUR (MERGED + FIXED)
================================================== */

/* DESKTOP (≥768px)
   - No accordion
   - Full-card link overlay
   - Only desktop preview visible
*/
@media (min-width: 768px) {

  .desktop-preview {
    display: block !important;
  }

  .mobile-preview,
  .mobile-full {
    display: none !important;
  }

  .feed-card-link {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: block;
    pointer-events: auto;
    text-decoration: none;
    color: inherit;
  }

  .feed-card {
    cursor: default;
  }
}


/* MOBILE (≤767px)
   - Accordion enabled
   - No full-card link
   - Mobile preview + full text
*/
@media (max-width: 767px) {

  .desktop-preview {
    display: none !important;
  }

  .mobile-preview {
    display: block !important;
  }

  .mobile-full {
    display: none;
  }

  .feed-card.open .mobile-preview {
    display: none;
  }

  .feed-card.open .mobile-full {
    display: block;
  }

  .feed-card-link {
    display: none !important;
    pointer-events: none !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    z-index: auto !important;
}

}

.feed-content.mobile-full img {
    display: block;
    width: 100%;
    height: auto;
}
.feed-content.mobile-full {
    overflow: visible;
}

/* ==================================================
   12. CONTAINER
================================================== */
.rs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0px;
}

/* fix for margins */
.carousel {
  margin-bottom: 14px;
}

.winner-card {
  margin: 14px auto;
}

.feed-section {
  margin: 32px auto 24px;
}

/* ==================================================
   13. comments 
================================================== */

.comments-section {
    border-top: 1px solid #ddd;
    padding-top: 12px;
}

.comment {
    margin-bottom: 12px;
}

.comment-user {
    font-weight: bold;
}

.comment-text {
    margin: 4px 0;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    margin-bottom: 8px;
    padding: 8px;
}

/* ==================================================
   14. Padding Fix for mobile  
================================================== */


/* Remove nav padding on mobile */
@media (max-width: 700px) {
  .rs-header-inner {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Remove wrapper padding on mobile */
@media (max-width: 700px) {
  .editors-choice-wrapper {
    padding: 0;
  }
}

/* Fix float collapse */
.ec-body::after {
  content: "";
  display: block;
  clear: both;
}

/* Winner meta alignment fix */
@media (max-width: 700px) {
  .winner-meta {
    margin-left: 0;
  }
}


/* ==================================================
   15.  Footer
================================================== */


.rs-footer {
  background: #000;
  color: #eee;
  padding: 2.5rem 1rem 1.5rem;
  margin-top: 3rem;
}

.rs-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
}

.footer-logo {
  width: 120px;
  height: auto;
  opacity: 0.95;
}

.footer-text p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #ccc;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  color: #aaa;
}

/* Slightly larger logo on desktop */
@media (min-width: 700px) {
  .footer-logo {
    width: 150px;
  }
}
