/* Base Reset & Variables */
:root {
  --primary: #0f172a;     /* Navy */
  --primary-light: #1e293b;
  --accent: #30364d;      /* Changed from Coral/Orange to Dark Navy */
  --accent-hover: #212535;/* Darker shade for hover */
  --bg-color: #f8fafc;
  --text-main: #334155;
  --text-muted: #64748b;
  --white: #ffffff;
  --error: #ef4444;
  --success: #22c55e;
  --border: #e2e8f0;
  
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

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

/* Utilities */
.hidden { display: none !important; }
.mt-4 { margin-top: 1rem; }

/* Hero Section */
.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background-image: url('https://offertabs.s3.amazonaws.com/offer/nhqbng/site/media/69e2853fac6f34.24255977.jpg');
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.8));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  color: var(--white);
}

.pill-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.125rem;
  font-weight: 300;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Main Layout */
.main-container {
  max-width: 1000px;
  margin: -40px auto 40px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

/* Status Banner */
.status-banner {
  background: var(--primary);
  color: white;
  padding: 16px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 500;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.tab-btn:hover {
  background: var(--white);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
  display: block;
}

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

/* Forms & Panels */
.card-form, .card-panel {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin: 0 auto;
}

.form-header {
  text-align: center;
  margin-bottom: 30px;
}

.form-header h2 {
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 8px;
}

.form-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--primary);
}

.req {
  color: var(--error);
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

select {
  appearance: none;
  -webkit-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='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(48, 54, 77, 0.15);
}

/* File Upload Custom */
.file-upload-group {
  margin-bottom: 30px;
}

.file-upload-label {
  display: block;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background-color: var(--bg-color);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.file-upload-label:hover {
  border-color: var(--accent);
  background-color: rgba(48, 54, 77, 0.05);
}

.file-upload-label.dragover {
  border-color: var(--accent);
  background-color: rgba(48, 54, 77, 0.1);
  transform: scale(1.02);
}

#file-upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.upload-icon {
  color: var(--primary);
  opacity: 0.6;
}

#file-preview-container {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

#file-preview {
  display: block;
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.remove-btn:hover {
  background: rgba(0,0,0,0.9);
}

/* Checkbox Group */
.checkbox-group {
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
  color: var(--text-main);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
  margin: 0;
  padding: 0;
}

/* Captcha styling */
.captcha-container {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 24px;
}

.captcha-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9f9f9;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  padding: 12px 16px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0px 1px 3px rgba(0,0,0,0.08);
}

.captcha-box input[type="checkbox"] {
  width: 24px;
  height: 24px;
  cursor: pointer;
  accent-color: var(--success);
}

.captcha-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  gap: 8px;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(48, 54, 77, 0.3);
}

.btn-primary:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--primary);
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Post Entry Success */
.success-header {
  text-align: center;
  margin-bottom: 30px;
}

.check-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border-radius: 50%;
  margin-bottom: 16px;
}

.success-header h2 {
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 2rem;
}

.my-entry-preview {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
  background: #f1f5f9;
}

.my-entry-preview img {
  width: 100%;
  display: block;
  max-height: 350px;
  object-fit: contain;
}

.caption-text {
  padding: 16px;
  font-style: italic;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: white;
  margin: 0;
}

.share-panel {
  background: var(--bg-color);
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
}

.share-panel h3 {
  margin-bottom: 8px;
  color: var(--primary);
}

.share-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  margin-top: 16px;
}

.social-share {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-btn {
  padding: 12px;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.social-btn:hover { opacity: 0.9; }
.social-btn.fb { background: #1877F2; }
.social-btn.tw { background: #000000; }

/* Gallery */
.gallery-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.gallery-controls select {
  width: auto;
  min-width: 200px;
  padding: 10px 40px 10px 16px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin: 16px 0 8px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.gallery-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gallery-img-container {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f1f5f9;
}

.gallery-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-card:hover .gallery-img-container img {
  transform: scale(1.05);
}

.gallery-meta {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.gallery-author {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.gallery-caption-snippet {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.load-more-container {
  text-align: center;
  margin-top: 40px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(5px);
}

.lightbox-content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.1);
  color: var(--primary);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(0,0,0,0.2);
}

.lightbox-body {
  display: flex;
  flex-direction: row;
  height: 100%;
  min-height: 400px;
}

.lightbox-image-container {
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 300px;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.lightbox-nav:hover { background: rgba(255,255,255,0.4); }
#lightbox-prev { left: 16px; }
#lightbox-next { right: 16px; }

.lightbox-sidebar {
  width: 350px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow-y: auto;
}

.lightbox-details {
  padding: 32px 24px;
  flex-grow: 1;
}

.author-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.lightbox-actions {
  padding: 24px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.lightbox-share .share-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.share-buttons {
  display: flex;
  gap: 8px;
}

.social-btn-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s;
}

.social-btn-small:hover { opacity: 0.8; }
.social-btn-small.fb { background: #1877F2; }
.social-btn-small.tw { background: #000000; }
.social-btn-small.copy { background: var(--text-muted); }

/* Responsive */
@media (max-width: 800px) {
  .lightbox-body { flex-direction: column; }
  .lightbox-sidebar { width: 100%; height: auto; flex-shrink: 0; }
  .lightbox-image-container img { max-height: 50vh; }
}

@media (max-width: 640px) {
  .hero { min-height: 40vh; padding: 40px 16px; }
  .hero-title { font-size: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .card-form, .card-panel { padding: 24px; }
  .tabs { flex-direction: column; }
  .tab-btn { width: 100%; }
}

/* SDK slot styling check */
#wbx-powered-by-slot {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}
