:root {
  --navy: #0a192f;
  --navy-light: #112240;
  --orange: #f77f00;
  --orange-hover: #e85d04;
  --cream: #fffdf7;
  --cream-dark: #f0ead2;
  --remax-red: #dc1c2e;
  --remax-blue: #003da5;
  --text-dark: #2d3748;
  --text-light: #f4f6f8;
  
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Montserrat', sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2.5rem; }
.mb-5 { margin-bottom: 2.5rem; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

/* Header */
.site-header {
  background-color: var(--navy);
  color: var(--cream);
  padding: 24px 0;
  position: relative;
}
.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 50%;
  height: 4px;
  background-color: var(--remax-red);
}
.site-header::after {
  content: '';
  position: absolute;
  top: 0; left: 50%; right: 0;
  height: 4px;
  background-color: var(--remax-blue);
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.header-logo {
  display: block;
  width: 145px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.host-text {
  font-size: 1rem;
  letter-spacing: 0.5px;
  color: #ccc;
  margin-top: 0;
}
.host-text strong {
  color: white;
}
.host-text .divider {
  color: var(--remax-red);
  margin: 0 8px;
}

/* Hero Section */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 80px 20px;
  position: relative;
  text-align: center;
  color: white;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 99px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.hero h2 {
  font-size: 2rem;
  color: var(--orange);
  margin-bottom: 24px;
  font-style: italic;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin: 0 auto 40px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  min-height: 48px; /* Improved tap target */
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 99px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 4px 14px rgba(247, 127, 0, 0.4);
}
.btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 127, 0, 0.5);
}
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-secondary:hover {
  background: var(--navy);
  color: white;
}
.hero .btn-secondary {
  color: white;
  border-color: white;
}
.hero .btn-secondary:hover {
  background: white;
  color: var(--navy);
}
.btn-large {
  padding: 16px 40px;
  font-size: 1.1rem;
}

/* Sections */
.section {
  padding: 80px 0;
}
.upload-section {
  background-color: var(--cream-dark);
  position: relative;
}
.upload-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 50%;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
  z-index: 0;
}
.form-container {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

/* Glass Card */
.glass-card {
  background: white;
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 20px 40px rgba(10, 25, 47, 0.08);
  border: 1px solid rgba(0,0,0,0.05);
}
.section-header h3 {
  font-size: 2.5rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.section-header p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* Form Styles */
.form-section-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 15px;
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
}
.form-group {
  margin-bottom: 24px;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 0.95rem;
}
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 16px; /* Prevents iOS auto-zoom on focus */
  background-color: #fcfcfc;
  transition: all 0.3s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--orange);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(247, 127, 0, 0.1);
}
.file-upload-wrapper input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 2px dashed #ddd;
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
}

.form-helper {
  font-size: 0.85rem;
  color: #666;
  margin-top: 8px;
  line-height: 1.4;
}

.media-preview-container {
  margin-top: 16px;
  padding: 16px;
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  border: 1px dashed #ccc;
  text-align: center;
}

.media-status-msg {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}

.media-preview-container img {
  max-height: 200px;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  object-fit: contain;
}

/* Custom Checkbox */
.checkbox-group {
  margin-top: 10px;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  position: relative;
  user-select: none;
  padding: 10px 0; /* Improved tap target */
  min-height: 48px;
}
.checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.checkmark {
  min-width: 24px;
  height: 24px;
  flex-shrink: 0;
  background-color: #eee;
  border-radius: 6px;
  margin-right: 12px;
  margin-top: 2px;
  position: relative;
  transition: all 0.2s ease;
}
.checkbox-label:hover input ~ .checkmark {
  background-color: #ddd;
}
.checkbox-label input:checked ~ .checkmark {
  background-color: var(--orange);
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-label input:checked ~ .checkmark:after {
  display: block;
}
.label-text {
  font-size: 0.95rem;
  color: #555;
  font-weight: 500;
  line-height: 1.5;
}

/* Post Entry / Alerts */
.success-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}
.moderation-note {
  background: rgba(247, 127, 0, 0.1);
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  color: var(--navy);
}
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  font-weight: 500;
}
.alert-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #f87171;
}
.alert-info {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

/* Gallery Section */
.gallery-section {
  background-color: white;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Better fit for mobile devices */
  gap: 30px;
}
.gallery-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 10px 15px -3px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #f0f0f0;
  cursor: pointer;
}
.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
.card-img-wrapper {
  aspect-ratio: 4/3;
  width: 100%;
  overflow: hidden;
  background: #f8f9fa;
  position: relative;
}
.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.play-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.6);
  color: white;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  pointer-events: none;
}
.gallery-card:hover .card-img {
  transform: scale(1.05);
}
.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-title {
  font-size: 1.35rem;
  color: var(--navy);
  margin: 0 0 6px 0;
}
.card-author {
  font-size: 0.9rem;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-text {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 24px;
  flex-grow: 1;
}
.btn-vote {
  background: var(--cream);
  color: var(--navy);
  border: 2px solid #eaeaea;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
}
.btn-vote:hover:not([disabled]) {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.btn-voted {
  background: #f1f5f9;
  color: #94a3b8;
  border: 2px solid #e2e8f0;
  width: 100%;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(10, 25, 47, 0.9);
  backdrop-filter: blur(5px);
}
.lightbox-content {
  position: relative;
  z-index: 1001;
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}
.lightbox-close-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 44px; height: 44px; /* Improved tap target */
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  transition: background 0.3s;
}
.lightbox-close-btn:hover {
  background: var(--remax-red);
}
.lightbox-media-container {
  background: #000;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: 60vh;
  overflow: hidden;
}
.lightbox-info {
  padding: 24px;
  overflow-y: auto;
}
.lightbox-info h4 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 5px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--cream);
  border-radius: 20px;
  border: 2px dashed #ddd;
  margin: 0 auto;
  max-width: 600px;
}
.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

/* Footer */
.site-footer {
  background-color: var(--navy);
  color: #a0aec0;
  padding: 60px 0 30px;
}
.site-footer h4 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* Improved tap target for links */
  padding: 0 10px;
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-link:hover {
  color: white;
}
#wbx-powered-by-slot {
  margin-top: 40px;
}

/* Toast */
#toast-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(150px);
  padding: 14px 28px;
  border-radius: 99px;
  color: white;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 9999;
}
#toast-message.visible {
  transform: translateX(-50%) translateY(0);
}
#toast-message.toast-error {
  background: var(--remax-red);
}
#toast-message.toast-success {
  background: var(--orange);
}

/* Responsive */
@media (min-width: 768px) {
  .form-group-row {
    display: flex;
    gap: 20px;
  }
  .form-group-row .form-group {
    flex: 1;
    margin-bottom: 20px;
  }
}
@media (max-width: 767px) {
  .hero { 
    padding: 60px 15px; 
    min-height: 60vh;
  }
  .hero h1 { font-size: 2.5rem; }
  .hero h2 { font-size: 1.5rem; }
  .hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  .btn {
    width: 100%; /* Full width buttons for easier tapping on mobile */
  }
  .section {
    padding: 40px 0;
  }
  .glass-card {
    padding: 30px 15px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .lightbox { 
    padding: 10px; /* Maximize image real estate on mobile */
  }
  .lightbox-content { 
    max-height: 95vh; 
  }
  .footer-links .divider { display: none; }
  .footer-links { 
    flex-direction: column; 
    gap: 0; 
  }
}