/*
 Theme Name: Soltoa-DIY
 Theme URI: https://www.soltoa.com/
 Description: DIY blog theme for Soltoa (Solutions To A Problem).
 Author: David Hazar
 Version: 1.0
 Text Domain: soltoa-diy
*/

/* ==========================
   Design tokens
========================== */

:root {
  --color-bg: #ffffff;
  --color-accent: #165c7d;
  --color-text: #000000;
  --color-muted: #777777;
  --radius-lg: 16px;
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* ==========================
   Base
========================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

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

/* ==========================
   Layout
========================== */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* ==========================
   Header
========================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.custom-logo {
  width: auto;
  display: block;
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-accent);
  white-space: nowrap;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Main nav */

.site-nav {
  /* desktop: visible; mobile handled in media queries */
}

.main-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;        /* more spacing between items */
  font-size: 0.95rem;  /* slightly larger font like before */
  font-weight: 600;    /* stronger weight — this is what you saw earlier */
  letter-spacing: 0.02em;
}

.main-menu li {
  margin: 0;
}

.main-menu a {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: var(--color-text);
  transition: background 200ms ease, color 200ms ease;
  text-decoration: none;   /* <-- Important */
}

.main-menu a:hover,
.main-menu a:focus-visible {
  background: #10485e;     /* darker blue like before */
  color: #ffffff;
  text-decoration: none;   /* <-- Prevent underline on hover */
}

/* Search / header actions */

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.search-form {
  margin: 0;
}

.search-input,
.search-form input[type="search"] {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.4rem 0.9rem;
  min-width: 180px;
  font-size: 0.85rem;
  font-family: inherit;
}

.search-input:focus,
.search-form input[type="search"]:focus {
  outline: 2px solid rgba(22, 92, 125, 0.4);
  outline-offset: 1px;
}

/* ==========================
   Hero section
========================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.75rem;
  margin-bottom: 2.25rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(22, 92, 125, 0.08);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 2rem;
  margin: 0.75rem 0 0.25rem;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  margin: 0.4rem 0 0.9rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pill {
  display: inline-flex;
  white-space: nowrap;
  align-items: flex-end;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.78rem;
  color: var(--color-muted);
}

/* Hero card */

.hero-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;
  max-height: 100%;
  max-width: 100%;
}

.hero-thumb {
  position: relative;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #e1ecf1;
}

.hero-thumb img {
  display: block;
}

.hero-thumb iframe {
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

.hero-thumb-label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.hero-video-container {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-video-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
}

.hero-card .article-category,
.hero-card .article-title,
.hero-card .article-excerpt,
.hero-card .article-meta-row {
  padding: 0 1.1rem;
}

.hero-card .article-category {
  margin-top: 0.9rem;
}

/* ==========================
   Section titles / layout
========================== */

.section-title {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title span {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* Main content + sidebar */

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2rem;
}

/* ==========================
   Article cards & grid
========================== */

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}

.article-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 180px;
  overflow: hidden;
  border-radius: 12px;
  background: #e1ecf1;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.article-card {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(22, 92, 125, 0.25);
}

.article-body {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.article-category {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-muted);
}

.article-title {
  font-size: 1.05rem;
  margin: 0;
}

.article-title a {
  color: var(--color-text);
}

.article-title a:hover {
  color: var(--color-accent);
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0.1rem 0 0.35rem;
}

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* Tag pill */

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(22, 92, 125, 0.08);
  color: var(--color-accent);
  font-size: 0.78rem;
}

/* ==========================
   Sidebar
========================== */

aside {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  padding: 1rem 1.1rem;
  font-size: 0.9rem;
}

.sidebar-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.sidebar-list li {
  margin-bottom: 0.35rem;
}

.sidebar-list small {
  color: var(--color-muted);
}

/* Tag cloud inside sidebar */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-cloud a {
  font-size: 0.75rem !important;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ==========================
   Video section
========================== */

.video-section {
  margin-top: 3rem;
}

.video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.6rem;
  align-items: flex-start;
}

.video-wrapper iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-lg);
}

.video-details h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

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

/* ==========================
   Single posts / featured image
========================== */

.post-thumbnail img,
.single-post .post-thumbnail img,
.article-thumb img {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: cover;
}

/* ==========================
   Footer
========================== */

footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.25rem 1.25rem 2rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer-inner a {
  color: inherit;
}

/* ==========================
   Responsive
========================== */

/* Stack hero / grids at tablet sizes */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

/* Smaller phones: tweak hero headline spacing */
@media (max-width: 600px) {
  .hero-title {
    font-size: 1.65rem;
  }

  main {
    margin-top: 1rem;
  }

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

/* HIDE MENU + SHOW BURGER ON MOBILE */

/* Desktop: normal nav, hide hamburger */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
  }
}

/* Mobile: hamburger visible, full-width dropdown menu */
@media (max-width: 768px) {
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between; /* keep logo left, search on right */
    gap: 0.75rem;
    position: relative;
  }

  .nav-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  /* Hamburger button */
  .mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
  }

  .mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: #165c7d;
    border-radius: 3px;
    display: block;
  }

  /* Hide nav by default on mobile: full-width under header */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    background: #ffffff;
    border-top: 1px solid #165c7d;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 20;

    /* simple “animation” feel */
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  /* Show when opened (JS toggles .is-open) */
  .site-nav.is-open {
    display: block;
    overflow: visible;
    opacity: 1;
    transform: translateY(0);
  }

  /* Stack menu items vertically */
  .main-menu {
    display: flex;
    flex-direction: column;
    align: center;
    list-style: none;
    margin: 4px 6px 0px 6px;
    padding: 0;
    gap: 0;
  }

  .main-menu li {
    display: flex;
    margin 0;
    gap: 0;
  }

  .main-menu a {
    display: block;
    white-space: nowrap;
    padding: 2px 12px 2px 12px;
    margin 0;
    gap: 0;
  }
}

