/*
Theme Name: Cinemax Player
Theme URI: https://example.com/
Author: شما
Author URI: https://example.com/
Description: قالب فیلم با اسلایدر و دسته‌بندی‌ها
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cinemaxplayer
*/


/* Theme basic styles */
body {
    background-color: #000;
    color: #fff;
    font-family: sans-serif;
    margin: 0;
    padding: 0;
}

/* Top banner */
.main-slider {
    position: relative;
    height: auto;
    overflow: hidden;
    margin-bottom: 40px;
}
.main-slider .slide {
    display: none;
    position: relative;
    text-align: center;
}
.main-slider .slide.active {
    display: block;
}
.main-slider img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}
.main-slider h3 {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    background-color: rgba(0,0,0,0.5);
    padding: 10px;
    font-size: 24px;
    border-radius: 8px;
}

/* Category styling */
.movie-categories {
    padding: 20px;
}
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    margin-bottom: -10px;
}
.category-header h2 {
    font-size: 22px;
    color: #fff;
}
.category-header .view-all {
    font-size: 14px;
    text-decoration: none;
    color: #00aced;
    background-color: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 6px;
}
.category-header .view-all:hover {
    background-color: rgba(255,255,255,0.2);
}
.category-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 15px;
}
.movie-card {
    width: 160px;
    text-align: center;
    flex-shrink: 0;
}
.movie-card img {
    width: 100%;
    border-radius: 8px;
}
.movie-card p {
    margin-top: 6px;
    font-size: 14px;
    color: #fff;
}


.category-archive {
    padding: 20px;
}
.archive-title {
    font-size: 26px;
    margin-bottom: 20px;
    color: #fff;
}
.category-posts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.category-posts .movie-card {
    width: 180px;
    text-align: center;
}
.category-posts .movie-card img {
    width: 100%;
    border-radius: 8px;
}
.category-posts .movie-card p {
    margin-top: 6px;
    font-size: 14px;
    color: #fff;
}


.pagination {
    text-align: center;
    margin-top: 30px;
}
.pagination a,
.pagination span {
    display: inline-block;
    margin: 0 5px;
    padding: 6px 12px;
    background: #222;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}
.pagination .current {
    background: #f00;
}


.hero-slider {
    position: relative;
    overflow: hidden;
}
.slide {
    display: none;
    position: relative;
}
.slide img {
    width: 100%;
    height: auto;
}
.slide.active {
    display: block;
}
.slide-caption {
    position: absolute;
    bottom: 20px;
    left: 30px;
    background-color: rgba(0,0,0,0.5);
    padding: 20px;
    color: white;
    border-radius: 5px;
}
.watch-button {
    display: inline-block;
    margin-top: 10px;
    background: red;
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
}


.hero-slider {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}
.slide {
    display: none;
    position: relative;
}
.slide.active {
    display: block;
}
.slide img {
    width: 100%;
    height: auto;
}
.slide-caption {
    position: absolute;
    bottom: 20px;
    left: 30px;
    background-color: rgba(0,0,0,0.5);
    padding: 20px;
    color: white;
    border-radius: 5px;
}
.watch-button {
    display: inline-block;
    margin-top: 10px;
    background: red;
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
}


/* Adjust custom logo size and position */
.custom-logo-link img { max-width: 320px !important;
    height: auto !important;
}
.site-branding {
    text-align: right !important;
    padding-right: 20px !important;
}


/* Watch button on movie cards */
.movie-card {
    position: relative;
}
.movie-card .watch-btn {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    width: 40px;
    height: 40px;
    background: red;
    color: white;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
}


/* Search box styling */
.site-search {
    text-align: center;
    margin: 20px 0;
}
.search-form {
    display: inline-block;
}
.search-input {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    width: 200px;
}
.search-button {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-left: none;
    background: #ff3c3c;
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}
.search-button:hover {
    background: #e03b3b;
}


/* Search box styling */
.site-search {
    text-align: center;
    margin: 20px 0;
}
.search-form {
    display: inline-flex;
}
.search-input {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    width: 200px;
}
.search-button {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-left: none;
    background: #ff3c3c;
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}
.search-button:hover {
    background: #e03b3b;
}


.search-results {
    padding: 20px;
    color: #fff;
}
.search-title {
    font-size: 24px;
    margin-bottom: 20px;
}
.results-list .result-item {
    margin-bottom: 20px;
    background: #111;
    padding: 15px;
    border-radius: 8px;
}
.results-list .result-item h2 {
    margin: 10px 0;
    font-size: 18px;
}


/* Updated search results styling */
.search-results {
    padding: 20px;
    color: #fff;
}
.search-header {
    text-align: center;
    margin-bottom: 30px;
}
.search-form {
    display: inline-block;
    margin-bottom: 10px;
}
.search-input {
    padding: 8px 12px;
    width: 250px;
}
.search-button {
    padding: 8px 16px;
    background: #ff3c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.search-button:hover {
    background: #e03b3b;
}
.search-title {
    font-size: 20px;
    margin-top: 10px;
}
.results-list .result-item {
    background: #111;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
}
.results-list .result-item h2 {
    margin: 10px 0;
}
.pagination {
    text-align: center;
    margin-top: 20px;
}
.pagination a, .pagination span {
    display: inline-block;
    margin: 0 5px;
    padding: 6px 12px;
    background: #222;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}
.pagination .current {
    background: #ff3c3c;
}


.hero-slider {
    position: relative;
    overflow: hidden;
}
.slide {
    position: relative;
    height: 80vh;
    background-size: cover;
    background-position: center;
    transition: all 1s ease-in-out;
}
.slide-overlay {
    position: absolute;
    bottom: 40px;
    left: 40px;
    background: rgba(0,0,0,0.6);
    padding: 20px;
    border-radius: 10px;
}
.slide-overlay h2 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 10px;
}
.watch-button {
    display: inline-block;
    padding: 10px 20px;
    background: #ff3c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}
.watch-button:hover {
    background: #e22d2d;
}


.latest-posts {
    padding: 40px 20px;
}
.section-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
}
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}
.post-card {
    background: #111;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
}
.post-card h3 {
    color: #fff;
    margin-top: 10px;
    font-size: 16px;
}


.hero-slider { position: relative; overflow: hidden; }
.scene-slider .slide { display: none; position: relative; }
.hero-slider .slide.active { display: block; }
.slide-caption { position: absolute; bottom: 20px; left: 30px; background: rgba(0,0,0,0.5); padding: 20px; border-radius:5px; }
.watch-button { display:inline-block; padding:10px 20px; background:#ff3c3c; color:#fff; text-decoration:none; border-radius:4px; }

.latest-posts { padding:40px 20px; }
.section-title { font-size:28px; color:#fff; margin-bottom:20px; }
.post-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:20px; }
.post-card { background:#111; padding:10px; border-radius:8px; text-align:center; }
.post-card h3 { color:#fff; margin-top:10px; }

.movie-categories { padding:20px; }
.category-section { margin-bottom:40px; }
.category-section h2 { font-size:24px; color:#fff; margin-bottom:15px; }
.category-slider { display:flex; gap:10px; overflow-x:auto; padding-bottom:15px; }
.movie-card { width:160px; flex-shrink:0; text-align:center; }
.movie-card img { width:100%; border-radius:8px; }
.movie-card p { color:#fff; margin-top:6px; }
.view-all { display:inline-block; margin-top:10px; color:#00aced; text-decoration:none; }


/* Continue Watch Button */
.continue-watch-button {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: #00aced;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}
.continue-watch-button:hover {
    background: #0084b4;
}


/* Continue Watching */
.continue-watching { padding: 20px; background: #111; }
.continue-watching .section-title { font-size: 24px; color: #fff; margin-bottom: 15px; }
.watchlist-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; }
.watchlist-item { width: 160px; text-align: center; }
.watchlist-item img { width: 100%; border-radius: 8px; }
.watchlist-item p { color: #fff; margin-top: 6px; }


/* Continue Watching */
.continue-watching { padding: 20px; background: #111; margin-top:40px; }
.continue-watching .section-title { font-size: 24px; color: #fff; margin-bottom: 15px; }
.watchlist-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; }
.watchlist-item { width: 120px; text-align: center; }
.watchlist-item img { width: 100%; border-radius: 8px; }
.watchlist-item p { color: #fff; margin-top: 6px; font-size:14px; }

/* Continue Watching */
.continue-watching { padding: 20px; background: #111; }
.continue-watching .section-title { font-size: 24px; color: #fff; margin-bottom: 15px; }
.watchlist-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; }
.watchlist-item { width: 120px; text-align: center; }
.watchlist-item img { width: 100%; border-radius: 8px; }
.watchlist-item p { color: #fff; margin-top: 6px; font-size:14px; }

/* Hero Slider */
.hero-slider { position: relative; overflow: hidden; margin-bottom: 30px; }
.slide { display: none; position: relative; }
.slide.active { display: block; }
.slide img { width: 100%; height: auto; }
.slide-caption { position: absolute; bottom: 20px; left: 30px; background: rgba(0,0,0,0.5); padding: 20px; border-radius:5px; }
.watch-button { display:inline-block; padding:10px 20px; background:#ff3c3c; color:#fff; text-decoration:none; border-radius:4px; }

/* Latest Posts */
.latest-posts { padding:40px 20px; }
.section-title { font-size:28px; color:#fff; margin-bottom:20px; }
.post-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:20px; }
.post-card { background:#111; padding:10px; border-radius:8px; text-align:center; }
.post-card h3 { color:#fff; margin-top:10px; }

/* Categories Section */
.movie-categories { padding:20px; }
.category-section { margin-bottom:40px; }
.category-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.category-header h2 { font-size:24px; color:#fff; }
.category-header .view-all { font-size:14px; color:#00aced; text-decoration:none; }
.category-slider { display:flex; gap:10px; overflow-x:auto; padding-bottom:15px; }
.movie-card { width:160px; flex-shrink:0; text-align:center; }
.movie-card img { width:100%; border-radius:8px; }
.movie-card p { color:#fff; margin-top:6px; }


/* Latest Posts header with view-all */
.latest-posts .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.view-all-latest {
    font-size: 14px;
    text-decoration: none;
    color: #00aced;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 6px;
}
.view-all-latest:hover {
    background: rgba(255,255,255,0.2);
}

/* Ensure 16:9 aspect ratio for latest images */
.latest-grid .post-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
}


/* Enforce 16:9 aspect ratio for images */
.aspect-16-9 {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio */
    overflow: hidden;
}
.aspect-16-9 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Apply to slider images */
.hero-slider .slide, .hero-slider .slide img {
    padding: 0;
}
.hero-slider .slide {
    position: relative;
}
.hero-slider .slide img {
    width: 100%;
    height: auto;
}

/* Wrap slider images */
.hero-slider .slide {
    display: block;
}

/* Apply to latest posts */
.latest-grid .post-card {
    position: relative;
}
.latest-grid .post-card a {
    display: block;
}
.latest-grid .post-card a .wp-post-image {
    width: 100%;
    height: auto;
}

/* Apply to category cards */
.movie-categories .movie-card {
    position: relative;
}
.movie-categories .movie-card a .wp-post-image {
    width: 100%;
    height: auto;
}


/* Watch button custom hover effect */
.watch-button {
    background-color: rgba(255, 0, 0, 0.4);
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.watch-button:hover {
    background-color: rgba(255, 0, 0, 0.85);
    color: white;
    font-size: 16px;
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}

/* Search Form Styles */
.search-form {
    display: flex;
    justify-content: center;
    margin: 20px auto;
}

.search-field {
    padding: 10px;
    border: 2px solid red;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
    width: 250px;
}

.search-submit {
    padding: 10px 20px;
    background-color: red;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
}

.search-submit:hover {
    background-color: darkred;
}



/* Search Form Styles */
.search-form {
    display: flex;
    justify-content: center;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.search-field {
    padding: 10px;
    border: 2px solid red;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
    width: 250px;
}

.search-submit {
    padding: 10px 20px;
    background-color: red;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
}

.search-submit:hover {
    background-color: darkred;
}



/* Centered Top Search Form */
.search-form {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
}

.search-field {
    padding: 10px;
    border: 2px solid red;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
    width: 250px;
}

.search-submit {
    padding: 10px 20px;
    background-color: red;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
}

.search-submit:hover {
    background-color: darkred;
}



/* Precisely Centered Top Search Form */
.search-form {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 9999;
    display: flex;
}

.search-field {
    padding: 10px;
    border: 2px solid red;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
    width: 250px;
}

.search-submit {
    padding: 10px 20px;
    background-color: red;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
}

.search-submit:hover {
    background-color: darkred;
}

.search-wrapper {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: 100%;
  text-align: center;
}

.search-wrapper form {
  display: inline-block;
  width: 50%;
  max-width: 600px;
}

.search-wrapper input[type="search"] {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #cc0000;
  border-radius: 25px;
  font-size: 16px;
}

.search-wrapper input[type="submit"] {
  background-color: #cc0000;
  color: white;
  padding: 10px 20px;
  margin-left: 10px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-wrapper input[type="submit"]:hover {
  background-color: #a00000;
  transform: scale(1.05);
}

.search-wrapper {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 100%;
  text-align: center;
  pointer-events: none;
}

.search-wrapper form {
  display: inline-block;
  width: 60%;
  max-width: 600px;
  pointer-events: auto;
}

.search-wrapper input[type="search"] {
  width: 70%;
  padding: 10px 15px;
  border: 2px solid #cc0000;
  border-radius: 25px 0 0 25px;
  font-size: 16px;
  outline: none;
}

.search-wrapper input[type="submit"] {
  background-color: #cc0000;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 0 25px 25px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-wrapper input[type="submit"]:hover {
  background-color: #a00000;
  transform: scale(1.05);
}


.search-box-wrapper {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
}

.search-form input[type="search"] {
    padding: 8px 15px;
    border: none;
    border-radius: 25px;
    width: 250px;
}

.search-form button.search-submit {
    background-color: red;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 8px 15px;
    margin-right: 5px;
}
