/*
Theme Name: StarBlog
Theme URI: https://example.com/starblog
Author: AI Assistant
Description: Modern, SEO-optimized theme for AV & OnlyFans content. Features dedicated Actor profiles, breaking news, and modular homepage.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: starblog
*/

:root {
  /* Colors */
  --clr-bg: #0f1115;
  --clr-bg-card: #1a1d24;
  --clr-primary: #fa164f;
  --clr-primary-hover: #ff2a5f;
  --clr-text: #e2e8f0;
  --clr-text-muted: #94a3b8;
  --clr-border: #334155;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Prompt', var(--font-main);

  /* Layout */
  --container-width: 1440px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
}

/* Font fallbacks to prevent FOUT (Flash of Unstyled Text) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: local('Inter');
}

@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: local('Prompt');
}

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

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

body {
  background-color: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Prevent layout shifts: set explicit aspect ratios on image containers */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

img[width][height] {
  aspect-ratio: attr(width) / attr(height);
}

a {
  color: var(--clr-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--clr-primary-hover);
}

ul,
ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Layout Commons */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--clr-primary), transparent);
}

.section-subtitle {
  color: var(--clr-text-muted);
  font-size: 1.05rem;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

/* Adjust spacing if subtitle is missing */
.section-title:last-of-type {
  margin-bottom: 2rem;
}

.section-title+.post-grid,
.section-title+.actor-grid,
.section-title+.breaking-grid {
  margin-top: 2rem;
}

/* Archive Page Headers */
.archive-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--clr-border);
  text-align: center;
}

.archive-header .section-title {
  justify-content: center;
  text-align: center;
  line-height: 1.4;
}

.archive-header .section-title::after {
  display: none;
  /* Remove trailing tech-line for centered archive titles */
}

.archive-description {
  color: var(--clr-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 1rem auto 0;
  padding: 0 1rem;
}


/* Header */
.site-header {
  height: var(--header-height);
  background: rgba(15, 17, 21, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.site-brand {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}

.site-brand span {
  color: var(--clr-primary);
}

.custom-logo-link img {
  max-height: 50px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Search Area */
.header-search form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--clr-border);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.header-search form:focus-within {
  border-color: var(--clr-primary);
  background: rgba(0, 0, 0, 0.5);
}

.header-search input {
  background: transparent;
  border: none;
  color: var(--clr-text);
  padding: 0.5rem 1rem;
  outline: none;
  width: 150px;
  font-family: var(--font-main);
  transition: width var(--transition);
}

.header-search input:focus {
  width: 220px;
}

.header-search button {
  background: transparent;
  border: none;
  color: var(--clr-text-muted);
  cursor: pointer;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.header-search button:hover {
  color: var(--clr-primary);
}

.main-nav {
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav>li {
  position: relative;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0;
  color: var(--clr-text);
  font-weight: 500;
  font-size: 1.05rem;
}

.main-nav a:hover,
.main-nav .current-menu-item>a {
  color: var(--clr-primary);
}

/* Dropdown Sub-menu */
.main-nav ul.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--clr-bg-card);
  min-width: 220px;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 999;
  border: 1px solid var(--clr-border);
}

.main-nav li:hover>ul.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav ul.sub-menu li {
  display: block;
}

.main-nav ul.sub-menu a {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.main-nav ul.sub-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--clr-primary);
}

/* Banner */
.hero-banner-wrap {
  width: 100%;
  max-width: 1440px;
  margin: 2rem auto;
  aspect-ratio: 1440 / 756;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--clr-bg-card);
}

.hero-banner-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Homepage Banner Title */
.homepage-banner-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  text-align: center;
  color: #fff;
  margin: 3rem 0 0.5rem;
  line-height: 1.2;
}

.homepage-banner-title span {
  color: var(--clr-primary);
}

.homepage-banner-subtitle {
  text-align: center;
  color: var(--clr-text-muted);
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Post Grid (3 Columns) */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.post-card {
  background: var(--clr-bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition);
}

.post-card:hover {
  transform: translateY(-5px);
}

.post-thumb {
  display: block;
  aspect-ratio: 1024 / 576;
  overflow: hidden;
  background: #000;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.post-card:hover .post-thumb img {
  transform: scale(1.05);
}

.post-card-content {
  padding: 1rem;
}

.post-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-title a {
  color: #fff;
}

.post-title a:hover {
  color: var(--clr-primary);
}

.post-meta {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}

/* Breaking News (Featured) */
.breaking-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.breaking-card {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.breaking-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breaking-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 80%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.breaking-badge {
  background: var(--clr-primary);
  color: #fff;
  padding: 0.2rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  align-self: flex-start;
  margin-bottom: 0.5rem;
}

.breaking-card .post-title {
  font-size: 1.4rem;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/* Actors Grid */
.actor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.actor-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 400 / 600;
  background: var(--clr-bg-card);
  transition: transform var(--transition);
}

.actor-card:hover {
  transform: scale(1.03);
}

.actor-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.actor-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  color: #fff;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: #08090b;
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--clr-border);
  margin-top: 4rem;
}

.footer-desc {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  color: var(--clr-text-muted);
  font-size: 0.95rem;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.widget-title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.footer-widget ul li {
  margin-bottom: 0.75rem;
}

.footer-widget ul a {
  color: var(--clr-text-muted);
}

.footer-widget ul a:hover {
  color: var(--clr-primary);
}

.btn-telegram {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #229ED9;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: bold;
}

.btn-telegram:hover {
  background: #1b85b8;
  color: #fff;
}

.footer-copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  font-size: 0.85rem;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {

  .post-grid,
  .actor-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--clr-bg-card);
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--clr-border);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .main-navigation.toggled {
    display: block;
  }

  .main-nav {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* Reset Sub-menu for mobile (accordion style) */
  .main-nav ul.sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    padding-left: 1.5rem;
    display: none;
    /* Hide by default on mobile */
  }

  .main-nav li:hover>ul.sub-menu {
    display: block;
  }
}

@media (max-width: 768px) {

  .post-grid,
  .actor-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .breaking-grid {
    grid-template-columns: 1fr;
  }

  .footer-widgets {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

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

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

  /* Keep actors 2 columns on mobile */
  .hero-banner-caption h2 {
    font-size: 1.5rem;
  }

  .header-right {
    gap: 0.5rem;
  }

  .header-search input {
    width: 100px;
    padding: 0.5rem;
  }

  .header-search input:focus {
    width: 140px;
  }

  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }
}

/* Scroll to Top */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(240, 20, 70, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--clr-primary-hover);
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(240, 20, 70, 0.6);
}