@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Literata:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Literata', Georgia, serif;
  background-color: #f8f9f6;
  color: #1a1a1a;
  margin: 0;
  padding: 0;
}

/* ── Navbar ── */
.header-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-link img {
  height: 40px;
  display: block;
}

.logo-link .logo-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #006c1b;
  white-space: nowrap;
}

.logo-link:hover .logo-name {
  color: #006c1b;
}

.navbar {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-links a {
  font-family: 'Literata', Georgia, serif;
  color: #374151;
  text-decoration: none;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.15s, color 0.15s;
}

.navbar-links a:hover {
  background-color: #f0fdf4;
  color: #006c1b;
}

.navbar-links a.active {
  background-color: #006c1b;
  color: #fff;
}

/* ── Hero (index only) ── */
.hero {
  text-align: center;
  padding: 60px 12px 40px;
  background: linear-gradient(160deg, #006c1b 0%, #004d13 100%);
  color: #fff;
}

.hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
  letter-spacing: -1px;
}

.hero p.tagline {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: #fff;
  color: #006c1b;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.15s;
  display: inline-block;
}

.btn-hero-primary:hover {
  background: #f0fdf4;
  color: #005516;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-hero-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid rgba(255,255,255,0.3);
  transition: background 0.15s, transform 0.15s;
  display: inline-block;
}

.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── Page content wrapper ── */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px;
}

/* ── Intro card (homepage) ── */
.intro-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px 36px;
  text-align: center;
  line-height: 1.7;
  color: #374151;
}

.intro-card p {
  margin: 0 0 12px;
}

.intro-card p:last-child {
  margin-bottom: 0;
}

.intro-card a {
  color: #006c1b;
  font-weight: 500;
  text-decoration: none;
}

.intro-card a:hover {
  text-decoration: underline;
}

/* ── About ── */
.about-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px 36px;
  line-height: 1.8;
  color: #374151;
}

.about-card p {
  margin: 0 0 16px;
}

.about-card p:last-child {
  margin-bottom: 0;
}

/* ── Section headings ── */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #006c1b;
  display: inline-block;
}

/* ── Buttons ── */
.btn-primary {
  background-color: #006c1b;
  border-color: #006c1b;
  color: #fff;
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: #005516;
  border-color: #005516;
  color: #fff;
}

.btn-secondary {
  background-color: #fff;
  border-color: #d1d5db;
  color: #374151;
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.15s;
}

.btn-secondary:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.btn-secondary.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Random films page ── */
.randomfilms-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px;
}

.plucky-quote {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  font-style: italic;
  color: #111827;
  margin: 0 0 24px;
}

.randomfilms-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .randomfilms-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

.plucky-container {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  flex: 1;
}

.plucky-container p {
  color: #374151;
  line-height: 1.6;
  margin-bottom: 16px;
}

.genre-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.random-film-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px;
  flex: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}

.random-film-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.random-film-card h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
}

.random-film-card .card-text {
  color: #374151;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.random-film-card a {
  color: #006c1b;
  font-weight: 500;
}

/* ── Film list ── */
.filmlist-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 32px;
}

.search-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 28px;
}

.table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

th, td {
  border: 1px solid #e5e7eb;
  text-align: left;
  padding: 10px 14px;
}

th {
  background-color: #006c1b;
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

tbody tr:hover {
  background-color: #f0fdf4;
}

/* ── Mobile cards ── */
.card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.card-text {
  font-size: 0.9rem;
  color: #374151;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 28px 0;
}

/* ── Return to homepage ── */
.return-homepage {
  display: flex;
  justify-content: center;
  margin: 8px 0 24px;
}

/* ── Form controls ── */
.form-control {
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  color: #374151;
}

.form-control:focus {
  border-color: #006c1b;
  box-shadow: 0 0 0 3px rgba(0,108,27,0.12);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .header-navbar {
    padding: 10px 12px;
  }

  .logo-name {
    display: none;
  }

  .navbar-links a {
    padding: 6px 8px;
    font-size: 13px;
  }

  .nav-short { display: inline; }
  .nav-full  { display: none; }

  .hero {
    padding: 48px 16px 36px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .intro-card, .about-card {
    padding: 24px 20px;
  }

  .filmlist-wrapper {
    padding: 20px 16px;
  }
}

@media (min-width: 769px) {
  .nav-short { display: none; }
  .nav-full  { display: inline; }
}

/* Bootstrap visibility helpers (preserve existing behaviour) */
@media (max-width: 767px) {
  .d-md-block { display: none !important; }
  .d-md-none  { display: block !important; }
}
@media (min-width: 768px) {
  .d-md-block { display: block !important; }
  .d-md-none  { display: none !important; }
}
