/* =========================================================
   Film Festival Manager — Public CSS v2
   Dark #0c0c0c background, gold #c9a227 accent
   ========================================================= */

:root {
  --ffm-bg:          #fff;
  --ffm-bg-card:     #161616;
  --ffm-bg-tab:      #1a1a1a;
  --ffm-border:      #2a2a2a;
  --ffm-text:        #f2f2f2;
  --ffm-text-muted:  #a0a0a0;
  --ffm-gold:        #fad112;
  --ffm-gold-hover:  #fad112;
  --ffm-radius:      4px;
  --ffm-font:        "Manrope", Sans-serif
}

/* =========================================================
   SINGLE FILM
   ========================================================= */

.ffm-single {
  font-family: var(--ffm-font);
  color: var(--ffm-text);
  background: var(--ffm-bg);
}

/* ----- Hero Section ----- */
.ffm-hero-section {
  position: relative;
  min-height: 480px;
  background-color: var(--ffm-bg);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 60px 0 40px;
}

.ffm-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,.92) 0%,
    rgba(0,0,0,.75) 50%,
    rgba(0,0,0,.35) 100%
  );
}

.ffm-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.ffm-hero-poster {
  flex: 0 0 260px;
  max-width: 260px;
  border-radius: var(--ffm-radius);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.7);
}

.ffm-poster-img,
.ffm-poster-placeholder {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--ffm-radius);
}

.ffm-hero-content {
  flex: 1;
  min-width: 0;
  padding-top: 8px;
}

.ffm-hero-year {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ffm-gold);
  margin-bottom: 10px;
}

.ffm-hero-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 14px;
  color: #fff;
}

.ffm-hero-tagline {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,.8);
  margin: 0 0 20px;
  max-width: 520px;
}

.ffm-hero-actions {
  margin-bottom: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ffm-trailer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ffm-gold) !important;
  border: 1px solid var(--ffm-gold) !important;
  color: #000;
  padding: 14px 32px !important;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  font-family: inherit;
}

.ffm-trailer-btn:hover {
  border-color: var(--ffm-gold) !important;
  color: #000 !important;
}

.ffm-trailer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid currentColor;
}

.ffm-hero-duration {
  font-size: 15px;
  font-weight:600;
  color: #fff;
  margin-bottom: 14px;
}

.ffm-hero-genres {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ffm-hero-genres li {
  color: #000;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--ffm-gold);
  background: var(--ffm-gold);
  padding: 4px 12px;
  border-radius: 999px;
  transition: border-color .2s, color .2s;
}

.ffm-hero-genres li a:hover {
  border-color: var(--ffm-gold);
  color: #000;
}

/* ----- Body Wrap ----- */
.ffm-body-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 60px;
}



.ffm-story-heading {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  margin: 0 0 16px;
}

/* ----- Ticket Button ----- */
.ffm-ticket-btn {
  display: inline-block;
  background: var(--ffm-gold);
  color: #111;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 12px 28px;
  border-radius: var(--ffm-radius);
  text-decoration: none;
  margin-bottom: 32px;
  transition: background .2s;
}

.ffm-ticket-btn:hover {
  background: var(--ffm-gold-hover);
  color: #111;
}

/* ----- Tabs ----- */
.ffm-tabs-wrap {
  margin-bottom: 36px;
}

.ffm-tabs-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--ffm-text);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ffm-gold);
  display: inline-block;
}

.ffm-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--ffm-border);
  margin-bottom: 20px;
}

.ffm-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ffm-text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  margin-bottom: -1px;
  font-family: inherit;
  letter-spacing: .03em;
  transition: color .2s, border-color .2s;
}

.ffm-tab-btn:hover,
.ffm-tab-btn.ffm-tab-active {
  color: var(--ffm-gold);
  border-bottom-color: var(--ffm-gold);
}

.ffm-tab-panel {
  display: none;
  line-height: 1.75;
  color: #ccc;
  font-size: 14px;
}

.ffm-tab-panel.ffm-tab-panel-active {
  display: block;
}

.ffm-tab-panel a {
  color: var(--ffm-gold);
  text-decoration: none;
}

.ffm-tab-panel a:hover {
  text-decoration: underline;
}

.ffm-tab-empty {
  color: var(--ffm-text-muted);
  font-style: italic;
}

/* ----- Taxonomy Grid ----- */
.ffm-tax-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin: 32px 0;
  padding: 24px;
  background:#fff;
  border-radius: var(--ffm-radius);
}

.ffm-tax-col {
  min-width: 120px;
}

.ffm-tax-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #5e5e5e;
  margin: 0 0 10px;
  font-weight: 700;
}

.ffm-tax-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ffm-tax-list li a,
.ffm-tax-list li span {
  font-size: 14px;
  color: var(--ffm-text);
  text-decoration: none;
  transition: color .2s;
}

.ffm-tax-list li a:hover {
  color: var(--ffm-gold);
}


.ffm-card-tax-lines {
	margin-top: 10px;
}

.ffm-card-tax-line {
	font-size: 14px;
	line-height: 1.6;
}

.ffm-card-tax-line strong {
	font-weight: 700;
}

.ffm-tax-lines{
    margin:25px 0;
}

.ffm-tax-line{
    margin-bottom:10px;
    font-size:15px;
    color:#444;
    line-height:1.7;
}

.ffm-tax-line strong{
    color:#111;
    font-weight:700;
    margin-right:8px;
}

/* ----- Section Heading ----- */
.ffm-section-heading {
  font-size: 17px;
  font-weight: 700;
  color: #000;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ffm-gold);
  display: inline-block;
}

/* ----- Cast & Crew ----- */
.ffm-cast-section {
  margin: 36px 0;
}

.ffm-cast-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.ffm-cast-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ffm-bg-card);
  border: 1px solid var(--ffm-border);
  border-radius: var(--ffm-radius);
  padding: 12px 16px;
  text-decoration: none;
  color: var(--ffm-text);
  min-width: 200px;
  transition: border-color .2s;
}

.ffm-cast-card:hover {
  border-color: var(--ffm-gold);
}

.ffm-cast-avatar {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ffm-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ffm-cast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ffm-cast-avatar-placeholder {
  font-size: 20px;
  font-weight: 700;
  color: var(--ffm-text-muted);
  text-transform: uppercase;
}

.ffm-cast-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ffm-cast-designation {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ffm-gold);
}

.ffm-cast-name {
  font-size: 14px;
  font-weight: 600;
}

/* ----- Photo Gallery ----- */
.ffm-gallery-section {
  margin: 36px 0;
}

.ffm-gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ffm-gallery-item {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: var(--ffm-radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s;
}

.ffm-gallery-item:hover {
  border-color: var(--ffm-gold);
}

.ffm-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ----- Related Titles ----- */
.ffm-related-section {
  margin: 40px 0;
}

.ffm-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 900px) { .ffm-related-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .ffm-related-grid { grid-template-columns: repeat(2, 1fr); } }

.ffm-related-card {
  display: flex;
  flex-direction: column;
}

.ffm-related-poster-link {
  display: block;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: var(--ffm-radius);
  border: 1px solid var(--ffm-border);
  margin-bottom: 10px;
}

.ffm-related-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.ffm-related-poster-link:hover .ffm-related-poster {
  transform: scale(1.04);
}

.ffm-related-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
}

.ffm-related-title a {
  color: var(--ffm-text);
  text-decoration: none;
}

.ffm-related-title a:hover { color: var(--ffm-gold); }

.ffm-related-genres {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ffm-related-genres li a {
  font-size: 11px;
  color: var(--ffm-text-muted);
  text-decoration: none;
  border: 1px solid var(--ffm-border);
  padding: 2px 8px;
  border-radius: 999px;
  transition: border-color .2s, color .2s;
}

.ffm-related-genres li a:hover {
  border-color: var(--ffm-gold);
  color: var(--ffm-gold);
}

/* =========================================================
   MODAL (Trailer + Lightbox)
   ========================================================= */

.ffm-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.ffm-modal.ffm-modal-open {
  display: flex;
}

.ffm-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
  cursor: pointer;
}

.ffm-modal-box {
  position: relative;
  z-index: 1;
  width: min(900px, 94vw);
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.8);
}

.ffm-modal-video {
  position: relative;
  padding-top: 56.25%;
}

.ffm-modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ffm-modal-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  background: rgba(0,0,0,.6) !important;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

/* Lightbox box */
.ffm-lightbox-box {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ffm-lightbox-box img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--ffm-radius);
  display: block;
}

/* =========================================================
   LISTING PAGE — [films] & [film_search] shortcodes
   ========================================================= */

.ffm-films-wrapper,
.ffm-search-wrapper,
.ffm-archive-wrapper {
  font-family: var(--ffm-font);
  color: var(--ffm-text);
  background: var(--ffm-bg);
}

/* ---- Search bar header ---- */
.ffm-search-header {
  padding: 16px 0px 10px;
}

.ffm-search-label {
  font-size: 22px;
  font-weight: 600;
  color: #000;
  text-transform: none;
  letter-spacing: 0;
}

/* ---- Filter rows ---- */
.ffm-search-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  padding: 0 0px 16px;
}

.ffm-filter-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
  padding-top: 10px;
}

.ffm-filter-row-1 { }
.ffm-filter-row-2 { }

.ffm-input-keyword {
  flex: 1 1 220px;
  min-width: 180px;
  line-height: 35px;
}

.ffm-input,
.ffm-select {
  background: #f2f2f2;
  border: 1px solid #333;
  color: #000;
  padding: 11px 14px;
  border-radius: var(--ffm-radius);
  font-size: 13px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

.ffm-input {
  background-image: none;
  padding-right: 14px;
}

.ffm-select {
  flex: 1 1 160px;
  min-width: 130px;
  cursor: pointer;
}

.ffm-input:focus,
.ffm-select:focus {
  outline: none;
  border-color: var(--ffm-gold);
}

.ffm-search-button {
  background: var(--ffm-gold) !important;
  color: #000 !important;
  border: none !important;
  padding: 15px 32px 14px 32px !important;
  border-radius: 4px !important;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  flex: 0 0 auto;
  transition: background .2s;
}

.ffm-search-button:hover { background: var(--ffm-gold-hover); }

@media (max-width: 900px) {
  .ffm-filter-row { flex-wrap: wrap; }
  .ffm-select, .ffm-input-keyword { flex: 1 1 calc(50% - 10px); }
}
@media (max-width: 600px) {
  .ffm-filter-row { flex-direction: column; }
  .ffm-select, .ffm-input-keyword, .ffm-search-button { width: 100%; }
}

/* ---- Results area ---- */
.ffm-search-results {
  padding: 32px 0 0;
}

.ffm-search-results.is-loading .ffm-films-grid {
  opacity: .4;
  pointer-events: none;
}

.ffm-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 0;
  color: var(--ffm-text-muted);
}

/* ---- Film Grid ---- */
.ffm-films-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 24px;
  margin: 0;
}

.ffm-cols-1 { grid-template-columns: 1fr; }
.ffm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ffm-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ffm-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ffm-cols-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1024px) { .ffm-films-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .ffm-films-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px)  { .ffm-films-grid { grid-template-columns: 1fr; } }

/* ---- Film Card — poster + title + genre only ---- */
.ffm-film-card {
  display: flex;
  flex-direction: column;
  margin-bottom: 32px;
  background: transparent;
  border: none;
}

.ffm-card-poster-link {
  display: block;
  overflow: hidden;
  background: #1a1a1a;
  margin-bottom: 16px;
}

.ffm-card-poster-link .ffm-poster-img,
.ffm-card-poster-link .ffm-poster-placeholder {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .3s ease;
}

.ffm-film-card:hover .ffm-card-poster-link .ffm-poster-img {
  transform: scale(1.03);
}

.ffm-card-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ffm-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.ffm-card-title a {
  color: #d90e0e;
  text-decoration: none;
}

.ffm-card-title a:hover {
  text-decoration: underline;
  color: #d90e0e;
}

.ffm-card-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ffm-card-genre-link {
  font-size: 13px;
  color: #5e5e5e;
  text-decoration: none;
}

.ffm-card-genre-link:not(:last-child)::after {
  content: ', ';
  color: #5e5e5e;
}

.ffm-card-genre-link:hover { color: var(--ffm-gold); }

.ffm-no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ffm-text-muted);
  padding: 48px 0;
}

/* ---- Pagination ---- */
.ffm-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 16px 0 32px;
  flex-wrap: wrap;
}

.ffm-pagination .page-numbers {
  color: var(--ffm-text);
  border: 1px solid var(--ffm-border);
  padding: 7px 13px;
  border-radius: var(--ffm-radius);
  text-decoration: none;
  font-size: 13px;
}

.ffm-pagination .page-numbers.current {
  background: var(--ffm-gold);
  color: #111;
  border-color: var(--ffm-gold);
  font-weight: 700;
}

.ffm-pagination .page-numbers:hover:not(.current) {
  border-color: var(--ffm-gold);
  color: var(--ffm-gold);
}

/* ---- Archive ---- */
.ffm-archive-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 32px 40px; }
.ffm-archive-header  { padding: 32px; text-align: center; }
.ffm-archive-header h1 { font-size: 32px; margin: 0; }
