/* ===========================
   Recensioni Film - Main CSS
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

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

::-moz-selection { background: #da623d; color: white; }
::selection      { background: #da623d; color: white; }

html, body {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  color: #D7D7D7;
  margin: 0;
  font-size: 18px;
  background-color: #1e1e1e;
  line-height: 1.7;
}

/* ---- NAVBAR ---- */
nav {
  background-color: #111;
  border-bottom: 2px solid #da623d;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  margin: 0 auto;
  padding: 0;
  max-width: 860px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 0.25rem;
  list-style: none;
}

nav li {
  list-style: none;
}

nav a {
  color: #D7D7D7;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

nav a:hover {
  background: #da623d;
  color: #fff;
}

.nav-logo {
  display: flex;
  align-items: center;
  margin-right: auto;
  font-weight: 700;
  font-size: 1.1rem;
  color: #da623d !important;
  letter-spacing: 0.5px;
}

.nav-logo:hover {
  background: transparent !important;
  color: #fff !important;
}

.nav-back {
  font-size: 1.2rem;
}

/* ---- MAIN CONTENT ---- */
main {
  padding: 2rem 1.5rem;
}

section.content {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

h1 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 1.4rem;
  color: #da623d;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

h2 .back-top {
  font-size: 0.85rem;
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}
h2 .back-top:hover { color: #da623d; }

h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #D7D7D7;
}

hr {
  border: none;
  border-top: 1px solid #333;
  margin: 0.75rem 0 1.5rem;
}

p {
  color: #bbb;
  line-height: 1.8;
}

p a {
  color: #da623d;
  text-decoration: none;
  transition: color 0.2s;
}
p a:hover { color: #fff; text-decoration: underline; }
p a:visited { color: #c4552f; }

/* ---- CATEGORY GRID (home / genre nav) ---- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-decoration: none;
  color: #D7D7D7;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  gap: 0.5rem;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  cursor: pointer;
}

.category-card:hover {
  background: #da623d;
  border-color: #da623d;
  color: #fff;
  transform: translateY(-2px);
}

.category-card .icon {
  font-size: 2rem;
  line-height: 1;
}

/* ---- HOME NAV CARDS ---- */
.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.home-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  border: 2px solid #333;
  border-radius: 12px;
  padding: 2rem 1rem;
  text-decoration: none;
  color: #D7D7D7;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  gap: 0.75rem;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, color 0.2s;
}

.home-card:hover {
  background: #da623d;
  border-color: #da623d;
  color: #fff;
  transform: translateY(-3px);
}

.home-card .icon {
  font-size: 2.5rem;
  line-height: 1;
}

/* ---- FILM DETAILS (accordion) ---- */
details.film-entry {
  border-bottom: 1px solid #2e2e2e;
  transition: background 0.15s;
}

details.film-entry:last-of-type {
  border-bottom: none;
}

details.film-entry > summary {
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  border-radius: 6px;
  transition: background 0.15s;
}

details.film-entry > summary::-webkit-details-marker { display: none; }
details.film-entry > summary::marker { display: none; }

details.film-entry > summary:hover {
  background: #2a2a2a;
}

details.film-entry[open] > summary {
  color: #da623d;
}

details.film-entry > summary::after {
  content: '▸';
  font-size: 0.85rem;
  color: #666;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

details.film-entry[open] > summary::after {
  transform: rotate(90deg);
  color: #da623d;
}

.film-body {
  padding: 0.5rem 0.75rem 1rem 0.75rem;
  font-size: 0.92rem;
  color: #bbb;
  line-height: 1.8;
  animation: fadeIn 0.2s ease;
}

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

.film-body strong {
  color: #D7D7D7;
  font-weight: 600;
}

.film-body u {
  text-decoration: none;
  color: #aaa;
  font-style: italic;
}

/* ---- STREAMING BADGES ---- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-top: 0.35rem;
  text-transform: uppercase;
}

.badge-netflix  { background: #E50914; color: #fff; }
.badge-prime    { background: #00A8E1; color: #fff; }
.badge-disney   { background: #252850; color: #fff; border: 1px solid #4a4e8a; }
.badge-infinity { background: #8229e3; color: #fff; }

/* ---- ATTORI: actor accordion ---- */
details.actor-entry {
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

details.actor-entry > summary {
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: #D7D7D7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  background: #242424;
  transition: background 0.15s, color 0.15s;
}

details.actor-entry > summary::-webkit-details-marker { display: none; }
details.actor-entry > summary::marker { display: none; }

details.actor-entry > summary:hover {
  background: #2e2e2e;
}

details.actor-entry[open] > summary {
  color: #da623d;
  background: #2a2a2a;
  border-bottom: 1px solid #333;
}

details.actor-entry > summary::after {
  content: '▸';
  font-size: 0.85rem;
  color: #666;
  transition: transform 0.2s;
}

details.actor-entry[open] > summary::after {
  transform: rotate(90deg);
  color: #da623d;
}

.actor-body {
  padding: 0.75rem 1rem;
  background: #1e1e1e;
}

.actor-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  float: left;
  margin: 0 1rem 0.5rem 0;
  border: 2px solid #333;
  background: #2a2a2a;
}

.actor-photo-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #2a2a2a;
  border: 2px solid #333;
  float: left;
  margin: 0 1rem 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  flex-shrink: 0;
}

.actor-films {
  overflow: hidden;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* ---- SEARCH BAR ---- */
.search-wrap {
  margin: 1rem 0 1.5rem;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  color: #D7D7D7;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-wrap input:focus {
  border-color: #da623d;
}

.search-wrap .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

.no-results {
  color: #666;
  font-style: italic;
  padding: 1rem 0;
  display: none;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  .home-cards { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .actor-photo, .actor-photo-placeholder { width: 60px; height: 60px; font-size: 1.5rem; }
}
