/* Theme Name: Premier Movie Showcase
* Description: Кинотеатр Premier
* Version: 1.0

*/

/* Rubik Local Font */
/* Rubik 300 (Light) */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/rubik-v30-cyrillic_latin-300.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('assets/fonts/rubik-v30-cyrillic_latin-300.woff') format('woff'), /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+, iOS 5+ */
       url('assets/fonts/rubik-v30-cyrillic_latin-300.svg#Rubik') format('svg'); /* Legacy iOS */
}

/* Rubik 400 (Regular) */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/rubik-v30-cyrillic_latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('assets/fonts/rubik-v30-cyrillic_latin-regular.woff') format('woff'), /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+, iOS 5+ */
       url('assets/fonts/rubik-v30-cyrillic_latin-regular.svg#Rubik') format('svg'); /* Legacy iOS */
}

/* Rubik 500 (Medium) */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/rubik-v30-cyrillic_latin-500.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('assets/fonts/rubik-v30-cyrillic_latin-500.woff') format('woff'), /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+, iOS 5+ */
       url('assets/fonts/rubik-v30-cyrillic_latin-500.svg#Rubik') format('svg'); /* Legacy iOS */
}

/* Rubik 600 (SemiBold) */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/rubik-v30-cyrillic_latin-600.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('assets/fonts/rubik-v30-cyrillic_latin-600.woff') format('woff'), /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+, iOS 5+ */
       url('assets/fonts/rubik-v30-cyrillic_latin-600.svg#Rubik') format('svg'); /* Legacy iOS */
}

/* Rubik 700 (Bold) */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/rubik-v30-cyrillic_latin-700.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('assets/fonts/rubik-v30-cyrillic_latin-700.woff') format('woff'), /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+, iOS 5+ */
       url('assets/fonts/rubik-v30-cyrillic_latin-700.svg#Rubik') format('svg'); /* Legacy iOS */
}
/* End Rubik Local Font Definitions */

:root {
  --primary-bg: #000;
  --text-primary: rgba(255, 255, 255, 0.96);
  --text-secondary: rgba(255, 255, 255, 0.78);
  --text-tertiary: rgba(255, 255, 255, 0.56);
  --border-color: rgba(139, 136, 146, 0.32);
  --button-gradient: linear-gradient(27deg, #3c1a70 0%, #5d0ef5 83.33%);
  --input-bg: rgba(139, 136, 146, 0.32);
  --focus-outline: 3px solid #5d0ef5;
  --spacing-unit: 8px;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Rubik", sans-serif;
  background: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.movie-showcase {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: calc(var(--spacing-unit) * 5) calc(var(--spacing-unit) * 7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Бургер-меню стили */
.hamburger-button {
  display: none;
  padding: 15px;
  cursor: pointer;
  background-color: transparent;
  border: 0;
  z-index: 101;
  margin-left: auto;
}

.hamburger-box {
  width: 24px;
  height: 20px;
  display: inline-block;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 24px;
  height: 2px;
  background-color: #fff;
  border-radius: 4px;
  position: absolute;
  transition: transform 0.2s ease-in-out;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: '';
  display: block;
}

.hamburger-inner {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-inner::before {
  top: -8px;
}

.hamburger-inner::after {
  bottom: -8px;
}

/* Анимация в крестик */
.menu-open .hamburger-inner {
  transform: rotate(45deg);
}

.menu-open .hamburger-inner::before {
  top: 0;
  opacity: 0;
}

.menu-open .hamburger-inner::after {
  bottom: 0;
  transform: rotate(-90deg);
}

@media (max-width: 991px) {
  .header {
    justify-content: space-between;
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 4);
  }
  
  .hamburger-button {
    display: inline-block;
    position: relative;
    right: 0;
  }

  .category-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin-left: 0;
    background-color: rgba(15, 15, 16, 0.98);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  }

  .menu-open .category-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .category-list {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 60%;
    gap: 20px;
    overflow-x: hidden;
    white-space: normal;
    padding-top: 60px;
  }

  .category-button {
    font-size: 22px;
  }
  .back-button-item {
  margin-left: 0 !important;
  }
}


.logo {
  height: 20px;
  width: auto;
}


.category-nav {
  flex-grow: 1; 
  margin-left: calc(var(--spacing-unit) * 5); 
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-weight: 400;
}

.category-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  margin: 0;
  padding: 0; 
  white-space: nowrap; 
  overflow-x: auto; 
  -ms-overflow-style: none; 
  scrollbar-width: none; 
  -webkit-overflow-scrolling: touch;
  list-style-type: none;
}

.category-list::-webkit-scrollbar {
  display: none; 
}

.category-button {
  display: block;
  font-size: 18px;
  padding: 2px clamp(4px, 1vw, 19px);
  color: #adadad;
  text-decoration: none;
  transition: all 0.3s ease;
  background: none;
  border: none;
}

.category-button:hover,
.category-button.active {
  color: #FFFFFF;
}


.main-content {
  flex: 1;
  padding: 0 calc(var(--spacing-unit) * 7);
  margin: 20px auto 50px auto;
  width: 100%;
}


.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 4);
  width: 100%;
}

.movie-poster {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background-color: #2a2a2e;
  transition: transform 0.3s ease;
}

.movie-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background-color: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover .movie-poster {
  transform: scale(1.05);
}

.poster-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.poster-logo {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  width: 70px; 
  height: auto;
  opacity: 0.8; 
  pointer-events: none; 
}

.age-rating-poster {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background-color: rgba(0, 0, 0, 0.9);
  color: rgba(236, 236, 236, 0.7);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
}

.movie-rating {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.9);
  color: rgba(236, 236, 236, 0.7);
  padding: 3px 6px 3px 20px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
  display: flex;
  align-items: center;
}

.movie-rating::before {
    content: "";
    position: absolute;
    left: 0px;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="rgba(236, 236, 236, 0.7)"><path d="M8 5v14l11-7z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.movie-poster-placeholder:hover {
  transform: scale(1.05);
}

.movie-info {
  padding: 12px;
}
.movie-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-meta-separator {
  margin: 0 4px;
}

.recommendations-grid.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 4);
  width: 100%;
}
/* Responsive adjustments */
@media (max-width: 991px) {
  .movie-grid {
    grid-template-columns: repeat(3, 1fr); 
  }
  .movie-meta {
    font-size: 15px; 
  }
}

@media (max-width: 768px) {
  .category-nav,
  .main-content,
  .footer {
    padding-left: calc(var(--spacing-unit) * 2);
    padding-right: calc(var(--spacing-unit) * 2);
  }

.movie-meta {
  font-size: 15px;
}

  .movie-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr)); 
  }
}

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: repeat(1, minmax(160px, 1fr)); 
  }
  
  .poster-logo {
    width: 80px;
    top: 8px;
    left: 8px;
  }

.movie-meta {
  font-size: 15px;
}
.age-rating-poster {
  font-size: 10px;
  padding: 2px 4px;
  bottom: 10px;
  left: 10px;

}
  .movie-rating {
    font-size: 10px;
    padding: 2px 6px 2px 20px;
    bottom: 10px;
    right: 10px;
  }
}

.recommendations-section {
    margin-top: 48px;
    margin-bottom: 32px;
    padding: 0 56px;
}

.recommendations-section h2 {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 24px;
}



.footer {
  padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 7);
  border-top: 1px solid var(--border-color);
  /* max-width: 1440px;
  margin: 0 auto 0 auto; 
  width: 100%; */
}

.footer-content {
  display: flex;
  gap: calc(var(--spacing-unit) * 4);
  flex-wrap: wrap;
}

.footer-logo {
  width: 40px;
  height: auto;
}

.footer-info {
  flex: 1;
  min-width: 280px;
}

.footer-links {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  flex-wrap: wrap;
  margin-top: calc(var(--spacing-unit) * 2);
}

.footer-link {
  color: var(--text-tertiary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-unit);
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-link:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  border-radius: 4px;
}


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.category-list {
  display: flex;
  width: 100%;
}

.back-button-item {
  margin-left: auto;
}