/*
Theme Name: DownloadOTT
Theme URI: https://example.com
Author: bsapps
Description: A lightweight, plugin-free WordPress theme designed for movies and series. Supports relationships, admin meta boxes, and fully customizable post types for movies, series, seasons, and episodes.
Version: 1.0.0
Text Domain: downloadott
*/


/* Base color variables */
/* Light Mode */
:root {
  --color-background: #1d2327;
  --color-surface: #2c3338;
  --color-body-background: #f1f1f1;
  --color-card-background: #fafafa;
  --color-text: #ffffff;
  --color-text-dark: #1d2327;
  --color-muted: #d1d5db;

  --color-primary: #cc6600;
  --color-accent: #a50000;
}

/* Dark Mode */
.dark-mode {
  --color-background: #1d2327;
  --color-surface: #2c3338;
  --color-body-background: #f1f1f1;
  --color-card-background: #fafafa;
  --color-text: #ffffff;
  --color-text-dark: #1d2327;
  --color-muted: #d1d5db;

  --color-primary: #cc6600;
  --color-accent: #a50000;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--color-body-background);
  color: var(--color-text-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensures the body takes at least the full viewport height */
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  flex-grow: 1; /* Allows the main content to expand and push the footer down */
}
header,
footer {
  background: var(--color-background);
  color: var(--color-text);
  padding: 20px 0;
}
header a,
footer a {
  color: var(--color-text);
  text-decoration: none;
}
header nav a {
  display: inline-block;
  opacity: 0.9;
}
header nav a:hover {
  opacity: 1;
}
main {
  padding: 0 0 24px 0;
}
.grid {
  display: grid; /* space between cards */
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  background: var(--color-card-background);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden; /* makes image + overlay respect rounded corners */
  cursor: pointer;
}
.card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0; /* remove inner radius so it fills card */
  margin: 0 !important; /* remove unwanted gap */
  transition: opacity 0.3s ease-in-out;
}
.card .poster {
  width: 100%;
  height: auto;
  display: block;       /* removes inline-block whitespace */
  border-radius: 0;     /* override inner radius */
  margin: 0 !important; /* remove WP-injected margin */
}
.card-body {
  position: absolute;
  inset: 0; /* cover entire card */
  background: linear-gradient(to top, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0) 100%);
  color: var(--color-text);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* text stays at bottom */
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}
.card:hover .card-body {
  transform: translateY(0); /* reveal overlay */
}
.card a {
  color: inherit;
  text-decoration: none;
}
.card h3 {
  font-size: 16px;
  margin: 0 0 6px 0 !important;
}
.card p {
  font-size: 12px;
  margin: 0 0 6px 0 !important;
}
.card .meta {
  font-size: 12px;
  margin-bottom: 6px;
}
.card .meta a {
  color: var(--color-muted);
  text-decoration: none;
}
.card .meta a:hover {
  background: var(--color-accent);
  border: 0.5px solid var(--color-accent);
  border-radius: 50px;
  padding: 0px 8px 2px 8px;
  color: var(--color-text);
  font-size: 12px;
}
.card:hover img {
  opacity: 0.8;
}
.card:hover h3 {
  color: var(--color-text);
}



.pagination {
  justify-content: center;
  justify-items: center;
  margin: 40px 0;
  width: 100%;
}
.pagination a,
.pagination span {
  border: 1px solid var(--color-surface);
  background-color: var(--color-surface);
  color: var(--color-text);
  padding: 4px 18px 6px 18px;
  margin-right: 8px;
  border-radius: 50px;
  text-decoration: none;
}
.pagination a:hover {
  border: 1px solid var(--color-accent);
  background-color: var(--color-accent);
  color: var(--color-text);
  padding: 4px 18px 6px 18px;
  margin-right: 8px;
  border-radius: 50px;
  text-decoration: none;
}

.button {
  display: inline-block;
  background: var(--color-surface);
  color: var(--color-text);
  padding: 8px 16px 8px 16px;
  border-radius: 50px;
  font-size: 15px;
  text-decoration: none;
}
.section {
  margin: 32px 0;
}
figure.poster {
  margin: 0 0 16px 0;
}
figure.poster img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.meta {
  color: var(--color-text-dark);
  font-size: 14px;
}
.meta a {
  color: var(--color-text-dark);
  font-size: 14px;
}
.meta a:hover {
  color: var(--color-accent);
  font-size: 14px;
}

/* Header Layout */
.site-header {
  width: 100%;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-muted);
  padding: 20px 20px 20px 20px;
  box-sizing: border-box;
  justify-items: center;
}

.header-logo img {
  width: auto;
  max-height: 34px;
}

/* Search Bar */
.header-search form {
  justify-content: right;
  display: flex;
  width: 100%;
}

.header-search input[type="search"] {
  flex: 1;
  padding: 8px 24px 8px 12px;
  border: 2px solid var(--color-text);
  background: var(--color-text);
  color: var(--color-text-dark);
  border-right: none;
  border-radius: 20px 0 0 20px;
  outline: none;
}

.header-search .search-submit {
  padding: 8px 18px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-text);
  border-radius: 20px;
  margin-left: -20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.header-search .search-submit:hover {
  background: var(--color-accent);
  border: 1px solid var(--color-text);
}

.header-top {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  gap: 3px;
}

/* Categories Row */
.header-bottom {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 20px;
}

.category-buttons-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.cat-btn {
  font-size: 15px;
  padding: 4px 14px 4px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-surface);
  border-radius: 100px;
  text-decoration: none;
  color: var(--color-text);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cat-btn:hover {
  background: var(--color-accent);
  color: var(--color-text);
  border: 1px solid var(--color-accent);
  transform: translateY(-2px);
}
.button:hover {
  background: var(--color-accent);
  color: var(--color-text);
  transform: translateY(-1px);
}

/* notifications */
.notification-title {
  background-color: var(--color-background); 
  color: var(--color-text); 
  border-radius: 6px 6px 0px 0px; 
  padding: 10px 24px 10px 24px;
}
.notification-body {
  background-color: var(--color-surface); 
  color: var(--color-text);
  border-radius: 0px 0px 6px 6px; 
  padding: 10px 24px 24px 24px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-top {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .header-logo img{
    max-height: 46px;
  }

  .header-search {
    margin-top: 10px;
  }
  /* Search Bar */
  .header-search form {
    justify-content: center;
  }
  .recent-post {
        display: none;
    }
}
/* Hide recent post on small and medium devices */
.recent-post {
    display: none;
}

/* Show recent post only on large devices (desktop) */
@media (min-width: 992px) {
    .recent-post {
        display: block;
    }
}

/* Responsive: stack columns on small devices */
@media (max-width: 900px) {
    .series-details-container {
        flex-direction: column;
        align-items: center;
    }
    .series-info {
        text-align: center;
    }
}

/* Smartphones (portrait & landscape) */
@media (max-width: 480px) {
  /* styles for very small devices */
  .grid {
    display: grid; /* space between cards */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }
}

/* Small devices (larger smartphones, phablets) */
@media (min-width: 481px) and (max-width: 767px) {
  /* styles for small devices */
  .grid {
    display: grid; /* space between cards */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}

/* Tablets (portrait and small desktops) */
@media (min-width: 768px) and (max-width: 1024px) {
  /* styles for tablets */

  .grid {
    display: grid; /* space between cards */
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
  }
}

/* Small laptops / desktops */
@media (min-width: 1025px) and (max-width: 1366px) {
  /* styles for small laptops or medium desktops */
  .grid {
    display: grid; /* space between cards */
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
  }
}

/* Large desktops */
@media (min-width: 1367px) {
  /* styles for big screens */
  .grid {
    display: grid; /* space between cards */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}
