/*
Theme Name: TodayVibe News
Theme URI: https://example.com/todayvibe-news
Author: Custom Theme
Author URI: https://example.com
Description: A clean, responsive editorial WordPress theme with image-led post listings, category badges, post views and a compact dark navigation header.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: todayvibe-news
Tags: blog, news, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --tvn-accent: #635bff;
  --tvn-accent-dark: #4d45e6;
  --tvn-header: #202228;
  --tvn-text: #30323a;
  --tvn-muted: #73747b;
  --tvn-border: #e8e8ec;
  --tvn-surface: #ffffff;
  --tvn-container: 1180px;
  --tvn-radius: 2px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--tvn-text);
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header {
  top: 32px;
}

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

a {
  color: var(--tvn-accent);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--tvn-accent-dark);
}

button,
input,
textarea,
select {
  font: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus,
.skip-link:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: #fff;
  color: #111;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}

.tvn-container {
  width: min(calc(100% - 40px), var(--tvn-container));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 50;
  min-height: 92px;
  background: var(--tvn-header);
  box-shadow: 0 10px 28px rgba(25, 27, 31, .1);
}

.header-inner {
  display: flex;
  align-items: stretch;
  min-height: 92px;
}

.site-branding {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 225px;
  padding-right: 30px;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.custom-logo {
  width: auto;
  max-height: 58px;
}

.site-title {
  margin: 0;
  color: var(--tvn-accent);
  font-size: clamp(31px, 3.1vw, 48px);
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 1;
}

.site-title a {
  color: inherit;
}

.site-description {
  display: none;
}

.main-navigation {
  display: flex;
  align-items: stretch;
}

.main-navigation ul {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation li {
  position: relative;
  display: flex;
}

.main-navigation a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 17px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-cat > a {
  background: var(--tvn-accent);
  color: #fff;
}

.main-navigation a::after {
  position: absolute;
  right: 17px;
  bottom: 24px;
  left: 17px;
  height: 2px;
  background: #fff;
  content: "";
  opacity: 0;
  transform: scaleX(.5);
  transition: opacity .2s ease, transform .2s ease;
}

.main-navigation a:hover::after,
.main-navigation a:focus::after,
.main-navigation .current-menu-item > a::after,
.main-navigation .current_page_item > a::after,
.main-navigation .current-cat > a::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  margin-left: 14px;
}

.search-form {
  position: relative;
  display: flex;
}

.header-search .search-field {
  width: 202px;
  height: 38px;
  padding: 0 42px 0 18px;
  border: 0;
  border-radius: 24px;
  outline: none;
  background: #34363c;
  color: #fff;
  font-size: 12px;
  transition: background .2s ease, box-shadow .2s ease;
}

.header-search .search-field::placeholder {
  color: #98999e;
}

.header-search .search-field:focus {
  background: #3d3f46;
  box-shadow: 0 0 0 2px var(--tvn-accent);
}

.search-submit {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #999aa0;
  cursor: pointer;
  place-items: center;
  transform: translateY(-50%);
}

.search-submit svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.menu-toggle {
  display: none;
  align-self: center;
  width: 46px;
  height: 42px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 3px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  content: "";
}

.site-main-wrap {
  display: grid;
  grid-template-columns: minmax(0, 780px) 300px;
  gap: 70px;
  align-items: start;
  padding-top: 30px;
  padding-bottom: 64px;
}

.content-area {
  min-width: 0;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 23px;
}

.post-card {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.post-card-media {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ececf0;
}

.post-card-media > a:first-child {
  display: block;
  width: 100%;
  height: 100%;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.post-card-media:hover img {
  transform: scale(1.025);
}

.post-card-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ededf1, #d9dae1);
  color: #a0a1a8;
  place-items: center;
}

.post-card-placeholder svg {
  width: 42px;
  height: 42px;
  fill: currentColor;
}

.category-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: var(--tvn-radius);
  background: var(--tvn-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.category-badge:hover,
.category-badge:focus {
  background: var(--tvn-accent-dark);
  color: #fff;
}

.post-card-content {
  min-width: 0;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 6px;
  color: var(--tvn-muted);
  font-size: 12px;
  line-height: 1.45;
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.post-meta svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.post-card-title {
  margin: 0 0 10px;
  color: var(--tvn-text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.35px;
  line-height: 1.42;
}

.post-card-title a {
  color: inherit;
}

.post-card-title a:hover,
.post-card-title a:focus {
  color: var(--tvn-accent);
}

.post-card-excerpt {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: #707178;
  font-size: 14px;
  line-height: 1.78;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.read-more {
  display: inline-flex;
  align-items: center;
  min-height: 41px;
  padding: 8px 24px;
  border-radius: var(--tvn-radius);
  background: var(--tvn-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  transition: background .2s ease, transform .2s ease;
}

.read-more:hover,
.read-more:focus {
  background: var(--tvn-accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.widget-area {
  min-width: 0;
}

.widget {
  margin: 0 0 28px;
  color: #686970;
}

.widget-title {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--tvn-accent);
  color: var(--tvn-text);
  font-size: 16px;
  font-weight: 800;
}

.widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget li {
  padding: 8px 0;
  border-bottom: 1px solid var(--tvn-border);
}

.widget a {
  color: var(--tvn-text);
}

.widget a:hover,
.widget a:focus {
  color: var(--tvn-accent);
}

.widget .search-field {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--tvn-border);
  border-radius: 2px;
  outline: none;
}

.page-header {
  margin: 0 0 25px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--tvn-border);
}

.page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.3;
}

.archive-description {
  margin-top: 8px;
  color: var(--tvn-muted);
}

.single-article,
.page-article {
  min-width: 0;
}

.entry-header {
  margin-bottom: 24px;
}

.entry-title {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1.2;
  letter-spacing: -1.1px;
}

.entry-thumbnail {
  margin-bottom: 28px;
}

.entry-thumbnail img {
  width: 100%;
}

.entry-content {
  font-size: 17px;
  line-height: 1.85;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  line-height: 1.35;
}

.entry-content blockquote {
  margin: 28px 0;
  padding: 10px 24px;
  border-left: 4px solid var(--tvn-accent);
  background: #f6f6f9;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td {
  padding: 10px;
  border: 1px solid var(--tvn-border);
  text-align: left;
}

.entry-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--tvn-border);
}

.post-navigation {
  margin-top: 35px;
  padding-top: 24px;
  border-top: 1px solid var(--tvn-border);
}

.nav-links {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.nav-links > * {
  max-width: 48%;
}

.pagination {
  margin-top: 40px;
}

.pagination .nav-links {
  justify-content: flex-start;
  gap: 7px;
}

.page-numbers {
  display: inline-grid;
  min-width: 38px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--tvn-border);
  color: var(--tvn-text);
  place-items: center;
}

.page-numbers.current,
.page-numbers:hover,
.page-numbers:focus {
  border-color: var(--tvn-accent);
  background: var(--tvn-accent);
  color: #fff;
}

.comments-area {
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--tvn-border);
}

.comment-list {
  padding-left: 24px;
}

.comment-body {
  margin-bottom: 22px;
}

.comment-form input:not([type="submit"]),
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--tvn-border);
}

.submit {
  padding: 10px 20px;
  border: 0;
  border-radius: var(--tvn-radius);
  background: var(--tvn-accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.nothing-found {
  padding: 38px;
  border: 1px solid var(--tvn-border);
  text-align: center;
}

.nothing-found .search-form {
  max-width: 420px;
  margin: 24px auto 0;
}

.nothing-found .search-field {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 14px;
  border: 1px solid var(--tvn-border);
}

.site-footer {
  padding: 24px 0;
  background: var(--tvn-header);
  color: #a5a6aa;
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-menu a {
  color: #d6d7da;
}

.alignwide {
  margin-right: -40px;
  margin-left: -40px;
  max-width: calc(100% + 80px);
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 1120px) {
  .header-search {
    display: none;
  }

  .site-main-wrap {
    grid-template-columns: minmax(0, 780px) minmax(220px, 1fr);
    gap: 36px;
  }

  .post-card {
    grid-template-columns: minmax(300px, 1fr) minmax(280px, 1fr);
  }
}

@media (max-width: 900px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .header-inner {
    position: relative;
    min-height: 76px;
  }

  .site-header {
    min-height: 76px;
  }

  .site-title {
    font-size: 34px;
  }

  .menu-toggle {
    display: block;
  }

  .main-navigation {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 8px 20px 18px;
    background: var(--tvn-header);
    box-shadow: 0 12px 20px rgba(0, 0, 0, .16);
  }

  .main-navigation.is-open {
    display: block;
  }

  .main-navigation ul {
    display: block;
  }

  .main-navigation li,
  .main-navigation a {
    display: block;
  }

  .main-navigation a {
    padding: 13px 12px;
  }

  .main-navigation a::after {
    display: none;
  }

  .site-main-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .widget-area {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

}

@media (max-width: 700px) {
  .tvn-container {
    width: min(calc(100% - 28px), var(--tvn-container));
  }

  .site-main-wrap {
    padding-top: 20px;
  }

  .post-list {
    gap: 34px;
  }

  .post-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .post-card-title {
    font-size: 19px;
  }

  .post-card-excerpt {
    -webkit-line-clamp: 4;
  }

  .widget-area {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .alignwide {
    margin-right: 0;
    margin-left: 0;
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .site-title {
    font-size: 29px;
    letter-spacing: -1.6px;
  }

  .site-branding {
    min-width: 0;
    padding-right: 12px;
  }

  .post-card-media {
    aspect-ratio: 4 / 3;
  }
}
