/*
Theme Name: Flavor Starter
Theme URI: https://example.com/flavor-starter
Author: flavor
Author URI: https://example.com
Description: Lightweight two-column WordPress theme with vibrant purple-violet-blue gradients, mobile-responsive, easy to customize.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: flavor-starter
Tags: two-columns, right-sidebar, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   CSS VARIABLES — edit these to re-skin the entire theme
   ========================================================================== */

.custom-logo {
    width: auto !important;
    height: auto !important;
    max-height: 50px;
}

h2, h3 {
  margin-bottom: 10px; /* мобильные */
}

@media (min-width: 768px) {
  h2, h3 {
    margin-bottom: 20px; /* планшеты и десктоп */
  }
}


:root {
  /* ---- Brand colours ---- */
  --c-primary:     #7c3aed;          /* violet-600  */
  --c-primary-light: #a78bfa;        /* violet-400  */
  --c-secondary:   #6366f1;          /* indigo-500  */
  --c-accent:      #c026d3;          /* fuchsia-600 */
  --c-accent-light:#e879f9;          /* fuchsia-400 */

  /* ---- Gradients ---- */
  --grad-hero:     linear-gradient(135deg, #4f46e5 0%, #7c3aed 40%, #c026d3 100%);
  --grad-card:     linear-gradient(160deg, rgba(124,58,237,.06) 0%, rgba(192,38,211,.06) 100%);
  --grad-btn:      linear-gradient(135deg, #7c3aed 0%, #c026d3 100%);
  --grad-footer:   linear-gradient(135deg, #312e81 0%, #4c1d95 50%, #701a75 100%);

  /* ---- Neutrals ---- */
  --c-bg:          #faf9ff;
  --c-surface:     #ffffff;
  --c-text:        #1e1b34;
  --c-text-muted:  #6b6880;
  --c-border:      #e4e0f0;

  /* ---- Spacing & Sizing ---- */
  --width-max:     1200px;
  --sidebar-width: 320px;
  --gap:           2rem;
  --radius:        12px;
  --radius-sm:     8px;

  /* ---- Typography ---- */
  --font-body:     'Nunito', sans-serif;
  --font-heading:  'Outfit', sans-serif;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-accent); }

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-text);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--width-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* Two-column layout */
.site-content {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--gap);
  padding-top: var(--gap);
  padding-bottom: calc(var(--gap) * 2);
}

.main-area  { min-width: 0; }
.sidebar    { min-width: 0; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  background: var(--grad-hero);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(79,70,229,.3);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-branding a {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}

.site-branding .tagline {
  display: none;             /* hidden by default; enable in header.php */
  font-size: .8rem;
  opacity: .75;
  font-weight: 400;
}

/* ---- Primary Navigation ---- */
.primary-nav ul {
  display: flex;
  list-style: none;
  gap: .25rem;
}

.primary-nav a {
  display: block;
  padding: .45rem 1rem;
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,.4);
  color: #fff;
  padding: .4rem .7rem;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
}

/* ==========================================================================
   HERO BANNER (optional — shows only on front page)
   ========================================================================== */
.hero-banner {
  background: var(--grad-hero);
  color: #fff;
  text-align: center;
  padding: 4rem var(--gap);
}

.hero-banner h1 {
  color: #fff;
  font-size: 2.6rem;
  margin-bottom: .75rem;
}

.hero-banner p {
  font-size: 1.15rem;
  opacity: .85;
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   CARDS / POSTS
   ========================================================================== */
.post-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--gap);
  transition: transform .25s, box-shadow .25s;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(124,58,237,.12);
}

.post-card__thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.post-card__body {
  padding: 1.5rem;
}

.post-card__meta {
  font-size: .82rem;
  color: var(--c-text-muted);
  margin-bottom: .5rem;
}

.post-card__meta a { color: var(--c-primary); font-weight: 600; }

.post-card__title {
  font-size: 1.35rem;
  margin-bottom: .5rem;
}

.post-card__title a { color: var(--c-text); }
.post-card__title a:hover { color: var(--c-primary); }

.post-card__excerpt {
  color: var(--c-text-muted);
  font-size: .95rem;
}

/* ==========================================================================
   SINGLE POST / PAGE
   ========================================================================== */
.entry-header { margin-bottom: 1.5rem; }

.entry-title { margin-bottom: .4rem; }

.entry-meta {
  font-size: .85rem;
  color: var(--c-text-muted);
}

.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.entry-content p          { margin-bottom: 1.25rem; }
.entry-content h2         { margin: 2rem 0 .75rem; }
.entry-content h3         { margin: 1.5rem 0 .5rem; }
.entry-content blockquote {
  border-left: 4px solid var(--c-primary);
  background: var(--grad-card);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--c-text-muted);
}

.entry-content pre {
  background: transparent;
  color: var(--c-text);
  border: none;
  padding: 0;
  overflow-x: auto;
  font-size: .95rem;
  margin-bottom: 1.25rem;
}

.entry-content code {
  font-size: .9em;
}

.entry-content pre code {
  font-size: inherit;
}

/* WordPress blocks — no separate styling, just flow with content */
.entry-content .wp-block-html,
.entry-content .wp-block-code,
.entry-content .wp-block-preformatted,
.entry-content .wp-block-verse,
.wp-block-code,
.wp-block-preformatted,
.wp-block-verse,
.wp-block-html,
article .wp-block-html,
article .wp-block-code {
  background: transparent;
  color: var(--c-text);
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-body);
  font-size: inherit;
  line-height: inherit;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-block;
  padding: .65rem 1.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .95rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}

.btn:hover { opacity: .9; transform: translateY(-1px); }

.btn-primary {
  background: var(--grad-btn);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--c-primary);
  color: var(--c-primary);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.widget {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: var(--gap);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .65rem;
  border-bottom: 3px solid transparent;
  border-image: var(--grad-btn) 1;
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: .4rem 0;
  border-bottom: 1px solid var(--c-border);
}

.widget li:last-child { border-bottom: none; }

.widget a {
  font-size: .93rem;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-top: var(--gap);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
}

.pagination .current {
  background: var(--grad-btn);
  color: #fff;
  border-color: transparent;
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */
.comments-area { margin-top: 2.5rem; }

.comment-list {
  list-style: none;
}

.comment-body {
  padding: 1.25rem;
  background: var(--grad-card);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.comment-author img {
  border-radius: 50%;
  margin-right: .5rem;
  vertical-align: middle;
}

/* Comment form */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  margin-bottom: .75rem;
  transition: border-color .2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.comment-form .submit {
  background: var(--grad-btn);
  color: #fff;
  padding: .65rem 2rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--grad-footer);
  color: rgba(255,255,255,.75);
  padding: 2.5rem 0;
  margin-top: auto;
  font-size: .9rem;
}

.site-footer a { color: var(--c-accent-light); }
.site-footer a:hover { color: #fff; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

/* ==========================================================================
   RESPONSIVE — tablets
   ========================================================================== */
@media (max-width: 900px) {
  .site-content {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
}

/* ==========================================================================
   RESPONSIVE — phones
   ========================================================================== */
@media (max-width: 600px) {
  body { font-size: 16px; }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }

  .site-header .container { height: 56px; }

  .primary-nav { display: none; }
  .primary-nav.is-open {
    display: block;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: calc(100vh - 56px);
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--grad-hero);
    padding: 1rem var(--gap) 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,.2);
    z-index: 99;
  }

  .primary-nav.is-open ul {
    flex-direction: column;
  }

  .menu-toggle { display: block; }

  .hero-banner { padding: 2.5rem var(--gap); }
  .hero-banner h1 { font-size: 1.8rem; }

  .post-card__body { padding: 1.1rem; }

  .footer-inner { flex-direction: column; text-align: center; }

}

/* ==========================================================================
   IMAGE ZOOM (desktop + mobile)
   ========================================================================== */
.entry-content img:not(.flavor-zoomed),
.entry-thumb img:not(.flavor-zoomed) {
  cursor: zoom-in;
  transition: transform .3s ease;
}

.entry-content .ff-grid img,
.entry-content .flavor-filter img {
  cursor: pointer;
}

.entry-content img.flavor-zoomed,
.entry-thumb img.flavor-zoomed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  object-fit: contain;
  z-index: 9999;
  background: rgba(0, 0, 0, .9);
  cursor: zoom-out;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ==========================================================================
   IMAGE GRADIENT BORDER (inside entries)
   ========================================================================== */
.entry-content img,
.entry-thumb img {
  border: 3px solid transparent;
  border-radius: var(--radius-sm);
  background-clip: padding-box;
  outline: 3px solid transparent;
  outline-offset: 0px;
  background-image:
    linear-gradient(var(--c-surface), var(--c-surface)),
    linear-gradient(135deg, #7c3aed 0%, #c026d3 40%, #f59e0b 70%, #3b82f6 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* Reset gradient border for images inside Flavor Filter results */
.entry-content .ff-grid img,
.entry-content .flavor-filter img {
  border: none;
  background-image: none;
  outline: none;
  border-radius: var(--radius-sm);
}

.entry-content .flavor-zoomed,
.entry-thumb .flavor-zoomed {
  border: none !important;
  background-image: none !important;
  border-radius: 0 !important;
}

/* ==========================================================================
   MOBILE TAXONOMY MENU (burger)
   ========================================================================== */
.mobile-taxonomy-nav {
  display: none;
}

.primary-nav.is-open .mobile-taxonomy-nav {
  display: block;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.15);
}

.mobile-tax-group {
  margin-bottom: .85rem;
}

.mobile-tax-group__title {
  display: block;
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: .3rem .75rem;
  margin-bottom: .35rem;
  color: rgba(255,255,255,.55);
  border-left: 3px solid var(--mtg-accent, rgba(255,255,255,.3));
}

.mobile-tax-group__items {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: 0;
  margin: 0;
}

.mobile-tax-group__items li {
  margin: 0;
  padding: 0;
  border: none;
}

.mobile-tax-group__items a {
  display: inline-block;
  padding: .3rem .7rem;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  background: var(--mtg-bg, rgba(255,255,255,.08));
  border: 1px solid var(--mtg-border, rgba(255,255,255,.12));
  border-radius: 6px;
  transition: background .2s, border-color .2s;
  text-decoration: none;
}

.mobile-tax-group__items a:hover {
  background: var(--mtg-bg-hover, rgba(255,255,255,.18));
  border-color: var(--mtg-accent, rgba(255,255,255,.3));
  color: #fff;
}

.mobile-tax-group__items .term-count {
  font-size: .7rem;
  opacity: .5;
  margin-left: .2rem;
}

/* Color palettes for taxonomy groups — muted, not overwhelming */
.mobile-tax-group:nth-child(6n+1) {
  --mtg-accent: #a78bfa;
  --mtg-bg: rgba(167,139,250,.10);
  --mtg-border: rgba(167,139,250,.18);
  --mtg-bg-hover: rgba(167,139,250,.22);
}
.mobile-tax-group:nth-child(6n+2) {
  --mtg-accent: #60a5fa;
  --mtg-bg: rgba(96,165,250,.10);
  --mtg-border: rgba(96,165,250,.18);
  --mtg-bg-hover: rgba(96,165,250,.22);
}
.mobile-tax-group:nth-child(6n+3) {
  --mtg-accent: #34d399;
  --mtg-bg: rgba(52,211,153,.10);
  --mtg-border: rgba(52,211,153,.18);
  --mtg-bg-hover: rgba(52,211,153,.22);
}
.mobile-tax-group:nth-child(6n+4) {
  --mtg-accent: #fbbf24;
  --mtg-bg: rgba(251,191,36,.10);
  --mtg-border: rgba(251,191,36,.18);
  --mtg-bg-hover: rgba(251,191,36,.22);
}
.mobile-tax-group:nth-child(6n+5) {
  --mtg-accent: #f472b6;
  --mtg-bg: rgba(244,114,182,.10);
  --mtg-border: rgba(244,114,182,.18);
  --mtg-bg-hover: rgba(244,114,182,.22);
}
.mobile-tax-group:nth-child(6n+6) {
  --mtg-accent: #fb923c;
  --mtg-bg: rgba(251,146,60,.10);
  --mtg-border: rgba(251,146,60,.18);
  --mtg-bg-hover: rgba(251,146,60,.22);
}

.alignwide  { margin-left: -2rem; margin-right: -2rem; }
.alignfull  { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); width: 100vw; }
.text-center { text-align: center; }

/* ---- Scroll to top ---- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--grad-btn);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, transform .2s;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(124,58,237,.3);
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
}

@media (max-width: 600px) {
  .scroll-top {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }
}

/* ---- News single — layout & no-frame thumbnail ---- */
.site-content--news {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--gap);
  padding-top: var(--gap);
  padding-bottom: calc(var(--gap) * 2);
}

.news-date {
  font-size: .9rem;
  font-weight: 600;
  color: #7c3aed;
  margin-top: .3rem;
}

.entry-thumb--news img {
  border: none;
  border-radius: var(--radius);
  width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .site-content--news {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .sidebar--news {
    display: none !important;
  }
}

/* ---- Recent news widget ---- */
.recent-news-list {
  list-style: none;
}

.recent-news-item {
  padding: .5rem 0;
  border-bottom: 1px solid var(--c-border);
  line-height: 1.4;
}

.recent-news-item:last-child {
  border-bottom: none;
}

.recent-news-date {
  font-size: .78rem;
  font-weight: 700;
  color: var(--c-primary);
  white-space: nowrap;
}

.recent-news-item a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-text);
  text-decoration: none;
  transition: color .2s;
}

.recent-news-item a:hover {
  color: var(--c-primary);
}