/*
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/CascadeStyleSheet.css to edit this template
*/
/* 
    Created on : 18 Oct 2021, 23:04:23
    Author     : Dewald
*/

body {
    font-family: "Lato", sans-serif;
    margin: 0px;
}

.container {
    display: grid;
    grid-template-columns: 1fr;
}

.logo-img-background {
  background-size:contain;
  background-position: center;
  background-repeat: no-repeat;
  height: 120px;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px
}

.left-side {
    display: flex;
}

.nav-wrapper > .left-side > div {
    margin-right: 20px;
    font-size: 0.9em;
    text-transform: uppercase;
}

.nav-link-wrapper {
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.5s;
}

.nav-link-wrapper a {
    color:  #8a8a8a;
    text-decoration: none;
    transition: color 0.5s;
}

.nav-link-wrapper:hover, .nav-link-wrapper:active {
    border-bottom: 1px solid black;
}

.nav-link-wrapper a:hover {
    color:  black;
}

.active-nav-link {
    border-bottom:  1px solid black;
}

.active-nav-link a {
    color: black !important;
}

.social {
    height: 40px;
    width: 40px;
}

.social img {
    height: 40px;
    width: 40px;
}

.subsport-items-wrapper {
  display: grid;
  grid-template-columns: repeat(32, 1fr);
}

.subsport-item-wrapper {
  position: relative;
  grid-column-end: span 9;
  height: 350px; 
}

.subsport-item-wrapper:nth-child(2) {
  grid-column-end: span 14;
   grid-row-end: span 2;
    height: 700px; 
}

.subsport-img-background {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100%;
  width: 100%;
}

/* Temporary background until the Obstacle Laser Run photo is supplied */
.subsport-img-placeholder {
  background-color: #b32438;
}

.img-text-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  text-align: center;
  font-size: 0.9em;
  padding-left: 10px;
  padding-right: 10px;
}

.logo-wrapper {
	display: flex;
        justify-content: space-between;
        align-items: center;
}

.logo-wrapper img {
  width: 30%;
  margin-top: 10px;
}

.image-blur {
  transition: 1s;
  filter: brightness(10%);
}

.img-text-wrapper .subtitle {
  transition: 1s;
  color: transparent;
  font-weight: 600;
  margin-bottom: 10px;
}

.img-text-wrapper:hover .subtitle {
  color: lightseagreen;
  font-weight: 600;
  margin-bottom: 10px;
}

.subtitle h2 {
    margin-top: 0px;
}

.subtitle p {
    margin-top: 7px;
    margin-bottom: 7px;
}

.rules-link {
  border: none;
  color: lightseagreen;
  margin-top: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  text-decoration: none;
}

.img-text-wrapper .logo-wrapper .rules-link {
  transition: 1s;
  color: transparent;
  background-color: transparent;
}

.img-text-wrapper:hover .logo-wrapper .rules-link {
  border: none;
  color: lightseagreen;
  font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
  font-size: 0.9em;
  text-decoration: none;
}


/* ---------- Text pages (Contact, etc.) ---------- */
.page-content {
  max-width: 900px;
  margin: 20px auto 60px auto;
  padding: 0 20px;
  color: #333;
}

.page-content h1 {
  font-weight: 600;
  color: lightseagreen;
  margin-bottom: 10px;
}

.page-content .intro {
  color: #555;
  line-height: 1.5;
}

/* Chair + Vice-Chair side by side, Secretary full width underneath */
.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 30px 0;
}

.contact-card.wide {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .contact-cards {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  box-sizing: border-box;
  border: 1px solid #e3e3e3;
  border-top: 4px solid lightseagreen;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.contact-role {
  text-transform: uppercase;
  font-size: 0.8em;
  letter-spacing: 1px;
  color: #8a8a8a;
}

.contact-name {
  font-size: 1.4em;
  font-weight: 600;
  margin: 6px 0 14px 0;
}

.contact-email {
  color: lightseagreen;
  text-decoration: none;
  white-space: nowrap;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-social a {
  color: #3b5998;
  text-decoration: none;
  font-weight: 600;
}

/* ---------- AGM page ---------- */
.page-content h2 {
  font-weight: 600;
  margin-top: 36px;
  border-bottom: 1px solid #e3e3e3;
  padding-bottom: 6px;
}

.page-content h3 {
  font-weight: 600;
  margin-top: 24px;
}

.page-content a {
  color: lightseagreen;
}

.page-content p, .page-content li, .page-content td {
  line-height: 1.5;
}

.info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0;
}

.info-item {
  flex: 1 1 200px;
  border-left: 4px solid lightseagreen;
  background: #f6fbfb;
  padding: 14px 18px;
  border-radius: 4px;
}

.info-label {
  text-transform: uppercase;
  font-size: 0.8em;
  letter-spacing: 1px;
  color: #8a8a8a;
}

.info-value {
  font-size: 1.15em;
  font-weight: 600;
  margin-top: 4px;
}

.info-note {
  font-size: 0.85em;
  font-weight: normal;
  color: #777;
}

.doc-list {
  list-style: none;
  padding: 0;
}

.doc-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.doc-list a {
  text-decoration: none;
  font-weight: 600;
}

.doc-list a:hover {
  text-decoration: underline;
}

.doc-list .fa {
  width: 20px;
}

.doc-type {
  font-size: 0.75em;
  color: #8a8a8a;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
}

.dates-table {
  border-collapse: collapse;
  width: 100%;
}

.dates-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.dates-table td.date {
  white-space: nowrap;
  font-weight: 600;
  color: lightseagreen;
  width: 1%;
}

.contact-note {
  margin: -6px 0 12px 0;
  color: #555;
}

/* ---------- About page ---------- */
.sport-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.sport-item {
  border-left: 4px solid lightseagreen;
  background: #f6fbfb;
  padding: 12px 16px;
  border-radius: 4px;
}

.sport-item strong {
  display: block;
  font-size: 1.05em;
}

.sport-item span {
  color: #666;
  font-size: 0.9em;
}

/* =====================================================================
   PHONES / SMALL TABLETS ONLY (max 768px wide).
   Everything below applies only to small screens; the desktop layout
   above is unchanged.
   ===================================================================== */
@media (max-width: 768px) {

  /* --- Header & menu --- */
  .logo-img-background {
    height: 90px;
    margin-top: 10px;
  }

  .nav-wrapper {
    flex-direction: column;
    padding: 10px 10px 16px 10px;
  }

  .left-side {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-wrapper > .left-side > div {
    margin: 6px 10px;
    font-size: 0.85em;
  }

  .rigth-side {
    margin-top: 10px;
  }

  .social, .social img {
    height: 32px;
    width: 32px;
  }

  /* --- Home page: one sport per row, photo with logo, text underneath --- */
  .subsport-items-wrapper {
    display: block;
  }

  .subsport-item-wrapper,
  .subsport-item-wrapper:nth-child(2) {
    height: auto;
    margin-bottom: 28px;
  }

  .subsport-img-background {
    height: 230px;
  }

  .image-blur {
    filter: none;          /* no darkening on tap */
  }

  .img-text-wrapper {
    position: static;
    height: auto;
    padding: 12px 16px 0 16px;
    text-align: left;
  }

  .logo-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0 10px;
  }

  .logo-wrapper img {
    width: 40%;
  }

  .img-text-wrapper .logo-wrapper .rules-link,
  .img-text-wrapper:hover .logo-wrapper .rules-link {
    color: lightseagreen;
    background-color: rgba(255, 255, 255, 0.92);
    padding: 4px 8px;
    border-radius: 4px;
  }

  .img-text-wrapper .subtitle,
  .img-text-wrapper:hover .subtitle {
    color: #333;
    font-weight: normal;
  }

  .img-text-wrapper .subtitle h1,
  .img-text-wrapper .subtitle h2 {
    color: lightseagreen;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 6px;
  }

  /* --- Text pages --- */
  .page-content {
    margin-top: 0;
    padding: 0 16px;
  }

  .page-content h1 {
    font-size: 1.6em;
  }

  .dates-table td.date {
    white-space: normal;
    width: 30%;
  }

  .contact-email {
    font-size: 0.9em;
  }
}

/* Very small phones (320-360px): long email addresses may wrap so the page doesn't scroll sideways */
@media (max-width: 360px) {
  .page-content a,
  .contact-email {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .contact-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Media page ---------- */
.video-title {
  margin-bottom: 10px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;     /* 16:9 */
  background: #000;
  border-radius: 6px;
  overflow: hidden;
}

.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.video-wrapper + .video-title {
  margin-top: 28px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-credit {
  font-size: 0.85em;
  color: #777;
}

.facebook-wrapper {
  max-width: 500px;
  margin: 16px 0;
}

.facebook-wrapper iframe {
  width: 100%;
  border: none;
  overflow: hidden;
}

.button-link {
  display: inline-block;
  background: lightseagreen;
  color: white !important;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 4px;
}

.button-link:hover {
  background: #1a9e97;
}

.uipm-tv-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #f6fbfb;
  border-left: 4px solid lightseagreen;
  border-radius: 4px;
  padding: 16px 20px;
  margin: 20px 0 10px 0;
}

.uipm-tv-banner strong {
  display: block;
  font-size: 1.15em;
  margin-bottom: 4px;
}

.uipm-tv-banner span {
  color: #555;
}

.uipm-tv-banner .button-link {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .uipm-tv-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Photo grid & full-size viewer ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin: 16px 0 40px 0;
}

.photo-grid-item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.photo-grid-item:hover img {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 40px;
  line-height: 1;
  border-radius: 4px;
}

.lightbox button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close { top: 16px; right: 20px; padding: 4px 14px; }
.lightbox-prev  { left: 16px;  top: 50%; transform: translateY(-50%); padding: 10px 16px; }
.lightbox-next  { right: 16px; top: 50%; transform: translateY(-50%); padding: 10px 16px; }

.lightbox-count {
  position: absolute;
  bottom: 16px;
  color: #ccc;
  font-size: 0.9em;
}

@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  .lightbox-img { max-width: 100vw; max-height: 80vh; }
  .lightbox-prev, .lightbox-next { font-size: 30px; padding: 6px 10px; }
}

/* ---------- Achievements page ---------- */
.achievement {
  margin: 24px 0 40px 0;
}

.achievement-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.achievement-photos img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

@media (max-width: 640px) {
  .achievement-photos { grid-template-columns: 1fr; }
}

.photo-year {
  margin: 24px 0 0 0;
  color: lightseagreen;
}

#photo-grid .photo-grid {
  margin: 10px 0 8px 0;
}

/* ---------- Constitution page ---------- */
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.doc-download {
  font-weight: 600;
  text-decoration: none;
}

.doc-meta {
  color: #8a8a8a;
  font-size: 0.9em;
}

.pdf-viewer object {
  width: 100%;
  height: 85vh;
  min-height: 600px;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .pdf-viewer {
    display: none;       /* phones: use the Open/Download buttons instead */
  }
}

/* ---------- Registration page ---------- */
.registration-launch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  background: #f6fbfb;
  border-left: 4px solid lightseagreen;
  border-radius: 4px;
  padding: 24px;
  margin: 24px 0;
}

.button-large {
  font-size: 1.15em;
  padding: 14px 24px;
}

.steps li {
  margin-bottom: 6px;
}

/* ---------- Calendar page ---------- */
.cal {
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  padding: 16px;
  margin: 20px 0;
}

.cal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.cal-title {
  margin: 0;
  border: none;
  padding: 0;
  min-width: 200px;
  text-align: center;
}

.cal-nav, .cal-today {
  background: #f0f0f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.cal-nav { font-size: 1.6em; line-height: 1; padding: 2px 12px; }
.cal-today { margin-left: auto; padding: 8px 14px; font-weight: 600; }
.cal-nav:hover, .cal-today:hover { background: #e0e0e0; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-weekdays div {
  text-align: center;
  font-size: 0.8em;
  text-transform: uppercase;
  color: #8a8a8a;
  padding: 4px 0;
}

.cal-day {
  min-height: 84px;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  padding: 4px 6px;
  text-align: left;
  background: #fff;
  font-family: inherit;
  font-size: 1em;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.cal-num { font-weight: 600; font-size: 0.9em; color: #555; }
.cal-day.is-past .cal-num { color: #bbb; }
.cal-day.is-today { border-color: lightseagreen; box-shadow: inset 0 0 0 1px lightseagreen; }
.cal-day.is-today .cal-num { color: lightseagreen; }

.cal-day.has-event { cursor: pointer; background: #f6fbfb; }
.cal-day.has-event:hover { background: #e8f6f5; }

.cal-event {
  display: block;
  font-size: 0.75em;
  line-height: 1.25;
  background: lightseagreen;
  color: white;
  border-radius: 3px;
  padding: 2px 4px;
}

.cal-details {
  border-left: 4px solid lightseagreen;
  background: #f6fbfb;
  border-radius: 4px;
  padding: 4px 16px;
  margin-bottom: 20px;
}

.event-list { list-style: none; padding: 0; }
.event-item { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.event-when { color: lightseagreen; font-weight: 600; font-size: 0.9em; }
.event-title { font-weight: 600; font-size: 1.1em; margin: 2px 0; }
.event-where, .event-desc { color: #555; font-size: 0.95em; }
.event-link { font-size: 0.9em; font-weight: 600; text-decoration: none; }

@media (max-width: 768px) {
  .cal { padding: 8px; }
  .cal-title { min-width: 0; font-size: 1.1em; }
  .cal-day { min-height: 44px; padding: 3px; align-items: center; }
  .cal-event {
    font-size: 0;             /* phones: show a dot instead of the title */
    width: 8px; height: 8px; padding: 0; border-radius: 50%;
  }
}

/* ---------- Instagram icon (menu), footer, hover hint ---------- */
.rigth-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-instagram a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: white;
  text-decoration: none;
  font-size: 26px;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.instagram-link {
  color: #c13584 !important;
  text-decoration: none;
  font-weight: 600;
}

.site-footer {
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid #e3e3e3;
  text-align: center;
  font-size: 0.9em;
  color: #8a8a8a;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-bottom: 8px;
}

.footer-links a {
  color: #555;
  text-decoration: none;
}

.footer-links a:hover {
  color: lightseagreen;
}

.hover-hint {
  text-align: center;
  color: #8a8a8a;
  font-size: 0.9em;
  margin: 0 0 10px 0;
}

/* Only show the hint where a mouse can hover (desktop); phones already show the text */
@media (hover: none), (max-width: 768px) {
  .hover-hint { display: none; }
}

@media (max-width: 768px) {
  .social-instagram a { width: 32px; height: 32px; font-size: 21px; border-radius: 8px; }
}

/* Calendar event colours (by category) */
.cal-event.cat-league,   .cal-legend i.cat-league   { background: lightseagreen; }
.cal-event.cat-champs,   .cal-legend i.cat-champs   { background: #e07b00; }
.cal-event.cat-national, .cal-legend i.cat-national { background: #2e7d32; }
.cal-event.cat-uipm,     .cal-legend i.cat-uipm     { background: #23468c; }
.cal-event.cat-agm,      .cal-legend i.cat-agm      { background: #8e44ad; }

.event-item.cat-champs   .event-when { color: #e07b00; }
.event-item.cat-national .event-when { color: #2e7d32; }
.event-item.cat-uipm     .event-when { color: #23468c; }
.event-item.cat-agm      .event-when { color: #8e44ad; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 12px;
  font-size: 0.85em;
  color: #555;
}

.cal-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  vertical-align: -1px;
  margin-right: 4px;
}

/* ---------- Awards page: embedded Google Form ---------- */
.awards-banner {
  border-left-color: #e07b00;
  background: #fff8ef;
}

.awards-banner span {
  display: block;
  margin-top: 4px;
}

.form-embed {
  max-width: 760px;
  margin: 20px auto 0 auto;
}

.form-embed iframe {
  display: block;
  width: 100%;
  height: 1500px;
  border: 0;
}

/* Sportsmanship form is a single short page */
.form-embed-short iframe { height: 1430px; }
/* AGM attendance form: five short questions */
.form-embed-agm iframe { height: 1200px; }

@media (max-width: 768px) {
  .form-embed iframe { height: 1800px; }
  .form-embed-short iframe { height: 1700px; }
  .form-embed-agm iframe { height: 1400px; }
}

/* Results page */
.result-date {
  color: #777;
  font-size: 0.85em;
  margin-left: 6px;
}

.results-jump a {
  font-weight: 600;
}

.results-venue h4 {
  margin: 14px 0 0 0;
  color: lightseagreen;
  font-size: 1em;
}

.results-venue .doc-list {
  margin-top: 4px;
  padding-left: 14px;
}

.event-result {
  display: inline-block;
  margin: 2px 16px 0 0;
}
