/*
Theme Name: CleanStart
Theme URI: https://example.com
Author: You
Author URI: https://example.com
Description: A simple, clean WordPress theme to get you started.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
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: cleanstart
Tags: clean, simple, blog
*/

@theme {
  --color-primary-red: #c01717;
  --color-secondary-red: #290505;
  --color-primary-text: #f5f3f4;
  --color-secondary-text: #b5b5b8;
  --color-background: #121212;
  --color-primary-card: #1f2122;
  --color-secondary-card: #3d4145;
  --color-page-background: #0a0a0a;
  --color-border-primary: #333638
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  background: var(--color-page-background);
}

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

a:hover {
  text-decoration: underline;
}

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

/* ===========================
   LAYOUT
=========================== */
.site-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===========================
   HEADER
=========================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 1.5rem 0;
  margin-bottom: 2.5rem;
}

.site-header .site-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-branding .site-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-branding .site-title a {
  color: #111;
}

.site-branding .site-description {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.15rem;
}

/* ===========================
   NAVIGATION
=========================== */
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.main-navigation ul li a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  transition: color 0.2s;
}

.main-navigation ul li a:hover {
  color: #0073aa;
  text-decoration: none;
}

/* ===========================
   MAIN CONTENT
=========================== */
.site-content {
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

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

/* ===========================
   POSTS / ARTICLES
=========================== */
.post {
  border-radius: 8px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.entry-header {
  padding-bottom: 1rem;
}

.entry-header .entry-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.entry-header .entry-title a {
  color: var(--color-primary-text);
}

.entry-meta {
  font-size: 0.8rem;
  color: var(--color-secondary-text);
}

.entry-meta a {
  color: var(--color-secondary-text);
}

.entry-content {
  font-size: 0.975rem;
  color: var(--color-primary-text);
  margin-top: 2rem;
}

.entry-content p {
  margin-bottom: 1rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 1.5rem 0 0.75rem;
  font-weight: 700;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-red);
}

/* ===========================
   SIDEBAR
=========================== */
.widget-area {
  align-self: start;
}

.widget {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.widget ul {
  list-style: none;
}

.widget ul li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #f3f3f3;
  font-size: 0.9rem;
}

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

/* ===========================
   PAGINATION
=========================== */
.pagination {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 2rem;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 0.85rem;
  color: #555;
  background: #fff;
}

.pagination .current {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: #fff;
  border-top: 1px solid #e5e5e5;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: #aaa;
}

/* ===========================
   SINGLE POST
=========================== */
.single .site-content {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.single .post {
  padding: 2rem;
}

.single .entry-title {
  font-size: 2rem;
  color: var(--color-primary-text);
}

/* ===========================
   PAGE NOT FOUND / SEARCH
=========================== */
.not-found-content,
.search-no-results {
  text-align: center;
  padding: 3rem 0;
  color: #999;
}

/* ===========================
   CSS VARIABLES
=========================== */
:root {
  --color-primary-red: #c01717;
  --color-secondary-red: #290505;
  --color-primary-text: #f5f3f4;
  --color-secondary-text: #b5b5b8;
  --color-background: #121212;
  --color-primary-card: #1f2122;
  --color-secondary-card: #3d4145;
  --color-page-background: #0a0a0a;
  --color-border-primary: #333638;
}

/* ===========================
   NAVBAR
=========================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  color: var(--color-primary-text);
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

/* Push page content below the fixed navbar */
body {
  padding-top: 64px;
}

.navbar-inner {
  width: 83.333%;
  max-width: 112.5rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.navbar-column {
  display: flex;
  flex-direction: column;
}

/* Top bar row */
.navbar-topbar {
  display: flex;
  align-items: center;
  height: 64px;
  width: 100%;
}

/* Logo */
.navbar-logo {
  flex: 1;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-logo img {
  height: 40px;
  width: auto;
}

.navbar-site-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: inherit;
  letter-spacing: -0.02em;
}

/* Desktop nav links */
.navbar-links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-primary-text);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary-red);
  text-decoration: none;
}

/* Right-side actions */
.navbar-actions {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}

/* Hamburger — hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0.25rem;
  line-height: 1;
}

.menu-toggle svg {
  display: block;
}

/* CTA button */
.navbar-cta {
  display: inline-block;
  background: var(--color-primary-red);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.navbar-cta:hover {
  background: #a01313;
  text-decoration: none;
  opacity: 0.9;
}

/* ── Scrolled state ───────────────── */
#navbar.scrolled {
  background-color: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid #404040;
  color: white;
}

#navbar.scrolled .nav-link {
  color: white;
}

#navbar.scrolled .nav-link:hover,
#navbar.scrolled .nav-link.active {
  color: var(--color-primary-red);
}

/* ── same-color (transparent over matching bg) ── */
#navbar.same-color,
#navbar.same-color .nav-link {
  color: white;
}

/* ===========================
   MOBILE MENU
=========================== */
.mobile-menu {
  display: none;
  /* hidden by default, shown via JS */
  width: 100%;
  padding-bottom: 1rem;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--color-border-primary);
}

.wp-block-separator {
  border: none;
  margin: 0;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--color-primary-text);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border-primary);
  transition: background 0.15s, color 0.15s;
}

.mobile-link:last-child {
  border-bottom: none;
}

.mobile-link:hover,
.mobile-link.active {
  background: rgba(192, 23, 23, 0.12);
  color: var(--color-primary-red);
  text-decoration: none;
}

/* ── Responsive breakpoint ─────────── */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    /* hide desktop links on mobile */
  }

  .menu-toggle {
    display: block;
  }
}

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: var(--color-primary-text);
  color: var(--color-primary-card);
  padding: 5rem 1rem;
  border-top: none;
  /* override earlier rule */
  text-align: left;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

/* ── Nav links column ── */
.footer-links {
  flex: 1 1 160px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link-row svg {
  flex-shrink: 0;
  stroke: var(--color-primary-card);
  opacity: 0.6;
}

.footer-link-row a {
  color: var(--color-primary-card);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link-row a:hover {
  color: var(--color-primary-red);
  text-decoration: none;
}

/* ── Legal + social column ── */
.footer-legal {
  flex: 2 1 280px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--color-primary-card);
  opacity: 0.75;
}

/* Social icons row */
.footer-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 36px;
  padding: 8px;
}

.footer-social-link:hover {
  background: var(--color-primary-red);
  color: #fff;
  border-color: var(--color-primary-red);
}

.footer-social-link svg {
  display: block;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-primary-red)
}

.footer-wave {
  display: block;
}

.site-footer {
  padding-bottom: 8rem;
}

.entry-thumbnail-link {
  display: block;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: 16px;
}

.entry-thumbnail {
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.entry-thumbnail.wp-post-image {
  width: 100%;
  object-fit: cover;
  height: 220px;
  border-radius: 16px;
}

.share-button {
  position: fixed;
  right: 20px;
  /* Distance from right edge */
  bottom: 0%;
  /* Center vertically */
  transform: translateY(-50%);
  /* Perfect vertical centering */
  z-index: 9999;
  /* Stay on top of all other elements */
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  /* Makes it a circle */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.footer-social-link:hover {
  transform: scale(1.1);
  /* Slight pop on hover */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.footer-social-link svg {
  width: 24px;
  height: 24px;
  fill: white;
  /* Assumes your SVG is a path icon */
}

/* Optional: Hide on very small screens if it covers content */
@media (max-width: 600px) {
  .share-button {
    right: 10px;
  }
}

.custom-logo {
  height: 2.5rem;
  width: auto;
}

.navbar-logo a {
  display: flex;
  align-items: center;
}

.navbar-logo img {
  height: 2.5rem;
  width: auto;
}

.title-blog {
  text-align: center;
  color: white;
  font-size: 3rem;
}

/* Layout containers */
.footer-top-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 4rem;
  /* Replicates gap-16 from Astro */
}

.footer-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col h3 {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-primary-card);
}

.footer-col a {
  color: var(--color-primary-card);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--color-primary-red);
}

.footer-bottom {
  padding-top: 2rem;
}

/* Ensure icons handle color correctly */
.footer-social-link svg {
  width: 24px;
  height: 24px;
  /* This makes GitHub and Mail icons visible on white backgrounds */
  fill: currentColor;
}

/* Brand-specific icon colors */
.footer-social-link[style*="#ffffff"] svg {
  fill: #000000;
  /* Makes GitHub/Mail black on their white circles */
}
