:root{
  --text: #ffffff;
  --muted: rgba(255,255,255,.78);
  --glass: rgba(10,16,24,.55);
  --glass2: rgba(10,16,24,.35);
  --radius: 22px;
  --bg:#001f3f;
  --card:#0f1620cc;
  --line:#1b2a3a;
  --btn:#1a2431;
  --btn2:#ffffff;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --wrap: 1080px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: #e9edf3;
  color: #ffffff;
}

a{color:inherit;text-decoration:none}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 18px}

.topbar{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px;
  background: #FF6600;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.brand{display:flex;gap:12px;align-items:center}
.brand-text{font-family: 'Audiowide', sans-serif;font-weight:700;letter-spacing:.2px;font-size:18px}

/* Flag Logo */
.flag-logo{
  display:flex;gap:6px;align-items:center;
}

.flag{
  width:32px;height:32px;
  position:relative;
  border-radius:2px;
  flex-shrink:0;
  box-shadow:0 1px 3px rgba(0,0,0,0.2);
}

/* T Flag - Red, White, Blue vertical stripes */
.flag-t{
  display:flex;
  overflow:hidden;
  border-radius:2px;
}
.flag-stripe{
  flex:1;
  height:100%;
}
.flag-red{background:#DC143C}
.flag-white{background:#FFFFFF}
.flag-blue{background:#003366}

/* O Flag - Yellow with black circle */
.flag-o{
  background:#FFD700;
  display:flex;
  align-items:center;
  justify-content:center;
}
.flag-circle{
  width:12px;height:12px;
  background:#000000;
  border-radius:50%;
}

/* X Flag - Dark blue with white diagonal cross */
.flag-x{
  background:#003366;
  position:relative;
}
.flag-x:before,
.flag-x:after{
  content:"";
  position:absolute;
  width:2px;
  height:20px;
  background:#FFFFFF;
  top:50%;
  left:50%;
}
.flag-x:before{
  transform:translate(-50%,-50%) rotate(45deg);
}
.flag-x:after{
  transform:translate(-50%,-50%) rotate(-45deg);
}

.menu-btn{
  width:44px;height:44px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  border-radius: 12px;
  display:grid;place-items:center;
  cursor:pointer;
}
.menu-icon{
  width:18px;height:2px;background:var(--text);
  position:relative;display:block;
}
.menu-icon:before,.menu-icon:after{
  content:"";position:absolute;left:0;right:0;height:2px;background:var(--text);
}
.menu-icon:before{top:-6px}
.menu-icon:after{top:6px}

.menu{
  position:absolute;top:100%;right:14px;
  width:min(320px, calc(100vw - 28px));
  background: rgba(13,18,26,.95);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding:10px;
  display:none;
}
.menu a{
  display:block;
  padding:12px 12px;
  border-radius: 12px;
  color: var(--text);
}
.menu a:hover{background: rgba(255,255,255,.06)}
.menu .menu-cta{
  margin-top:6px;
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.10);
}
.menu .sailing-link{
  background: rgba(0,51,102,.20);
  border:1px solid rgba(0,51,102,.30);
  font-weight:600;
}
.menu .sailing-link:hover{
  background: rgba(0,51,102,.30);
}

/* ===== HERO IMAGE ===== */
.hero-wrapper {
  position: relative;
  width: 100%;
  margin-top: 72px; /* Space for fixed header */
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== HERO CONTENT BELOW IMAGE ===== */
.hero-content {
  width: 92%;
  max-width: 800px;
  margin: -120px auto 0;
  position: relative;
  z-index: 5;
  background: #FF8833;
  backdrop-filter: blur(10px);
  border-radius: 22px;
  padding: 22px;
  text-align: center;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.logo-row img {
  height: 26px;
}

.logo-row span {
  font-family: 'Audiowide', sans-serif;
  font-size: 22px;
  color: white;
}

.hero-content h1 {
  font-family: 'Audiowide', sans-serif;
  font-size: clamp(21.6px, 4.5vw, 30.6px);
  margin-bottom: 6px;
  color: white;
}

.hero-content p {
  font-size: 15px;
  opacity: .95;
  color: white;
  margin-bottom: 6px;
}

/* ===== BUTTONS ===== */
.cta {
  display: flex !important;
  gap: 8px !important;
  margin-top: 14px;
  margin-bottom: 60px;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: space-between !important;
  overflow: visible;
  width: 100%;
}

@media (min-width: 769px) {
  .cta {
    flex-wrap: nowrap !important;
    gap: 8px !important;
    display: flex !important;
    justify-content: space-between !important;
  }
  .btn {
    flex: 1 1 0 !important;
    white-space: nowrap !important;
    min-width: 0;
    max-width: none !important;
  }
  .btn.sailing-results {
    flex: 1 1 0 !important;
    max-width: none !important;
  }
}

/* ===== PAGE END - End of button box section ===== */
.page-end {
  width: 100%;
  height: 1px;
  clear: both;
  position: relative;
}

/* ===== LATEST UPDATES PAGE - Separate page section ===== */
.latest-updates-page {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  padding: 40px 16px;
  text-align: center;
  position: relative;
  box-sizing: border-box;
}

.latest-updates-heading {
  font-family: 'Audiowide', sans-serif;
  font-size: clamp(24px, 5vw, 32px);
  color: #001f3f;
  margin: 0 0 60px 0;
  font-weight: 700;
}

/* YouTube Section */
.youtube-section {
  margin-top: 60px;
  padding: 0 16px;
  text-align: center;
}

.youtube-heading {
  font-family: 'Audiowide', sans-serif;
  font-size: clamp(24px, 5vw, 32px);
  color: #001f3f;
  margin: 0 0 10px 0;
  font-weight: 700;
}

.youtube-video-info {
  font-size: 13px;
  color: #001f3f; /* Dark navy blue */
  margin: 0 0 20px 0;
  font-weight: bold;
  font-style: normal;
  text-align: center;
  line-height: 1.6;
}

.youtube-video-info div {
  margin: 2px 0;
}

.youtube-container {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

.youtube-thumbnail,
.youtube-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.youtube-thumbnail {
  cursor: pointer;
  z-index: 2;
}

.youtube-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.youtube-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.youtube-embed {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1;
}

@media (max-width: 768px) {
  .youtube-section {
    padding: 0 12px;
    margin-top: 40px;
  }
}

.btn {
  padding: 10px 14px !important;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px !important;
  font-size: 85% !important;
  white-space: nowrap !important;
  flex: 1 1 0 !important;
  min-width: 0;
  max-width: none !important;
}

.btn.fb {
  background: #1877F2;
}

.fb-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn.yt {
  background: #FF0000;
}

.yt-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn.ct {
  background: #25D366;
  color: #ffffff;
}

.wa-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

a.btn.sailing-results,
.cta a.btn.sailing-results,
.hero-content a.btn.sailing-results,
.hero-content .cta a.btn.sailing-results,
.btn.sailing-results {
  background: #6B2C91 !important;
  background-color: #6B2C91 !important;
  background-image: none !important;
  opacity: 1 !important;
  font-size: 85% !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
  white-space: nowrap !important;
  flex: 1 1 0 !important;
}

.sa-flags {
  display: flex;
  gap: 4px;
  align-items: center;
}

.sa-flag {
  width: 16px;
  height: 16px;
  position: relative;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.sa-s {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2px;
}

.sa-stripe {
  flex: 1;
  width: 100%;
}

.sa-green { background: #007A4D; }
.sa-white { background: #FFFFFF; }
.sa-blue { background: #002395; }
.sa-red { background: #DE3831; }
.sa-yellow { background: #FFB612; }

.sa-a {
  background: #002395;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sa-triangle {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid #FFB612;
  position: relative;
}

.sa-triangle:after {
  content: "";
  position: absolute;
  top: 2px;
  left: -3px;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 5px solid #DE3831;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

/* ===== FB FEED ===== */
.feed {
  background: transparent;
  padding: 40px 16px 60px;
}

.feed-inner {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 16px;
  display: flex;
  justify-content: center;
  text-align: center;
}

@media (min-width: 768px) {
  .feed-inner {
    max-width: 500px;
  }
}

.feed h2 {
  font-family: 'Audiowide', sans-serif;
  color: #0b1b33;
  margin-bottom: 14px;
  text-align: center;
}

.feed-inner iframe {
  width: 340px !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 0 auto !important;
  display: block !important;
  border: none !important;
  overflow: hidden !important;
}

/* Mobile-specific constraints */
@media (max-width: 768px) {
  .feed-inner {
    padding: 0 12px;
    max-width: 100%;
  }
  
  .latest-updates-page {
    padding: 40px 8px;
  }
  
  .fb-page {
    width: 100% !important;
    max-width: calc(100vw - 24px) !important;
  }
  
  .fb-page iframe {
    width: 100% !important;
    max-width: 100% !important;
    transform: scale(1) !important;
  }
}

.section-note{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}


.more{margin-top:14px}

.contact-grid{
  display:grid;
  gap:12px;
  grid-template-columns: 1fr;
}
.contact-card{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.contact-card span{color: var(--muted);font-size: 13px}

.footer{
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  background: #001a35;
}
.footer-inner{
  display:flex;
  gap:10px;
  flex-direction:column;
  color: var(--muted);
  font-size: 13px;
}
.footnote{opacity:.9}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  .hero-content {
    margin-top: -80px;
    padding: 18px;
  }
  
  .cta {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  
  .btn {
    width: 100% !important;
  }
  
  .btn.sailing-results {
    background: #6B2C91 !important;
    background-color: #6B2C91 !important;
  }
  
  .logo-row span {
    font-size: 18px;
  }
  
  .hero-content h1 {
    font-size: 21.6px;
  }
  
  .hero-content p {
    font-size: 14px;
  }
}

/* Desktop adjustments */
@media (min-width: 900px) {
  .hero-content {
    margin-top: -140px;
  }

  .btn {
    padding: 12px 20px;
    white-space: nowrap;
  }

  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ===== SAILING RESULTS MODAL ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: #ffffff;
  margin: 10% auto;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
  position: absolute;
  right: 15px;
  top: 15px;
}

.modal-close:hover {
  color: #000;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #001f3f;
  font-family: 'Audiowide', sans-serif;
}

.modal-content p {
  margin-bottom: 20px;
  color: #666;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #333;
  font-weight: 500;
}

.form-group input[type="radio"] {
  cursor: pointer;
}

.form-field {
  margin-bottom: 20px;
}

.form-field input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.form-field input:focus {
  outline: none;
  border-color: #6B2C91;
}

.form-field input[list] {
  /* Better autocomplete dropdown styling */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

.form-field input::-webkit-calendar-picker-indicator {
  opacity: 0;
  cursor: pointer;
}

#nameFields {
  display: flex;
  gap: 10px;
}

#nameFields input {
  flex: 1;
}

.modal-submit-btn {
  width: 100%;
  padding: 12px;
  background: #6B2C91;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-submit-btn:hover {
  background: #5a2474;
}

.modal-back-btn {
  width: 100%;
  padding: 10px;
  background: #ccc;
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-back-btn:hover {
  background: #bbb;
}

#searchResultsList {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.result-item {
  margin-bottom: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  transition: border-color 0.2s;
}

.result-item:hover {
  border-color: #6B2C91;
}

.result-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin: 0;
}

.result-label input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.result-info strong {
  color: #001f3f;
  font-size: 16px;
}

.result-id {
  color: #666;
  font-size: 14px;
}

.result-label input[type="radio"]:checked ~ .result-info strong {
  color: #6B2C91;
}

.result-label input[type="radio"]:checked ~ .result-info {
  color: #6B2C91;
}

.result-item:has(input[type="radio"]:checked) {
  border-color: #6B2C91;
  background-color: #f5f0fa;
}

@media (max-width: 600px) {
  .modal-content {
    margin: 20% auto;
    padding: 20px;
    width: 95%;
  }
  
  #nameFields {
    flex-direction: column;
    gap: 10px;
  }
}
