.competition-wrap {
  width: 90%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.competition-header {
  text-align: center;
  margin-bottom: 2rem;
}

.competition-main-title {
  font-size: 72px;
  margin-bottom: 0;
}

.competition-image-container {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  margin-bottom: 3rem;
}

.competition-format-content {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-start;
}

.subsections-container {
  flex: 1;
}

.competition-tutorial-image {
  flex: 0 0 300px;
}

.competition-header-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0;
}

.competition-content {
  margin-bottom: 2rem;
}

.competition-intro-text {
  font-size: 20px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 1rem;
}

.competition-download-link {
  margin-bottom: 2rem;
}

.competition-download-link a {
  color: var(--bs-main-blue);
  text-decoration: underline;
  font-size: 18px;
}

.competition-download-link a:hover {
  color: var(--bs-accent-blue);
}

.competition-section {
  margin-bottom: 3rem;
}

.competition-section:last-child {
  margin-bottom: 0;
}

.competition-section-title {
  font-size: 36px;
  color: var(--bs-main-blue);
  margin-bottom: 1.5rem;
  text-align: left;
}

.competition-subsection {
  margin-bottom: 1rem;
}

.competition-subsection-btn {
  background: none;
  border: none;
  color: #666;
  text-decoration: underline;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0;
  margin: 0;
  gap: 5px;
}

.competition-subsection-btn:hover {
  color: var(--bs-accent-blue);
  text-decoration: none;
}

.competition-subsection-btn .btn-text {
  flex: 0 0 auto;
}

.competition-expandable-content {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-left: 3px solid var(--bs-main-blue);
  border-radius: 0 8px 8px 0;
}

.competition-content-inner {
  position: relative;
}

.competition-content-inner h4 {
  margin-top: 1.5rem;
  color: #444;
}

.competition-content-inner p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
}

.competition-list {
  margin-top: 1rem;
  padding-left: 1.5rem;
}

.competition-list li {
  margin-bottom: 0.5rem;
  font-size: 16px;
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
}

.competition-scoring-table {
  margin-top: 1.5rem;
}

.competition-scoring-table h4 {
  font-size: 18px;
  color: var(--bs-main-blue);
  margin-bottom: 1rem;
}

.competition-table {
  width: auto;
  border-collapse: collapse;
  background-color: #fff;
  margin-bottom: 1rem;
}

.competition-table th,
.competition-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
  font-size: 16px;
}

.competition-table th {
  background-color: #f8f9fa;
  font-weight: bold;
  color: #333;
}

.competition-table td {
  color: #374151;
}

/* Two column section for General Rules */
.competition-tiles {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.competition-tiles .competition-col {
  position: relative;
}

.competition-tile-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem 2rem;
}

.competition-subsection-title {
  font-size: 24px;
  color: var(--bs-main-blue);
  margin-bottom: 1.5rem;
  text-align: left;
}

.competition-rule-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.competition-rule-item {
  position: relative;
  margin-bottom: 1rem;
}

.competition-rule-btn {
  background: none;
  border: none;
  color: #666;
  text-decoration: underline;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
  padding: 0.25rem 0;
  margin: 0;
  gap: 5px;
}

.competition-rule-btn:hover {
  color: var(--bs-accent-blue);
  text-decoration: none;
}

.competition-rule-btn .btn-text {
  flex: 0 0 auto;
}

.arrow-icon {
  color: var(--bs-main-red);
  font-size: 12px;
  margin-left: 5px;
  transition: transform 0.3s ease;
}

@media (min-width: 992px) {
  .competition-tiles .competition-col:first-child::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--bs-main-blue);
  }
}

@media (max-width: 991.98px) {
  .competition-main-title {
    font-size: 48px;
  }

  .competition-section-title {
    font-size: 28px;
  }

  .competition-subsection-title {
    font-size: 20px;
  }

  .competition-intro-text {
    font-size: 18px;
  }

  .competition-download-link a {
    font-size: 16px;
  }

  .competition-subsection-btn {
    font-size: 16px;
  }

  .competition-rule-btn {
    font-size: 14px;
  }

  .competition-image-container {
    width: 100%;
    padding: 0;
    margin-bottom: 3rem;
  }

  .competition-tile-card {
    padding: 1rem 1.5rem;
  }

  .competition-expandable-content {
    padding: 0.75rem;
  }
}

@media (max-width: 767.98px) {
  .competition-main-title {
    font-size: 36px;
  }

  .competition-section-title {
    font-size: 24px;
  }

  .competition-subsection-title {
    font-size: 18px;
  }

  .competition-intro-text {
    font-size: 16px;
  }

  .competition-download-link a {
    font-size: 14px;
  }

  .competition-subsection-btn {
    font-size: 14px;
  }

  .competition-rule-btn {
    font-size: 13px;
  }

  .competition-wrap {
    width: 90%;
  }

  .competition-image-container {
    width: 100%;
    padding: 0;
    margin-bottom: 3rem;
  }

  .competition-tile-card {
    padding: 1rem;
  }

  .competition-expandable-content {
    padding: 0.5rem;
  }

  /* Mobile: Stack tutorial image above subsections */
  .competition-format-content {
    flex-direction: column;
    gap: 1rem;
  }

  .competition-tutorial-image {
    order: -1;
    flex: none;
    width: 100%;
  }

  .subsections-container {
    order: 1;
  }

  .competition-subsection-btn .btn-text,
  .competition-rule-btn .btn-text {
    white-space: normal !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
    line-height: 1.3 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow-wrap: break-word !important;
  }

  .competition-subsection-btn,
  .competition-rule-btn {
    align-items: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    min-height: auto !important;
  }

  .arrow-icon {
    flex-shrink: 0 !important;
    margin-top: 2px !important;
  }
}

/* ========== Custom Tutorial Section ========== */
.tutorial-custom-box {
  background-color: #FFD700;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tutorial-header {
  text-align: center;
  margin-bottom: 20px;
}

.tutorial-title {
  font-family: 'Arial', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: #000;
  margin: 0;
  text-transform: uppercase;
}

.tutorial-content {
  display: flex;
  flex-direction: column; /* Always stacked: item 1, space, item 2 */
  gap: 24px;
}

.tutorial-item {
  position: relative;
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  transition: none;
}

.tutorial-item:hover {
  transform: none;
  box-shadow: none;
}

.tutorial-image-container {
  position: relative;
  width: 100%;
  height: 100px;
  margin-bottom: 8px;
  border-radius: 6px;
  overflow: hidden;
}

.tutorial-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.tutorial-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Show play button on hover for desktop */
.tutorial-item:hover .tutorial-overlay {
  opacity: 1;
}

/* Show play button always on touch devices (mobile/tablet) - no background */
@media (max-width: 1023px) {
  .tutorial-overlay {
    opacity: 1;
    background: transparent; /* No highlight/shadow on mobile/tablet */
  }
}

.tutorial-play-button {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D92026;
  font-size: 20px;
}

.tutorial-info {
  text-align: left; /* message below thumbnail, left-aligned */
}

.tutorial-item-title {
  display: none; /* Hide "PAKISTAN SPELLING BEE" titles */
}

.tutorial-tagline {
  display: none; /* Hide "More than a competition!" taglines */
}

.tutorial-description {
  font-family: 'Arial', sans-serif;
  font-size: 11px;
  color: #000;
  margin: 0;
  line-height: 1.3;
  text-align: left;
}

.tutorial-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px; /* Match image container height exactly */
  z-index: 10;
  text-decoration: none;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .tutorial-title { font-size: 28px; }
  .tutorial-description { font-size: 12px; }
}

@media (min-width: 992px) {
  .tutorial-custom-box {
    padding: 25px;
  }
  
  .tutorial-content {
    gap: 20px;
  }
  
  .tutorial-image-container { height: 120px; }
  
  .tutorial-link { height: 120px; } /* Match image container height exactly */
  
  .tutorial-title {
    font-size: 32px;
  }
  
  .tutorial-description {
    font-size: 13px;
  }
}
