/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #333333;
  background-color: #f8f9fa;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* ==========================================================================
   Top Translate Bar
   ========================================================================== */
.top-bar {
  background-color: #002244;
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.85rem;
}

.top-bar-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.translate-label {
  font-weight: 500;
  color: #cbd5e1;
}

#google_translate_element select {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  font-size: 0.85rem;
  color: #333333;
  max-width: 100%;
}

/* ==========================================================================
   Main Layout & Hero Section
   ========================================================================== */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

.hero-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  text-align: left;
}

.hero-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hero-logo-large {
  width: 180px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-text {
  max-width: 600px;
}

.hero-text h1 {
  color: #003366;
  font-size: 2rem;
  margin: 0 0 8px 0;
  line-height: 1.25;
}

.hero-text p {
  font-size: 1.05rem;
  color: #555555;
  margin: 0;
}

/* ==========================================================================
   Next Event Banner (Homepage)
   ========================================================================== */
.next-event-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #003366 0%, #002244 100%);
  color: #ffffff;
  padding: 18px 24px;
  border-radius: 12px;
  margin-bottom: 28px;
  box-shadow: 0 4px 14px rgba(0, 51, 102, 0.15);
  gap: 16px;
}

.event-badge {
  display: inline-block;
  background-color: #d97706;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 6px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.event-details {
  flex: 1;
  min-width: 240px;
}

.event-details h3 {
  margin: 0 0 4px 0;
  font-size: 1.2rem;
  color: #ffffff;
  line-height: 1.3;
}

.event-meta {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.event-btn {
  display: inline-block;
  background-color: #ffffff;
  color: #003366 !important;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.event-btn:hover {
  background-color: #e2e8f0;
}

/* ==========================================================================
   Action Grid & Action Cards
   ========================================================================== */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 22px 18px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-icon {
  font-size: 1.9rem;
  margin-bottom: 10px;
}

.card h3 {
  color: #003366;
  margin-top: 0;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.card p {
  color: #555555;
  font-size: 0.9rem;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-link {
  color: #003366;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.card-link:hover {
  text-decoration: underline;
}

/* Fundraising & QR Code Card */
.donate-card {
  text-align: center;
  border: 1px solid #cbd5e1;
}

.donate-card h3,
.donate-card p {
  text-align: left;
}

.qr-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0 14px 0;
}

.qr-code-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.qr-caption {
  font-size: 0.72rem;
  font-weight: 700;
  color: #003366;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.donate-btn {
  display: block;
  background-color: #003366;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 16px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.donate-btn:hover {
  background-color: #002244;
}

/* ==========================================================================
   Calendar Section
   ========================================================================== */
.calendar-section {
  background: #ffffff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  margin-bottom: 36px;
}

.calendar-section h2 {
  color: #003366;
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.4rem;
}

/* ==========================================================================
   Form & Uploader Sections (photos.html & add-event.html)
   ========================================================================== */
.upload-section-container {
  max-width: 480px;
  margin: 0 auto 28px auto;
  width: 100%;
}

.upload-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.upload-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.upload-title {
  color: #003366;
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.upload-subtitle {
  color: #555555;
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.4;
}

.step-box {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 16px 12px;
  margin-bottom: 14px;
  text-align: center;
  transition: all 0.2s ease;
}

.step-box.ready {
  border-style: solid;
  border-color: #16a34a;
  background: #f0fdf4;
}

.step-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #003366;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.choose-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #ffffff;
  color: #003366;
  border: 2px solid #003366;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  touch-action: manipulation;
  transition: background-color 0.2s ease;
}

.choose-file-btn:hover {
  background-color: #f1f5f9;
}

.preview-container {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  gap: 10px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.preview-thumb {
  width: 54px;
  height: 54px;
  min-width: 54px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.preview-info {
  flex: 1;
  min-width: 0;
}

.preview-filename {
  font-size: 0.82rem;
  font-weight: 600;
  color: #003366;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 2px 0;
}

.preview-meta {
  font-size: 0.75rem;
  color: #16a34a;
  font-weight: 600;
  margin: 0;
}

.btn-change {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: underline;
}

.mascot-field-group {
  margin-bottom: 16px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.mascot-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #003366;
}

.mascot-desc {
  font-size: 0.78rem;
  color: #64748b;
}

.mascot-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  margin-top: 6px;
  background-color: #ffffff;
}

.mascot-input:focus {
  outline: none;
  border-color: #003366;
  box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.1);
}

.upload-btn {
  width: 100%;
  border: none;
  font-size: 1rem;
  background-color: #cbd5e1;
  color: #64748b;
  padding: 14px 20px;
  border-radius: 8px;
  font-weight: 600;
  box-sizing: border-box;
  cursor: not-allowed;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.upload-btn-active {
  background-color: #d97706 !important;
  color: #ffffff !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25) !important;
}

.upload-btn-active:hover {
  background-color: #b45309 !important;
}

.upload-status-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  line-height: 1.4;
}

/* ==========================================================================
   Contact Us Banner
   ========================================================================== */
.contact-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 2px solid #003366;
  border-radius: 12px;
  padding: 24px 24px;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.contact-info h2 {
  color: #003366;
  margin: 0 0 6px 0;
  font-size: 1.35rem;
}

.contact-info p {
  color: #555555;
  margin: 0 0 12px 0;
  font-size: 0.95rem;
}

.contact-details {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
  color: #333333;
  flex-wrap: wrap;
}

.contact-details a {
  color: #003366;
  font-weight: 600;
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-btn {
  background-color: #003366;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
  display: inline-block;
  text-align: center;
}

.contact-btn:hover {
  background-color: #002244;
}

/* ==========================================================================
   Mobile Responsive Breakpoints (< 700px)
   ========================================================================== */
@media (max-width: 700px) {
  .top-bar-content {
    justify-content: center;
    text-align: center;
  }

  .main-content {
    padding: 16px 12px;
  }

  .hero-section {
    padding: 20px 16px;
    margin-bottom: 16px;
  }

  .hero-brand {
    gap: 14px;
    flex-direction: column;
    text-align: center;
  }

  .hero-logo-large {
    width: 140px;
  }

  .hero-text h1 {
    font-size: 1.5rem;
  }

  .hero-text p {
    font-size: 0.92rem;
  }

  .next-event-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
    gap: 12px;
    margin-bottom: 20px;
  }

  .event-details {
    min-width: 100%;
  }

  .event-details h3 {
    font-size: 1.1rem;
  }

  .event-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .action-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
  }

  .qr-code-img {
    width: 90px;
    height: 90px;
  }

  .calendar-section {
    padding: 16px 12px;
    margin-bottom: 24px;
  }

  .calendar-section h2 {
    font-size: 1.2rem;
  }

  .upload-card {
    padding: 20px 14px;
  }

  .contact-banner {
    padding: 20px 16px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .contact-details {
    flex-direction: column;
    gap: 8px;
  }

  .contact-btn {
    width: 100%;
  }
}