:root {
  --primary: #1b4332;
  --primary-hover: #2d6a4f;
  --accent: #e9c46a;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-color: #f3f4f6;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --radius: 16px;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

.page-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
}

/* HERO SECTION */
.hero {
  position: relative;
  min-height: 400px;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 40px;
  background-image: url('https://offertabs.s3.amazonaws.com/offer/xy9o6d/site/media/6a4c2a304d4811.44437661.jpg');
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(27, 67, 50, 0.4), rgba(27, 67, 50, 0.8));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.badge {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.event-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.event-date svg {
  width: 22px;
  height: 22px;
}

.hero p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.sponsor-badge {
  display: inline-block;
  margin-top: 24px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  text-align: center;
}

.organizer-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.organizer-text strong {
  color: #fff;
  font-weight: 700;
}

.sponsor-text {
  font-size: 0.95rem;
  font-weight: 400;
}

.sponsor-text strong {
  color: var(--accent);
  font-weight: 700;
}

/* TABS */
.tabs-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}
.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}
.tab-btn.active {
  background: var(--primary);
  color: #fff;
}
.tab-btn:hover:not(.active) {
  background: rgba(27, 67, 50, 0.1);
}

/* CONTENT BLOCKS */
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.instructions-card, .form-card, .success-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  margin-bottom: 32px;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 24px;
}

.instructions-card h2 {
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.25rem;
}

.step p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.step p strong {
  color: var(--text-dark);
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.form-subtitle {
  color: var(--text-light);
  margin-bottom: 32px;
}

/* FORM STYLES */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: #f9fafb;
  transition: all 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
  background-color: #fff;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.file-input {
  width: 100%;
  padding: 12px;
  border: 1px dashed #9ca3af;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.file-input:hover {
  border-color: var(--primary);
}

.file-input::file-selector-button {
  background: var(--text-dark);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  margin-right: 16px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  font-weight: 500;
}

.file-input::file-selector-button:hover {
  background: #374151;
}

.btn-submit {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 16px;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}

.btn-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.2);
}

.btn-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.error-message {
  background: #fef2f2;
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  border: 1px solid #fecaca;
}

.network-warning {
  color: #dc2626;
  font-size: 0.875rem;
  text-align: center;
  margin-top: 12px;
  font-weight: 500;
}

/* SUCCESS CARD */
.success-card {
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.success-icon svg {
  width: 32px;
  height: 32px;
}

.success-card p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.share-panel {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 32px;
  text-align: left;
}

.share-panel h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.share-panel p {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text-light);
}

.share-controls {
  display: flex;
  gap: 12px;
}

.share-controls input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.btn-secondary {
  background: var(--text-dark);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #374151;
}

/* GALLERY */
.gallery-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.gallery-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.gallery-img-wrapper {
  position: relative;
  padding-top: 100%;
  background: #f3f4f6;
}
.gallery-img-wrapper img, .gallery-img-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.play-icon svg {
  width: 24px;
  height: 24px;
  margin-left: 4px;
}
.gallery-info {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.gallery-author {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.gallery-caption {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 16px;
  flex-grow: 1;
}
.vote-btn {
  width: 100%;
  padding: 10px;
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  color: var(--text-dark);
}
.vote-btn:hover:not(:disabled) {
  background: #e5e7eb;
}
.vote-btn:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}
.vote-btn.voted {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.vote-btn.voted svg {
  fill: currentColor;
}
.vote-count {
  font-size: 0.85rem;
  opacity: 0.9;
}
.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.loading-state, .empty-state, .error-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-light);
  background: #f9fafb;
  border-radius: 12px;
  font-weight: 500;
}

#wbx-powered-by-slot {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .form-row, .steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .instructions-card, .form-card, .success-card, .gallery-card {
    padding: 24px;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}
