/*
Theme Name: PorniItaly
Theme URI: https://pornitaly.net
Author: PorniItaly
Description: Custom adult tube theme for pornitaly.net — Italian adult video site. SEO optimised, Bunny Stream ready.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Private
Text Domain: pornitaly
*/

/* ─── CSS Variables ─────────────────────────────────────────────── */
:root {
  --accent:       #f072a0;
  --accent-dim:   rgba(240, 114, 160, 0.12);
  --accent-hover: #f5a0c0;
  --bg:           #120d14;
  --bg2:          #1c1220;
  --bg3:          #18101e;
  --bg4:          #221530;
  --border:       #2e1f35;
  --border2:      #3d2648;
  --text:         #eeeeee;
  --text-muted:   #7a6888;
  --text-dim:     #5a4560;
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-pill:  20px;
  --font-main:    'DM Sans', 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

/* ─── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ─── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 500; line-height: 1.3; color: #fff; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }

/* ─── Layout ─────────────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

/* ─── Header / Topbar ────────────────────────────────────────────── */
#site-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  letter-spacing: -0.5px;
}
.site-logo span { color: var(--accent); }

/* Search */
.header-search {
  display: flex;
  align-items: center;
  background: #2a1a30;
  border: 0.5px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  gap: 8px;
  flex: 1;
  max-width: 360px;
}
.header-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-main);
  font-size: 13px;
  width: 100%;
}
.header-search input::placeholder { color: var(--text-dim); }
.header-search button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  display: flex;
  align-items: center;
  padding: 0;
  font-size: 16px;
}

/* Nav */
#site-nav {
  background: #160e1c;
  border-bottom: 1px solid #2a1a32;
}
.nav-inner {
  display: flex;
  gap: 0;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a {
  color: #9a88a8;
  font-size: 13px;
  padding: 10px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-inner a:hover,
.nav-inner a.current { color: #fff; border-bottom-color: var(--accent); }

/* ─── Category Filter Pills ──────────────────────────────────────── */
.cat-filter {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-pill {
  background: #1e1224;
  border: 0.5px solid #3a2244;
  color: #c8a8d8;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.cat-pill:hover,
.cat-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ─── Section Header ─────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
}
.section-header h2 { font-size: 15px; }
.section-header .see-all { font-size: 12px; color: var(--accent); }

/* ─── Video Grid ─────────────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 0 16px 20px;
}
@media (max-width: 1100px) { .video-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .video-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .video-grid { grid-template-columns: repeat(2, 1fr); } }

/* ─── Video Card ─────────────────────────────────────────────────── */
.video-card {
  background: var(--bg2);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 0.5px solid var(--border);
  transition: transform 0.18s, border-color 0.18s;
}
.video-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.video-card a { color: inherit; }

.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg3);
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.video-card:hover .card-thumb img { transform: scale(1.04); }

.card-duration {
  position: absolute;
  bottom: 5px;
  right: 6px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240,114,160,0.15);
  opacity: 0;
  transition: opacity 0.18s;
}
.video-card:hover .card-play { opacity: 1; }
.card-play svg { width: 40px; height: 40px; fill: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }

.card-info { padding: 8px 10px 10px; }
.card-title {
  font-size: 12px;
  color: #ddd;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
}
.card-cat {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}
.card-meta {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

/* ─── Pagination ─────────────────────────────────────────────────── */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px 24px;
}
/* WP paginate_links outputs a ul — flatten it */
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.pagination ul li { display: inline-flex; }
.pagination a,
.pagination span,
.pagination ul li a,
.pagination ul li span {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  color: #ccc;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  display: inline-block;
  line-height: 1.4;
}
.pagination a:hover,
.pagination ul li a:hover { background: var(--bg4); color: #fff; }
.pagination .current,
.pagination ul li span.current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── SEO Description Block ──────────────────────────────────────── */
.seo-block {
  margin: 0 16px 20px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
}
.seo-block h2 {
  font-size: 14px;
  font-weight: 500;
  color: #f0d8ff;
  margin-bottom: 8px;
}
.seo-block p {
  font-size: 12px;
  color: #9a80a8;
  line-height: 1.8;
}

/* ─── Single Video Page ──────────────────────────────────────────── */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
  padding: 14px 16px;
}
@media (max-width: 768px) {
  .single-layout { grid-template-columns: 1fr; }
}

.player-wrap {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.player-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

.video-meta { margin-top: 12px; }
.video-page-title {
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  line-height: 1.4;
}
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.meta-stats {
  display: flex;
  gap: 14px;
}
.meta-stat {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.action-btns { display: flex; gap: 8px; }
.action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  color: #ccc;
  cursor: pointer;
  font-family: var(--font-main);
  transition: background 0.15s;
}
.action-btn:hover { background: var(--bg4); color: #fff; }
.action-btn.like-btn { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

.tags-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-pill {
  background: #1e1224;
  border: 0.5px solid #3a2244;
  color: #c8a8d8;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  transition: background 0.15s;
}
.tag-pill:hover { background: var(--bg4); color: #fff; }
.tag-pill.is-cat { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

.video-description {
  margin-top: 12px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.video-description p { font-size: 13px; color: #9a80a8; line-height: 1.8; }

.breadcrumb {
  font-size: 11px;
  color: var(--text-muted);
  padding: 10px 16px 0;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb span { color: var(--text-dim); margin: 0 4px; }

/* ─── Sidebar ────────────────────────────────────────────────────── */
.sidebar-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 10px;
}
.sidebar-list { display: flex; flex-direction: column; gap: 10px; }
.sidebar-card { display: flex; gap: 8px; }
.sidebar-thumb {
  width: 100px;
  min-width: 100px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: var(--bg3);
}
.sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-thumb .card-duration { font-size: 9px; padding: 1px 4px; }
.sidebar-info { flex: 1; min-width: 0; }
.sidebar-title-link {
  font-size: 11px;
  color: #ccc;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-cat { font-size: 10px; color: var(--accent); margin-top: 2px; }
.sidebar-views { font-size: 10px; color: var(--text-dim); }

/* ─── Related Grid (below player) ────────────────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}
@media (max-width: 700px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }

/* ─── Archive / Category Page ────────────────────────────────────── */
.archive-header {
  padding: 16px 16px 10px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 14px;
}
.archive-header h1 { font-size: 1.3rem; }
.archive-header p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ─── Categories Page Grid ───────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 0 16px 20px;
}
@media (max-width: 1100px) { .categories-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .categories-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .categories-grid { grid-template-columns: repeat(2, 1fr); } }

.cat-card { display: block; border-radius: var(--radius-md); overflow: hidden; border: 0.5px solid var(--border); transition: transform 0.18s, border-color 0.18s; }
.cat-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.cat-card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg3); }
.cat-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.cat-card:hover .cat-card-thumb img { transform: scale(1.05); }
.cat-card-placeholder { width: 100%; height: 100%; background: var(--bg3); }
.cat-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%); display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; }
.cat-card-name { font-size: 13px; font-weight: 500; color: #fff; text-transform: capitalize; }
.cat-card-count { font-size: 11px; color: var(--accent); margin-top: 2px; }

/* ─── Footer ─────────────────────────────────────────────────────── */
#site-footer {
  background: #0e080f;
  border-top: 1px solid #1e1224;
  padding: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
}
#site-footer a { color: var(--text-muted); }
#site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }

/* ─── No Results ─────────────────────────────────────────────────── */
.no-results { padding: 40px 16px; text-align: center; color: var(--text-muted); }

/* ─── Utility ────────────────────────────────────────────────────── */
.divider { border: none; border-top: 0.5px solid var(--border); margin: 14px 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
