/*
Theme Name: SAGAFILM
Theme URI: https://sagafilm.ro
Author: Saga Film
Description: Custom WordPress theme for SAGAFILM.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: sagafilm
*/

:root {
  --sf-bg: #ffffff;
  --sf-text: #141414;
  --sf-accent: #e52020;
  --sf-muted: #6f6f6f;
  --sf-font: "Space Mono", monospace;
  --sf-pad: 20px;
  --sf-h-padding-y: 14px;
  --sf-h-padding-x: 20px;
  --sf-h-bg-opacity: 0.85;
  --sf-h-blur: 30px;
  --sf-h-font-size: 13px;
  --sf-h-nav-gap: 50px;
  --sf-h-line-height: 1.8;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--sf-bg);
  color: var(--sf-text);
  font-family: var(--sf-font);
}

a {
  color: inherit;
}

.sf-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 220;
  display: flex;
  align-items: flex-start;
  padding: var(--sf-h-padding-y) var(--sf-h-padding-x);
  background: transparent;
  border-bottom: 0;
  backdrop-filter: blur(var(--sf-h-blur));
  -webkit-backdrop-filter: blur(var(--sf-h-blur));
}

.sf-slogan {
  flex: 0 0 auto;
  width: 25%;
  min-width: 260px;
  font-size: var(--sf-h-font-size);
  color: var(--sf-accent);
  line-height: 1.5;
  text-transform: uppercase;
  text-decoration: none;
}

.sf-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.sf-nav ul {
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  gap: 0 var(--sf-h-nav-gap);
  list-style: none;
}

.sf-nav li {
  line-height: var(--sf-h-line-height);
}

.sf-nav a {
  text-decoration: none;
  text-transform: uppercase;
  font-size: var(--sf-h-font-size);
  color: #3a3838;
  white-space: nowrap;
}

.sf-nav a:hover,
.sf-nav .current-menu-item > a,
.sf-nav .current_page_item > a {
  color: var(--sf-accent);
}

.sf-hamburger {
  flex-shrink: 0;
  width: 120px;
  height: 45px;
  margin-top: 2px;
  margin-left: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  cursor: pointer;
}

.sf-hamburger span {
  display: block;
  width: 50px;
  height: 2px;
  background: #111;
  border-radius: 1px;
  transform-origin: center;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease,
    width 0.2s ease;
  opacity: 0;
}

.sf-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.sf-hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.2);
}

.sf-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.sf-hamburger-logo {
  position: absolute;
  top: 0;
  right: 0;
  display: block;
  width: 120px;
  height: 45px;
  object-fit: contain;
  object-position: right center;
  pointer-events: none;
}

.sf-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #ffffff;
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.18, 1);
  pointer-events: none;
  overflow: hidden;
}

.sf-menu-overlay.is-open {
  transform: translateY(0);
  pointer-events: all;
}

.sf-menu-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 0;
  pointer-events: none;
}

.sf-intro-click-layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 90px;
  left: 0;
  z-index: 2;
  cursor: pointer;
}

.sf-intro-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  background: #ffffff;
  font-family: var(--sf-font);
  font-size: var(--sf-h-font-size);
  letter-spacing: 0;
  text-transform: uppercase;
  user-select: none;
}

.sf-intro-footer-top {
  position: relative;
  min-height: 42px;
  background: #ffffff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
}

.sf-intro-unmute {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: var(--sf-font);
  font-size: var(--sf-h-font-size);
  text-transform: uppercase;
  color: #111111;
}

.sf-intro-unmute:hover {
  color: var(--sf-accent);
}

.sf-enter-link {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #111111;
  text-decoration: none;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
}

.sf-enter-link:hover {
  color: var(--sf-accent);
}

.sf-intro-sections {
  position: relative;
  display: flex;
  width: 100%;
  background: #ececec;
  cursor: pointer;
}

.sf-intro-progress-fill {
  position: absolute;
  top: 0;
  right: auto;
  bottom: 0;
  left: 0;
  width: 0%;
  background: rgba(229, 32, 32, 0.18);
  pointer-events: none;
  z-index: 0;
  transition: width 0.15s linear;
}

.sf-intro-sections.dragging .sf-intro-progress-fill {
  transition: none;
}

.sf-intro-section {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  padding: 10px 14px 14px;
  text-align: left;
  color: rgba(0, 0, 0, 0.35);
  font-family: var(--sf-font);
  font-size: var(--sf-h-font-size);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.sf-intro-section:not(:last-child) {
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.sf-intro-section:hover,
.sf-intro-section.filled {
  color: var(--sf-accent);
}

body.sf-menu-open {
  overflow: hidden;
}

.sf-main {
  padding: 92px var(--sf-pad) 30px;
  min-height: 100vh;
}

.sf-home-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding-top: 110px;
}

.sf-home-main--globe {
  position: relative;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}

.sf-home-globe-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

#sfHomeGlobeCanvas {
  width: max(100vw, 100vh);
  height: max(100vw, 100vh);
  max-width: none;
  max-height: none;
  border-radius: 50%;
  background: transparent;
  cursor: grab;
  pointer-events: auto;
}

#sfHomeGlobeCanvas.dragging {
  cursor: grabbing;
}

.sf-home-logo-wrap {
  width: min(960px, 90vw);
  display: grid;
  justify-items: center;
  gap: 18px;
}

.sf-home-content-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  width: min(1024px, 88vw);
  align-content: center;
  padding: 130px 0 90px;
  pointer-events: none;
}

.sf-home-content-wrap a,
.sf-home-content-wrap button {
  pointer-events: auto;
}

.sf-home-logo {
  display: block;
  width: min(92vw, var(--sf-logo-max-width, 820px));
  height: auto;
}

.sf-home-intro {
  text-transform: uppercase;
  color: var(--sf-muted);
  text-align: center;
  font-size: 13px;
}

.sf-section-title {
  margin: 0 0 18px;
  font-size: 20px;
  text-transform: uppercase;
}

.sf-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.sf-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px;
  min-height: 120px;
}

.sf-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #f2f2f2;
}

.sf-card-title {
  font-size: 12px;
  margin: 10px 0 0;
  text-transform: uppercase;
}

.sf-card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--sf-muted);
}

.sf-note {
  margin: 20px 0 0;
  font-size: 12px;
  color: var(--sf-muted);
  text-transform: uppercase;
}

.sf-page-content {
  max-width: 1024px;
}

.home .sf-page-content {
  font-size: var(--sf-h-font-size);
  line-height: var(--sf-h-line-height);
  text-transform: uppercase;
  color: #3a3838;
  text-align: center;
}

.home .sf-home-main--globe .sf-page-content {
  margin: 0 auto;
  max-width: min(860px, 82vw);
  color: var(--sf-accent);
  text-align: center;
}

.sf-news-single-main {
  padding-top: 108px;
}

.sf-news-single {
  max-width: 1720px;
  margin: 0 auto;
}

.sf-news-single-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  align-items: start;
}

.sf-news-copy {
  max-width: 980px;
}

.sf-news-back {
  display: inline-block;
  margin-bottom: 32px;
  color: #e52020;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.sf-news-title {
  margin: 0 0 24px;
  color: #3a3838;
  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  font-size: clamp(28px, 4vw, 35px);
  line-height: 1.03;
  font-weight: 400;
  text-transform: uppercase;
}

.sf-news-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 28px;
  text-transform: uppercase;
  font-size: var(--sf-h-font-size);
  line-height: var(--sf-h-line-height);
  letter-spacing: 0;
  font-family: var(--sf-font);
}

.sf-news-author {
  color: #3a3838;
  font-weight: 400;
}

.sf-news-date {
  color: #3a3838;
  font-weight: 400;
}

.sf-news-content {
  color: #3b3c40;
  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  font-size: 26px;
  line-height: 1.12;
  font-weight: 400;
}

.sf-news-content p {
  margin: 0 0 28px;
}

.sf-news-copy .post-featured-img {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 28px;
}

.sf-news-copy .post-featured-img img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
}

.sf-news-content strong {
  font-weight: 700;
}

.sf-news-content p strong {
  text-transform: uppercase;
  font-weight: 500;
}

.sf-news-content a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.sf-news-content img {
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
}

.sf-news-source {
  display: inline-flex;
  margin-top: 10px;
  color: #3a3838;
  text-decoration: none;
  border-bottom: 1px solid #3a3838;
  padding-bottom: 2px;
  font-size: 13px;
  text-transform: uppercase;
}

.sf-news-source:hover {
  color: #e52020;
  border-bottom-color: #e52020;
}

.sf-news-aside {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.sf-news-globe-wrap {
  width: 100%;
  display: grid;
  place-items: center;
  padding-top: 6px;
}

#newsGlobeCanvas {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: transparent;
  cursor: grab;
}

#newsGlobeCanvas.dragging {
  cursor: grabbing;
}

.sf-news-controls {
  position: relative;
  border: 1px solid rgba(102, 102, 102, 0.42);
  min-height: 128px;
}

.sf-news-control {
  position: relative;
  border: 0;
  background: transparent;
}

.sf-news-stats {
  align-content: start;
  align-items: start;
  justify-items: start;
  padding: 15px 18px;
  gap: 0;
  cursor: pointer;
  color: #6d6b64;
  font-family: var(--sf-font);
  font-size: 13px;
  line-height: 1.25;
  text-transform: uppercase;
}

.sf-news-stats-title {
  color: #5f5d57;
}

.sf-news-stats-line {
  white-space: nowrap;
}

.sf-news-stats-line strong {
  font-weight: 700;
  color: #57554f;
}

.sf-news-share {
  margin-top: 42px;
}

.sf-news-share-title {
  margin: 0 0 10px;
  font-family: var(--sf-font);
  text-transform: uppercase;
  font-size: 13px;
  line-height: 1;
  font-weight: 400;
  color: #63615a;
}

.sf-news-share .share-links a {
  display: block;
  font-family: var(--sf-font);
  text-transform: uppercase;
  font-size: 13px;
  color: #4a4b4f;
  text-decoration: none;
  line-height: 1.75;
}

.sf-news-share .share-links a:hover {
  color: #e52020;
}

.sf-news-map-controls-title {
  margin-top: 0;
  font-family: var(--sf-font);
  font-size: 13px;
  line-height: 1;
  font-weight: 400;
  text-transform: uppercase;
  color: #63615a;
}

.sf-news-map-note {
  margin-top: -6px;
  font-size: 12px;
  color: #706f69;
  text-transform: uppercase;
  line-height: 1.4;
}

#sfNewsImageLightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

#sfNewsImageLightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.sf-news-lightbox-image {
  width: min(92vw, 1520px);
  height: min(88vh, 1080px);
  object-fit: contain;
}

.sf-news-lightbox-close,
.sf-news-lightbox-prev,
.sf-news-lightbox-next {
  position: absolute;
  border: 0;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  cursor: pointer;
  font-family: var(--sf-font);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 9px 10px;
}

.sf-news-lightbox-close {
  top: 18px;
  right: 18px;
}

.sf-news-lightbox-prev {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.sf-news-lightbox-next {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.sf-news-lightbox-count {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--sf-font);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
}

body.sf-news-lightbox-open {
  overflow: hidden;
}

.sf-footer {
  padding: 20px;
  font-size: 12px;
  color: var(--sf-muted);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 1120px) {
  .sf-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .sf-header {
    padding: 12px 14px;
  }

  .sf-slogan {
    width: auto;
    min-width: 0;
    max-width: calc(100% - 90px);
  }

  .sf-nav {
    display: none;
  }

  .sf-main {
    padding-top: 84px;
  }

  .sf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sf-news-single-main {
    padding-top: 96px;
  }

  .sf-news-single-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sf-news-aside {
    position: static;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    max-width: 340px;
  }

  #newsGlobeCanvas {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 560px) {
  .sf-grid {
    grid-template-columns: 1fr;
  }

  .sf-home-main {
    padding-top: 140px;
  }

  .sf-home-main--globe {
    padding: 0;
  }

  .sf-home-content-wrap {
    width: min(92vw, 1024px);
    padding: 118px 0 76px;
  }

  .sf-enter-link {
    display: none;
  }

  .sf-news-content {
    font-size: 26px;
    line-height: 1.22;
  }

  .sf-news-title {
    font-size: clamp(28px, 9vw, 35px);
  }

  .sf-news-meta {
    font-size: 12px;
    letter-spacing: 0;
  }

  .sf-news-aside {
    display: none;
  }

  .sf-news-lightbox-prev,
  .sf-news-lightbox-next {
    display: none;
  }
}
