* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: #ffd700;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 8px;
}

header h1 {
  margin-bottom: 10px;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

main {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

section {
  margin-bottom: 30px;
}

h2 {
  margin-bottom: 15px;
  color: #1a1a1a;
}

h3 {
  margin: 20px 0 10px 0;
}

h4 {
  margin: 15px 0 8px 0;
  color: #444;
}

ul,
ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

li {
  margin-bottom: 6px;
}

footer {
  text-align: left;
  margin-top: 40px;
  color: #666;
}

/* --- VERTICAL STACKING LAYOUT --- */
/* Container for image and text blocks */
.media-container {
  display: block; /* Changed from flex to block for vertical stacking */
  margin-bottom: 30px; /* Space after each section */
  clear: both; /* Ensures no float interference */
}

/* Image styling - left aligned */
.media-left-fixed {
  display: block; /* Makes image take full line */
  margin-bottom: 15px; /* Space between image and text below */
  /* max-width is handled inline in HTML */
}

.media-center {
  display: block;
  margin: 20px 0;
  max-width: 300px;
  height: auto;
}

.media-container {
  text-align: center;
  margin-bottom: 40px;
}

/* Text within media container */
.media-container p {
  margin-bottom: 15px;
}

/* Remove any legacy float styles */
.media-left {
  float: none !important;
  margin-right: 0 !important;
}

/* --- TEXT WRAPPING LAYOUT (for competitions section) --- */
.text-wrap-container {
  overflow: auto; /* Clears the float */
  margin-bottom: 30px;
}

.float-left-image {
  float: left;
  margin-right: 20px;
  margin-bottom: 15px;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  nav a {
    font-size: 14px;
  }

  header h1 {
    font-size: 24px;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  nav {
    gap: 8px;
  }

  nav a {
    font-size: 12px;
    padding: 5px;
  }

  header {
    padding: 15px;
  }

  header h1 {
    font-size: 20px;
  }
}

/* --- END LAYOUT FIX --- */
