/* ==========================================================================
   ROUNDY "CÓMO JUGAR REGLAS" SUBPAGE STYLESHEET
   ========================================================================== */

/* Page Wrapper */
.rules-page-wrapper {
  background-color: #F5F4EF;
  color: #0A0A0A;
  font-family: 'Plus Jakarta Sans', sans-serif;
  padding-top: 0; /* Set to 0 to prevent transparent body background gap under navbar */
  min-height: 100vh;
  box-sizing: border-box;
}

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

/* Header style for sections */
.rules-header {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rules-eyebrow {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #FF5A00; /* Naranja premium */
}

.rules-main-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.2rem, 3.8vw, 3.8rem);
  font-weight: 900;
  text-transform: uppercase;
  color: #0A0A0A;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.rules-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3.4rem);
  font-weight: 900;
  text-transform: uppercase;
  color: #0A0A0A;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.rules-subtitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  font-weight: 600;
  color: #696969;
  margin-top: 4px;
}

/* ==========================================================================
   SECTION 1: RULE CARDS (EXPLICADO SENCILLAMENTE)
   ========================================================================== */
.rules-cards-section {
  padding: 180px 0 80px 0;
  background-color: #F5F4EF;
}

.rules-cards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  width: 100%;
}

/* Grid Layout: 3 columns first row, 2 columns second row (flex wrap logic) */
.rule-card {
  background-color: #FFFFFF;
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 20px;
  padding: 40px 24px;
  width: calc(33.333% - 22px);
  min-width: 290px;
  max-width: 360px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.rule-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(10, 10, 10, 0.15);
  box-shadow: 0 12px 30px rgba(10, 10, 10, 0.03);
}

.rule-card-media {
  width: 100%;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 28px;
  overflow: hidden;
}

.rule-card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.rule-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  font-weight: 800;
  text-transform: uppercase;
  color: #0A0A0A;
  margin: 0;
}

.rule-card-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #696969;
  margin: 0;
}

/* Scroll reveal class (managed by IntersectionObserver) */
.reveal-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-card.active-reveal {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   SECTION 2: RULES ACCORDION
   ========================================================================== */
.rules-accordion-section {
  padding: 80px 0 120px 0;
  background-color: #F9F9F7;
  border-top: 1px solid rgba(10, 10, 10, 0.05);
}

.accordion-container {
  background-color: #FFFFFF;
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 24px;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 48px;
  box-sizing: border-box;
}

.accordion-item {
  border-bottom: 1px dashed rgba(10, 10, 10, 0.12);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.accordion-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0A0A0A;
  transition: color 0.3s ease;
}

.accordion-trigger:hover .accordion-title {
  color: #FF5A00;
}

.accordion-icon {
  font-size: 24px;
  font-weight: 300;
  color: #696969;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
  line-height: 1;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg); /* Rotates plus to feel like X, or we can change text manually */
  color: #FF5A00;
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.45s ease;
}

.accordion-panel.open {
  opacity: 1;
}

.accordion-content {
  padding-bottom: 28px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #696969;
}

.accordion-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion-content li {
  position: relative;
  padding-left: 20px;
}

.accordion-content li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #FF5A00;
  font-size: 20px;
  line-height: 1;
}

/* Obstáculos - "No seas un capullo :)" highlights */
.accordion-content li:last-child {
  font-style: italic;
  font-weight: 600;
  color: #0A0A0A;
}

.accordion-content li:last-child::before {
  color: #F9B233; /* Yellow bullet for humor/emphasis */
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .rule-card {
    width: calc(50% - 16px);
  }
  
  .accordion-container {
    padding: 32px 36px;
  }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  .rules-page-wrapper {
    padding-top: 0;
  }
  
  .rules-cards-section {
    padding-top: 160px;
  }
  
  .rules-header {
    margin-bottom: 40px;
  }
  
  .rules-cards-grid {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  
  .rule-card {
    width: 100%;
    max-width: 100%;
    padding: 32px 20px;
  }
  
  .rule-card-media {
    height: 160px;
  }
  
  .accordion-container {
    padding: 24px 20px;
    border-radius: 16px;
  }
  
  .accordion-title {
    font-size: 17px;
  }
  
  .accordion-trigger {
    padding: 20px 0;
  }
}

/* ==========================================================================
   CUSTOM NAVBAR REVEAL & COLOR OVERRIDES FOR RULES PAGE
   ========================================================================== */
.rules-page-header.header-container {
  pointer-events: none;
}

.rules-page-header .navbar:not(.scrolled) {
  background-color: #F9B233 !important;
  border-bottom: 1px solid rgba(10, 10, 10, 0.08);
}

.rules-page-header .navbar:not(.scrolled) .nav-link {
  color: #0A0A0A !important;
  font-weight: 700;
}

.rules-page-header .navbar:not(.scrolled) .nav-link:hover,
.rules-page-header .navbar:not(.scrolled) .nav-link.active {
  color: #FF5A00 !important;
}

/* Make logo black in the non-scrolled state */
.rules-page-header .navbar:not(.scrolled) .brand-logo,
.rules-page-header .navbar:not(.scrolled) .brand-icon {
  filter: brightness(0) !important;
}

/* Buy button style in non-scrolled state */
.rules-page-header .navbar:not(.scrolled) .nav-cta {
  background-color: #0A0A0A !important;
  color: #FFFFFF !important;
  border: 1px solid #0A0A0A !important;
}

.rules-page-header .navbar:not(.scrolled) .nav-cta:hover {
  background-color: #FF5A00 !important;
  border-color: #FF5A00 !important;
  color: #FFFFFF !important;
}

/* Page wrapper solid override for rules subpage */
.rules-page-wrapper.page-wrapper {
  background: transparent !important;
}

/* ==========================================================================
   SECTION 3: TUTORIALES
   ========================================================================== */
.tutorials-section {
  padding: 80px 0 120px 0;
  background-color: #FFFFFF;
  border-top: 1px solid rgba(10, 10, 10, 0.05);
  border-radius: 0 0 64px 64px;
  position: relative;
  z-index: 2;
}

.tutorials-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.tutorial-card {
  background-color: #FFFFFF;
  border: 1px solid rgba(10, 10, 10, 0.06);
  border-radius: 20px;
  width: calc(50% - 16px);
  min-width: 290px;
  max-width: 440px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(10, 10, 10, 0.03);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tutorial-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(10, 10, 10, 0.12);
  box-shadow: 0 12px 40px rgba(10, 10, 10, 0.06);
}

.tutorial-card-media {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.tutorial-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tutorial-card:hover .tutorial-card-img {
  transform: scale(1.04);
}

.tutorial-card-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tutorial-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #0A0A0A;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.tutorial-card-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #696969;
  margin: 0 0 28px 0;
  flex-grow: 1;
}

.tutorial-card-btn {
  background-color: #F9B233;
  color: #0A0A0A;
  border-radius: 12px;
  text-align: center;
  padding: 14px 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tutorial-card-btn:hover {
  background-color: #0A0A0A;
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Responsive updates for tutorials */
@media (max-width: 1024px) {
  .tutorial-card {
    width: calc(50% - 16px);
  }
  
  .tutorials-section {
    border-radius: 0 0 48px 48px;
  }
}

@media (max-width: 767px) {
  .tutorials-section {
    padding: 60px 0 80px 0;
    border-radius: 0 0 32px 32px;
  }
  
  .tutorials-grid {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  
  .tutorial-card {
    width: 100%;
    max-width: 100%;
  }
  
  .tutorial-card-media {
    height: 180px;
  }
  
  .tutorial-card-body {
    padding: 24px 20px;
  }
}

