/* ═══════════════════════════════════════════════════════════════════
   CFA La Rambla — Public Event Landing Page Styles
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --cfa-red: #DD0033;
  --cfa-navy: #004F71;
  --cfa-white: #FFFFFF;
  --cfa-gray: #5B6770;
  --cfa-light: #F5F4F2;
  --cfa-bg: #FAFAFA;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--cfa-bg);
  color: #333;
  line-height: 1.6;
}

/* ── Header ──────────────────────────────────────────────────────── */
.ev-header {
  background: var(--cfa-white);
  border-bottom: 3px solid var(--cfa-red);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ev-header-logo {
  height: 40px;
}
.ev-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--cfa-navy);
  letter-spacing: 0.5px;
}

/* ── Hero Section ────────────────────────────────────────────────── */
.ev-hero {
  background: linear-gradient(135deg, var(--cfa-navy) 0%, #006A96 100%);
  color: white;
  padding: 48px 24px 40px;
  text-align: center;
}
.ev-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}
.ev-hero p {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 24px;
}

/* ── Search Bar ──────────────────────────────────────────────────── */
.ev-search-bar {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}
.ev-search-bar input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  box-shadow: var(--shadow-lg);
  outline: none;
}
.ev-search-bar input::placeholder { color: #999; }
.ev-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cfa-gray);
  font-size: 18px;
}

/* ── Events Grid ─────────────────────────────────────────────────── */
.ev-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}
.ev-section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--cfa-navy);
  margin-bottom: 20px;
}
.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ── Event Card ──────────────────────────────────────────────────── */
.ev-card {
  background: var(--cfa-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.ev-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.ev-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--cfa-light);
}
.ev-card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--cfa-navy), var(--cfa-red));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
}
.ev-card-body {
  padding: 20px;
}
.ev-card-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--cfa-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.ev-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--cfa-navy);
  margin-bottom: 8px;
  line-height: 1.3;
}
.ev-card-meta {
  font-size: 14px;
  color: var(--cfa-gray);
  margin-bottom: 12px;
}
.ev-card-meta span { margin-right: 16px; }
.ev-card-desc {
  font-size: 14px;
  color: #555;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Capacity badge */
.ev-capacity-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.ev-capacity-badge.available {
  background: #E8F5E9;
  color: #2E7D32;
}
.ev-capacity-badge.limited {
  background: #FFF3E0;
  color: #E65100;
}
.ev-capacity-badge.full {
  background: #FFEBEE;
  color: #C62828;
}

/* ── CTA Button ──────────────────────────────────────────────────── */
.ev-btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
}
.ev-btn-primary {
  background: var(--cfa-red);
  color: white;
}
.ev-btn-primary:hover { background: #C40030; }
.ev-btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.ev-btn-outline {
  background: transparent;
  border: 2px solid var(--cfa-red);
  color: var(--cfa-red);
}
.ev-btn-outline:hover {
  background: var(--cfa-red);
  color: white;
}
.ev-btn-navy {
  background: var(--cfa-navy);
  color: white;
}
.ev-btn-full { width: 100%; }

/* ── Modal / Event Detail ────────────────────────────────────────── */
.ev-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  overflow-y: auto;
}
.ev-modal-overlay.active { display: flex; }
.ev-modal {
  background: var(--cfa-white);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: ev-slide-up 0.3s ease;
}
@keyframes ev-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.ev-modal-header {
  position: relative;
}
.ev-modal-header img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.ev-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ev-modal-body {
  padding: 24px;
}
.ev-modal-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--cfa-navy);
  margin-bottom: 8px;
}
.ev-modal-date {
  font-size: 15px;
  font-weight: 600;
  color: var(--cfa-red);
  margin-bottom: 4px;
}
.ev-modal-info {
  font-size: 14px;
  color: var(--cfa-gray);
  margin-bottom: 16px;
}
.ev-modal-desc {
  font-size: 15px;
  color: #444;
  margin-bottom: 24px;
  line-height: 1.7;
}

/* ── Reservation Form ────────────────────────────────────────────── */
.ev-form {
  border-top: 1px solid #eee;
  padding-top: 20px;
}
.ev-form h3 {
  font-size: 18px;
  color: var(--cfa-navy);
  margin-bottom: 16px;
}
.ev-form-group {
  margin-bottom: 14px;
}
.ev-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--cfa-gray);
  margin-bottom: 4px;
}
.ev-form-group input,
.ev-form-group select,
.ev-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.ev-form-group input:focus,
.ev-form-group select:focus {
  border-color: var(--cfa-navy);
}
.ev-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ev-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}
.ev-checkbox input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
}
.ev-checkbox label {
  font-size: 13px;
  color: #555;
  font-weight: normal;
}
.ev-optin-highlight {
  background: #E8F5E9;
  border: 1.5px solid #66BB6A;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
}
.ev-optin-highlight label {
  color: #2E7D32;
  font-weight: 600;
  font-size: 13.5px;
}

/* ── Confirmation Screen ─────────────────────────────────────────── */
.ev-confirmation {
  text-align: center;
  padding: 20px 0;
}
.ev-confirmation-icon {
  font-size: 64px;
  margin-bottom: 12px;
}
.ev-confirmation h3 {
  color: var(--cfa-navy);
  font-size: 22px;
  margin-bottom: 8px;
}
.ev-confirmation-code {
  font-size: 32px;
  font-weight: 800;
  color: var(--cfa-red);
  letter-spacing: 4px;
  margin: 16px 0;
  font-family: 'Courier New', monospace;
}
.ev-confirmation-details {
  font-size: 14px;
  color: var(--cfa-gray);
  margin-bottom: 20px;
}

/* ── Empty State ─────────────────────────────────────────────────── */
.ev-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--cfa-gray);
}
.ev-empty-icon { font-size: 48px; margin-bottom: 12px; }
.ev-empty h3 { color: var(--cfa-navy); margin-bottom: 8px; }

/* ── Loading ─────────────────────────────────────────────────────── */
.ev-loading {
  text-align: center;
  padding: 60px;
  color: var(--cfa-gray);
}
.ev-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid #eee;
  border-top-color: var(--cfa-red);
  border-radius: 50%;
  animation: ev-spin 0.8s linear infinite;
}
@keyframes ev-spin { to { transform: rotate(360deg); } }

/* ── Footer ──────────────────────────────────────────────────────── */
.ev-footer {
  background: var(--cfa-navy);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 24px;
  font-size: 13px;
  margin-top: 48px;
}
.ev-footer a { color: white; }

/* ── Kiosk Mode ──────────────────────────────────────────────────── */
.ev-kiosk-banner {
  display: none;
  background: var(--cfa-red);
  color: white;
  text-align: center;
  padding: 8px;
  font-weight: 600;
  font-size: 14px;
}
body.kiosk-mode .ev-kiosk-banner { display: block; }
body.kiosk-mode .ev-header { display: none; }
body.kiosk-mode .ev-hero { padding: 24px; }
body.kiosk-mode .ev-hero h1 { font-size: 24px; }
body.kiosk-mode .ev-footer { display: none; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ev-hero h1 { font-size: 24px; }
  .ev-grid { grid-template-columns: 1fr; }
  .ev-form-row { grid-template-columns: 1fr; }
  .ev-modal { margin: 10px; }
  .ev-modal-header img { height: 180px; }
  .ev-container { padding: 20px 16px; }
}

/* ── Slot picker ─────────────────────────────────────────────────── */
.ev-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.ev-slot {
  padding: 10px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.ev-slot:hover { border-color: var(--cfa-navy); }
.ev-slot.selected {
  border-color: var(--cfa-red);
  background: #FFF0F3;
  color: var(--cfa-red);
  font-weight: 600;
}
.ev-slot.full {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ── Alert toast ─────────────────────────────────────────────────── */
.ev-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cfa-navy);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: ev-slide-up 0.3s ease;
}

/* ── Cancel Reservation Section ──────────────────────────────────── */
.ev-cancel-section {
  max-width: 480px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.ev-cancel-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.ev-cancel-card .ev-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 18px;
  transition: border-color 0.2s;
}
.ev-cancel-card .ev-input:focus {
  border-color: var(--cfa-navy);
  outline: none;
}
