/* base.css */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #111;
  background: #f3f4f6;
}

/* Typography */
h1, h2, h3 {
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.4rem;
}

p {
  margin: 0.75rem 0;
}

/* Links */
a {
  color: #0645ad;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Rules */
hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid #ddd;
}

/* Forms */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

input,
select,
textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.4rem 0.5rem;
  font-size: 1rem;
}

input[type="password"] {
  margin-bottom: 1rem;
}

textarea {
  min-height: 5rem;
}

button {
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
  cursor: pointer;
}

button.primary {
  background: #222;
  color: white;
  border: none;
}

button.danger {
  background: #b00020;
  color: white;
  border: none;
}

/* Utility */
.meta {
  color: #666;
  font-size: 0.9rem;
}

.error {
  color: darkred;
  font-weight: 600;
}

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}

.admin-actions {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #f6f6f6;
  border-left: 4px solid #b00020;
  font-size: 0.9rem;
}

.admin-actions a {
  margin-right: 0.75rem;
  font-weight: 600;
}

.home-actions {
  margin: 2rem 0;
}

.home-actions .primary {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #222;
  color: white;
  border-radius: 4px;
  font-weight: 600;
}

.home-actions .primary:hover {
  background: #000;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.nav a strong {
  color: #b00020;
}
.nav {
  max-width: 1200px;
  margin: 2rem auto 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: #111;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: #444;
  font-weight: 500;
}

.nav-links a:hover {
  text-decoration: underline;
}

.admin-badge {
  background: #e8eefc;
  color: #1f6feb;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: middle;
}


/* ===============================
   Public Events Page
================================ */

.events-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.events-container h1 {
  margin-bottom: 2rem;
}

/* Grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Event Card */
.event-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.05);
  border: none;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.08);
}

/* Image */
.event-card img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Content */
.event-card-body {
  padding: 1rem 1.25rem 1.25rem 1.25rem;
}

.event-card h2 {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
}

.event-meta {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.event-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.event-admin-actions a {
  text-decoration: none;
  color: #1f6feb;
  font-weight: 500;
}

.event-admin-actions a:hover {
  text-decoration: underline;
}

.event-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.event-header {
  margin-bottom: 2rem;
}

.event-header h1 {
  margin-bottom: 0.5rem;
}

.event-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.event-description {
  max-width: 650px;
  color: #444;
  line-height: 1.5;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.photo-thumb {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.photo-thumb img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-thumb:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.15);
}

/* ===============================
   Copy Link Button
================================ */

.copy-link-btn {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-link-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.copy-link-btn:active {
  transform: translateY(1px);
}

/* Copied state */
.copy-link-btn.copied {
  background: #e6f4ea;
  color: #166534;
  border-color: #bbf7d0;
}

/* ===========================
   Home Page
=========================== */

.home-wrapper {
  display: flex;
  justify-content: center;
  padding: 4rem 1.5rem;
}

/* Make homepage hero full width */
.home-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.home-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.home-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.home-actions {
  margin-bottom: 1.25rem;
}

.home-note {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.75rem;
}

.home-divider {
  margin: 2rem 0;
  height: 1px;
  background: #e5e7eb;
}

.home-admin {
  font-size: 0.9rem;
  color: #6b7280;
}

.home-admin a {
  font-weight: 500;
}

.btn-primary {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: #111;
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
}

/* ---------------------------
   Home Hero Background
---------------------------- */

.home-hero {
  min-height: 100vh;
  background-image: url('/images/home-hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dark cinematic overlay */
.home-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content block */
.home-content {
  position: relative;
  color: white;
  text-align: center;
  max-width: 700px;
  padding: 2rem;
}

.home-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.home-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.home-button {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 40px;
  background: white;
  color: black;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.home-button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.home-login {
  margin-top: 2rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

.gallery-filter {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.gallery-filter a {
  color: #6b7280;
  text-decoration: none;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.gallery-filter a:hover {
  color: #111;
}

.gallery-filter a.active {
  color: #111;
  border-bottom: 2px solid #111;
}

/* ===============================
   Private Gallery Access Gate
================================ */

.access-gate {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.access-card {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 18px 60px rgba(0,0,0,0.08);
}

.access-card h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.access-description {
  color: #555;
  margin-bottom: 2rem;
  line-height: 1.5;
}


/* Access Form Layout */

.access-form {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.access-form input {
  flex: 1;
  height: 48px;
  padding: 0 0.9rem;
  border-radius: 12px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.access-form button {
  height: 48px;
  padding: 0 1.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-badge {
  background: #e9eef6;
  color: #2c5aa0;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: 8px;
  font-weight: 600;
}

.nav-links a {
  margin-left: 24px;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Subtle hover */
.event-admin-actions a:hover,
.event-admin-actions button:hover {
  text-decoration: underline;
}

/* Small red delete */
.danger-link {
  color: #c0392b;
  font-size: 13px;
}

.danger-link:hover {
  color: #a93226;
}

/* Force delete button to be link-style */
.event-admin-actions form {
  display: inline;
  margin: 0;
}

.event-admin-actions button.danger-link {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 0 0 12px;
  color: #c0392b !important;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.event-admin-actions button.danger-link:hover {
  text-decoration: underline;
  color: #a93226 !important;
  }
  
  .events-toolbar {
  margin: 1.5rem 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===============================
   Events Search
================================ */

.events-toolbar {
  margin: 2rem 0 1.25rem;
}

.search-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.search-input {
  flex: 1;
  padding: 0.85rem 1.1rem;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-input:focus {
  outline: none;
  border-color: #d1d5db;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}

.search-form .btn {
  border-radius: 16px;
  padding: 0.75rem 1.25rem;
}

.events-hero {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.events-hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.events-hero p {
  color: #6b7280;
  font-size: 1.1rem;
  max-width: 600px;
  line-height: 1.6;
}