/*
 Theme Name:   TopListWorldwide
 Theme URI:    https://toplistworldwide.com
 Description:  Editorial magazine theme for TopListWorldwide – built on GeneratePress
 Author:       TopListWorldwide
 Template:     generatepress
 Version:      1.0.0
 Text Domain:  toplistworldwide
*/

/* ═══════════════════════════════════════════════════
   CI DESIGN TOKENS
   ═══════════════════════════════════════════════════ */
:root {
  /* Typography */
  --tlw-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --tlw-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Colors */
  --tlw-red: #c0392b;
  --tlw-red-hover: #a93226;
  --tlw-red-light: #fadbd8;
  --tlw-black: #1a1a1a;
  --tlw-dark: #2c2c2c;
  --tlw-gray-900: #333333;
  --tlw-gray-700: #555555;
  --tlw-gray-500: #888888;
  --tlw-gray-300: #cccccc;
  --tlw-gray-200: #e0e0e0;
  --tlw-gray-100: #f0f0f0;
  --tlw-gray-50: #f8f8f8;
  --tlw-white: #ffffff;
  --tlw-gold: #d4a017;
  --tlw-silver: #a0a0a0;
  --tlw-bronze: #b87333;

  /* Spacing */
  --tlw-gap: 20px;
  --tlw-content-width: 960px;
  --tlw-wide-width: 1100px;

  /* Borders */
  --tlw-border: 1px solid var(--tlw-gray-200);
  --tlw-border-light: 1px solid var(--tlw-gray-100);
  --tlw-border-double: 3px double var(--tlw-gray-300);

  /* Shadows */
  --tlw-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --tlw-shadow-md: 0 2px 8px rgba(0,0,0,0.08);

  /* Radius */
  --tlw-radius: 2px;
}


/* ═══════════════════════════════════════════════════
   GLOBAL RESET & BASE
   ═══════════════════════════════════════════════════ */
body {
  font-family: var(--tlw-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--tlw-gray-900);
  background: var(--tlw-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-container,
.inside-article,
.inside-page-header {
  max-width: var(--tlw-content-width);
  margin-left: auto;
  margin-right: auto;
}

a {
  color: var(--tlw-red);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--tlw-red-hover); }

img { max-width: 100%; height: auto; }

::selection {
  background: var(--tlw-red-light);
  color: var(--tlw-black);
}


/* ═══════════════════════════════════════════════════
   MASTHEAD / HEADER
   ═══════════════════════════════════════════════════ */
.site-header {
  background: var(--tlw-white);
  border-bottom: var(--tlw-border-double);
  padding: 0;
}

.inside-header {
  max-width: var(--tlw-content-width);
  margin: 0 auto;
  padding: 28px 20px 20px;
  text-align: center;
}

.site-title {
  font-family: var(--tlw-serif);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.1;
}
.site-title a {
  color: var(--tlw-black);
  text-decoration: none;
}
.site-title a:hover { color: var(--tlw-black); }

/* Red accent for "LIST" in the title — add via WP Customizer or functions.php */
.tlw-accent { color: var(--tlw-red); }

.site-description {
  font-family: var(--tlw-sans);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--tlw-gray-500);
  font-weight: 400;
  margin-top: 4px;
}

/* Top rule above masthead */
.site-header::before {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--tlw-gray-300);
  margin: 0 auto;
  padding-top: 0;
}


/* ═══════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════ */
.main-navigation {
  border-bottom: 1px solid var(--tlw-gray-200);
  background: var(--tlw-white);
}
.main-navigation .inside-navigation {
  max-width: var(--tlw-content-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
.main-navigation .main-nav ul {
  display: flex;
  justify-content: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-navigation .main-nav li a {
  font-family: var(--tlw-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tlw-gray-500);
  padding: 12px 16px;
  display: block;
  transition: color 0.2s;
}
.main-navigation .main-nav li a:hover,
.main-navigation .main-nav .current-menu-item a {
  color: var(--tlw-red);
}
.main-navigation .main-nav .current-menu-item a {
  border-bottom: 2px solid var(--tlw-red);
}


/* ═══════════════════════════════════════════════════
   TYPOGRAPHY — ARTICLE CONTENT
   ═══════════════════════════════════════════════════ */
.entry-title,
.page-title {
  font-family: var(--tlw-serif);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.25;
  color: var(--tlw-black);
  margin-bottom: 8px;
}

.entry-content h2 {
  font-family: var(--tlw-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--tlw-black);
  margin: 2.5rem 0 1rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--tlw-gray-200);
}

.entry-content h3 {
  font-family: var(--tlw-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--tlw-black);
  margin: 2rem 0 0.75rem;
}

.entry-content p {
  margin-bottom: 1.25rem;
  color: var(--tlw-gray-700);
}

.entry-content strong { color: var(--tlw-gray-900); }

.entry-content blockquote {
  border-left: 3px solid var(--tlw-red);
  padding: 12px 20px;
  margin: 1.5rem 0;
  font-family: var(--tlw-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: var(--tlw-gray-700);
  background: var(--tlw-gray-50);
}

/* Post meta */
.entry-meta {
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--tlw-gray-500);
  margin-bottom: 1.5rem;
}

/* Category labels */
.cat-links a,
.tlw-cat-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--tlw-red);
}


/* ═══════════════════════════════════════════════════
   HOMEPAGE SECTIONS
   ═══════════════════════════════════════════════════ */

/* Section heading with line */
.tlw-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2.5rem 0 1.25rem;
  padding: 0 20px;
}
.tlw-section-head::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--tlw-red);
  border-radius: 50%;
  flex-shrink: 0;
}
.tlw-section-head h2 {
  font-family: var(--tlw-serif);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  border: none;
}
.tlw-section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--tlw-gray-200);
}

/* ── HERO SECTION ── */
.tlw-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1px;
  background: var(--tlw-gray-200);
  border: 1px solid var(--tlw-gray-200);
  margin: 24px 20px 0;
}
.tlw-hero-main {
  position: relative;
  min-height: 280px;
  background: var(--tlw-gray-100);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.tlw-hero-main-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.tlw-hero-main-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}
.tlw-hero-main-content {
  position: relative;
  z-index: 1;
  padding: 20px 24px;
}
.tlw-hero-main-content .tlw-cat-label { color: #e74c3c; }
.tlw-hero-main-content h2 {
  font-family: var(--tlw-serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin: 6px 0;
  border: none;
  padding: 0;
}
.tlw-hero-main-content .tlw-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.tlw-hero-main-content a { color: #fff; }
.tlw-hero-main-content a:hover { color: #fff; opacity: 0.9; }

.tlw-hero-side {
  background: var(--tlw-white);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.tlw-hero-side h3 {
  font-family: var(--tlw-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  margin: 6px 0 4px;
}
.tlw-hero-side h3 a { color: var(--tlw-black); }
.tlw-hero-side h3 a:hover { color: var(--tlw-red); }

/* ── CARD GRID (Latest / Most Read) ── */
.tlw-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--tlw-gray-200);
  border: 1px solid var(--tlw-gray-200);
  margin: 0 20px;
}
.tlw-card {
  background: var(--tlw-white);
  padding: 16px;
}
.tlw-card-img {
  width: 100%;
  height: 140px;
  background: var(--tlw-gray-100);
  background-size: cover;
  background-position: center;
  border-radius: var(--tlw-radius);
  margin-bottom: 12px;
}
.tlw-card h4 {
  font-family: var(--tlw-serif);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  margin: 4px 0;
}
.tlw-card h4 a { color: var(--tlw-black); }
.tlw-card h4 a:hover { color: var(--tlw-red); }
.tlw-card .tlw-meta {
  font-size: 11px;
  color: var(--tlw-gray-500);
}
.tlw-card .tlw-cat-label {
  display: inline-block;
  margin-bottom: 6px;
}

/* ── TRENDING LIST ── */
.tlw-trending {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--tlw-gray-200);
  margin: 0 20px;
}
.tlw-trending-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--tlw-gray-100);
}
.tlw-trending-item:nth-child(odd) {
  border-right: 1px solid var(--tlw-gray-200);
}
.tlw-trending-num {
  font-family: var(--tlw-serif);
  font-size: 32px;
  font-weight: 900;
  color: var(--tlw-gray-200);
  line-height: 1;
  min-width: 34px;
}
.tlw-trending-item h4 {
  font-family: var(--tlw-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 2px;
}
.tlw-trending-item h4 a { color: var(--tlw-black); }
.tlw-trending-item h4 a:hover { color: var(--tlw-red); }

/* ── CATEGORY GRID ── */
.tlw-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1px;
  background: var(--tlw-gray-200);
  border: 1px solid var(--tlw-gray-200);
  margin: 0 20px;
}
.tlw-cat-item {
  background: var(--tlw-white);
  padding: 20px 12px;
  text-align: center;
  transition: background 0.2s;
}
.tlw-cat-item:hover { background: var(--tlw-gray-50); }
.tlw-cat-item a { color: var(--tlw-black); text-decoration: none; display: block; }
.tlw-cat-icon { font-size: 28px; margin-bottom: 8px; }
.tlw-cat-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tlw-cat-count {
  font-size: 11px;
  color: var(--tlw-gray-500);
  margin-top: 2px;
}

/* ── NEWSLETTER ── */
.tlw-newsletter {
  border: 1px solid var(--tlw-gray-200);
  padding: 2.5rem 2rem;
  text-align: center;
  margin: 2rem 20px;
}
.tlw-newsletter h3 {
  font-family: var(--tlw-serif);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 4px;
}
.tlw-newsletter p {
  font-size: 14px;
  color: var(--tlw-gray-500);
  margin-bottom: 16px;
}
.tlw-newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}
.tlw-newsletter-form input[type="email"] {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--tlw-sans);
  border: 1px solid var(--tlw-gray-300);
  border-radius: var(--tlw-radius);
  background: var(--tlw-white);
}
.tlw-newsletter-form input:focus {
  outline: none;
  border-color: var(--tlw-red);
}
.tlw-newsletter-btn {
  padding: 10px 24px;
  background: var(--tlw-red);
  color: #fff;
  border: none;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--tlw-sans);
  cursor: pointer;
  border-radius: var(--tlw-radius);
  transition: background 0.2s;
}
.tlw-newsletter-btn:hover { background: var(--tlw-red-hover); }


/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.site-footer {
  border-top: var(--tlw-border-double);
  background: var(--tlw-white);
}
.inside-site-info {
  max-width: var(--tlw-content-width);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--tlw-gray-500);
}


/* ═══════════════════════════════════════════════════
   GENERAL META
   ═══════════════════════════════════════════════════ */
.tlw-meta {
  font-size: 12px;
  color: var(--tlw-gray-500);
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .tlw-hero {
    grid-template-columns: 1fr;
  }
  .tlw-card-grid {
    grid-template-columns: 1fr;
  }
  .tlw-trending {
    grid-template-columns: 1fr;
  }
  .tlw-trending-item:nth-child(odd) {
    border-right: none;
  }
  .tlw-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .site-title { font-size: 24px; letter-spacing: 3px; }
  .main-navigation .main-nav ul { flex-wrap: wrap; justify-content: center; }
  .tlw-newsletter-form { flex-direction: column; }
  .entry-title { font-size: 26px; }
}

@media (max-width: 480px) {
  .tlw-hero-main { min-height: 200px; }
  .tlw-hero-main-content h2 { font-size: 20px; }
}
