/* style/cockfighting-rules-tips.css */

/* Base styles for the page content, ensuring proper header offset */
.page-cockfighting-rules-tips {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--secondary-color, #FFFFFF); /* Body background from shared */
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

/* General container for content sections */
.page-cockfighting-rules-tips__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
}

/* Sections styling */
.page-cockfighting-rules-tips__section {
  padding: 60px 0;
  border-bottom: 1px solid #eeeeee;
}

.page-cockfighting-rules-tips__section:last-of-type {
  border-bottom: none;
}

/* Hero Intro Section (for sub-page) */
.page-cockfighting-rules-tips__hero-intro {
  text-align: center;
  padding: 80px 0 40px;
  background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Brand color gradient */
  color: #FFFFFF; /* White text on dark/gradient background */
}

.page-cockfighting-rules-tips__main-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #FFFFFF; /* White text */
  line-height: 1.2;
}

.page-cockfighting-rules-tips__description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 30px;
  color: #f0f0f0; /* Slightly off-white for description */
}

.page-cockfighting-rules-tips__hero-image {
  width: 100%;
  height: auto;
  max-width: 900px;
  margin-top: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  object-fit: cover;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

/* Section titles */
.page-cockfighting-rules-tips__section-title {
  font-size: 2.2em;
  color: #26A9E0; /* Brand primary color */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-cockfighting-rules-tips__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #26A9E0;
  border-radius: 2px;
}

/* Sub-titles */
.page-cockfighting-rules-tips__sub-title {
  font-size: 1.6em;
  color: #000000;
  margin-top: 30px;
  margin-bottom: 15px;
}

/* General paragraph text */
.page-cockfighting-rules-tips p {
  margin-bottom: 15px;
  font-size: 1.1em;
  color: #333333;
}

/* Images within content sections */
.page-cockfighting-rules-tips__image {
  width: 100%;
  height: auto;
  max-width: 800px;
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

/* Lists */
.page-cockfighting-rules-tips__list,
.page-cockfighting-rules-tips__ordered-list {
  margin-bottom: 20px;
  padding-left: 25px;
  color: #333333;
}

.page-cockfighting-rules-tips__list li,
.page-cockfighting-rules-tips__ordered-list li {
  margin-bottom: 10px;
  font-size: 1.05em;
}

.page-cockfighting-rules-tips__sub-list {
  padding-left: 20px;
  margin-top: 5px;
}

.page-cockfighting-rules-tips__sub-list li {
  font-size: 1em;
  margin-bottom: 5px;
}

/* Card grid for types section */
.page-cockfighting-rules-tips__card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-cockfighting-rules-tips__card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333; /* Ensure contrast on white card background */
}

.page-cockfighting-rules-tips__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-cockfighting-rules-tips__card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-cockfighting-rules-tips__card-title {
  font-size: 1.4em;
  color: #26A9E0;
  padding: 15px 20px 10px;
  margin: 0;
}

.page-cockfighting-rules-tips__card-text {
  padding: 0 20px 20px;
  font-size: 1em;
  color: #555555;
}

/* Call to Action Buttons */
.page-cockfighting-rules-tips__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 100%; /* Ensure container takes full width */
  box-sizing: border-box; /* Include padding in width calculation */
}

.page-cockfighting-rules-tips__btn-primary,
.page-cockfighting-rules-tips__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  text-align: center;
  max-width: 100%; /* Ensure button does not overflow */
  box-sizing: border-box; /* Include padding in width calculation */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
}

.page-cockfighting-rules-tips__btn-primary {
  background-color: #26A9E0; /* Primary brand color */
  color: #FFFFFF;
  border: 2px solid #26A9E0;
}

.page-cockfighting-rules-tips__btn-primary:hover {
  background-color: #1e87b7; /* Slightly darker primary */
  border-color: #1e87b7;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-cockfighting-rules-tips__btn-secondary {
  background-color: #FFFFFF;
  color: #26A9E0; /* Primary brand color */
  border: 2px solid #26A9E0;
}

.page-cockfighting-rules-tips__btn-secondary:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-cockfighting-rules-tips__section--faq {
  background-color: #f9f9f9;
}

.page-cockfighting-rules-tips__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
}

.page-cockfighting-rules-tips__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-cockfighting-rules-tips__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

.page-cockfighting-rules-tips__faq-item.active .page-cockfighting-rules-tips__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important and sufficiently large value */
  padding: 20px 15px !important;
  opacity: 1;
  background: #ffffff;
  border-radius: 0 0 5px 5px;
}

.page-cockfighting-rules-tips__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-cockfighting-rules-tips__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-cockfighting-rules-tips__faq-question:active {
  background: #eeeeee;
}

.page-cockfighting-rules-tips__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click */
  color: #333333;
}

.page-cockfighting-rules-tips__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-cockfighting-rules-tips__faq-item.active .page-cockfighting-rules-tips__faq-toggle {
  color: #26A9E0; /* Brand color when active */
  transform: rotate(45deg); /* Rotate for minus sign effect */
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-cockfighting-rules-tips__main-title {
    font-size: 2.2em;
  }

  .page-cockfighting-rules-tips__section-title {
    font-size: 1.8em;
  }

  .page-cockfighting-rules-tips__sub-title {
    font-size: 1.4em;
  }

  .page-cockfighting-rules-tips__card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-cockfighting-rules-tips {
    padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-cockfighting-rules-tips__container {
    padding: 15px;
  }

  .page-cockfighting-rules-tips__hero-intro {
    padding: 60px 0 30px;
  }

  .page-cockfighting-rules-tips__main-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-cockfighting-rules-tips__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-cockfighting-rules-tips__hero-image {
    margin-top: 30px;
    border-radius: 8px;
  }

  .page-cockfighting-rules-tips__section {
    padding: 40px 0;
  }

  .page-cockfighting-rules-tips__section-title {
    font-size: 1.6em;
    margin-bottom: 30px;
  }

  .page-cockfighting-rules-tips__sub-title {
    font-size: 1.2em;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .page-cockfighting-rules-tips p {
    font-size: 1em;
  }

  .page-cockfighting-rules-tips__image {
    margin: 20px auto;
    border-radius: 6px;
    max-width: 100% !important; /* Enforce max-width on mobile */
    width: 100% !important; /* Enforce width on mobile */
    height: auto !important; /* Enforce auto height on mobile */
  }

  /* All image containers must also be responsive */
  .page-cockfighting-rules-tips__section,
  .page-cockfighting-rules-tips__card,
  .page-cockfighting-rules-tips__container,
  .page-cockfighting-rules-tips__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-cockfighting-rules-tips__card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-cockfighting-rules-tips__card-image {
    height: 200px;
  }

  /* Button responsiveness */
  .page-cockfighting-rules-tips__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-cockfighting-rules-tips__btn-primary,
  .page-cockfighting-rules-tips__btn-secondary {
    padding: 12px 20px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* FAQ mobile styles */
  .page-cockfighting-rules-tips__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-cockfighting-rules-tips__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-cockfighting-rules-tips__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-cockfighting-rules-tips__faq-answer {
    padding: 0 15px;
  }
  
  .page-cockfighting-rules-tips__faq-item.active .page-cockfighting-rules-tips__faq-answer {
    padding: 15px !important;
  }
}