/*
Theme Name: Eco House Decor
Theme URI: https://ecohousedecor.com
Author: Eco House Decor
Description: Light, fluid and airy blog theme for Eco House Decor — sustainable home decor, eco products and DIY guides.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ecohousedecor
Tags: blog, green, light, two-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --green: #3fae5a;
  --green-bright: #4cc764;
  --green-deep: #1e7a3a;
  --green-ink: #14532d;
  --leaf-tint: #eef9f0;
  --ink: #243329;
  --ink-soft: #5c6b61;
  --bg: #fbfcfa;
  --card: #ffffff;
  --line: #e6ece7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(30, 60, 40, .06);
  --shadow-hover: 0 14px 32px rgba(30, 90, 50, .14);
  --font-display: 'Poppins', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
  --max: 1200px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--green-ink);
  line-height: 1.25;
  margin: 0 0 .5em;
  font-weight: 600;
}

a { color: var(--green-deep); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--green); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }

.screen-reader-text {
  position: absolute !important;
  clip-path: inset(50%);
  width: 1px; height: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding .custom-logo { width: 42px; height: 42px; object-fit: contain; }
.site-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
}
.site-title a { color: var(--ink); }
.brand-leaf { width: 34px; height: 34px; color: var(--green); flex: none; }

/* Nav */
.main-nav ul { list-style: none; display: flex; gap: clamp(14px, 2.5vw, 34px); margin: 0; padding: 0; }
.main-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .98rem;
  color: var(--ink);
  position: relative;
  padding: 6px 2px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--green);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.main-nav a:hover::after,
.main-nav .current-menu-item > a::after { transform: scaleX(1); }
.main-nav .current-menu-item > a { color: var(--green); }

.btn-blog {
  display: inline-block;
  background: var(--green-bright);
  color: #fff !important;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 10px 26px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(76, 199, 100, .35);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn-blog:hover { background: var(--green); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(76, 199, 100, .45); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: 76px 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 24px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: all .25s var(--ease);
    box-shadow: var(--shadow-hover);
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { display: block; padding: 12px 4px; font-size: 1.05rem; }
  .header-cta { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  max-width: var(--max);
  margin: 0 auto;
}
.hero img { width: 100%; height: clamp(280px, 48vw, 480px); object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 40%, rgba(20, 50, 30, .55) 100%);
  display: flex;
  align-items: flex-end;
  padding: clamp(20px, 4vw, 48px);
}
.hero-overlay h1 {
  color: #fff;
  font-size: clamp(1.5rem, 1.1rem + 2.4vw, 2.6rem);
  margin: 0;
  max-width: 18ch;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}

/* ==========================================================================
   Post grid
   ========================================================================== */
.section-title {
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  margin: clamp(32px, 6vw, 56px) 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "";
  width: 10px; height: 26px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--green-bright), var(--green-deep));
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(18px, 3vw, 30px);
  margin: 28px 0 56px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.card-thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 10; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-thumb img { transform: scale(1.05); }

.card-cat {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255,255,255,.92);
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
}

.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.18rem; margin: 0 0 10px; }
.card-title a { color: var(--green-ink); }
.card-title a:hover { color: var(--green); }
.card-excerpt { color: var(--ink-soft); font-size: .95rem; margin: 0 0 16px; }
.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--ink-soft);
  font-family: var(--font-display);
}
.card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green-bright); }

/* ==========================================================================
   Single post / page
   ========================================================================== */
.entry-wrap { max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) 0 64px; }

.entry-header { margin-bottom: 28px; }
.entry-header .post-cats a {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--green);
}
.entry-title { font-size: clamp(1.7rem, 1.3rem + 2vw, 2.5rem); margin: 10px 0 14px; }
.entry-meta { color: var(--ink-soft); font-size: .9rem; font-family: var(--font-display); }

.entry-thumb { border-radius: var(--radius); overflow: hidden; margin: 0 0 32px; box-shadow: var(--shadow); }
.entry-thumb img { width: 100%; }

.entry-content { font-size: 1.06rem; }
.entry-content h2 { font-size: 1.55rem; margin-top: 2em; }
.entry-content h3 { font-size: 1.25rem; margin-top: 1.6em; }
.entry-content p { margin: 0 0 1.3em; }
.entry-content a { text-decoration: underline; text-decoration-color: rgba(63,174,90,.4); text-underline-offset: 3px; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content blockquote {
  margin: 1.6em 0;
  padding: 18px 24px;
  background: var(--leaf-tint);
  border-left: 4px solid var(--green-bright);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--green-ink);
  font-style: italic;
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.3em; }
.entry-content li { margin-bottom: .45em; }
.entry-content li::marker { color: var(--green); }
.wp-block-table table, .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4em;
  font-size: .95rem;
}
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--leaf-tint); font-family: var(--font-display); }

.post-tags { margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags a {
  background: var(--leaf-tint);
  color: var(--green-deep);
  font-size: .82rem;
  font-family: var(--font-display);
  padding: 6px 14px;
  border-radius: 100px;
  transition: background .2s var(--ease);
}
.post-tags a:hover { background: #ddf3e2; }

/* Post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.post-nav a {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: .92rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.post-nav a:hover { border-color: var(--green-bright); box-shadow: var(--shadow); }
.post-nav .nav-next { text-align: right; }
.post-nav .nav-label { display: block; font-size: .74rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }

/* Related */
.related-posts { margin-top: 56px; }

/* ==========================================================================
   Archive header / pagination / search
   ========================================================================== */
.archive-header { padding: clamp(28px, 5vw, 48px) 0 0; }
.archive-header .archive-title { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
.archive-header .archive-description { color: var(--ink-soft); max-width: 60ch; }

.pagination { display: flex; justify-content: center; gap: 8px; margin: 0 0 64px; flex-wrap: wrap; }
.pagination .page-numbers {
  font-family: var(--font-display);
  font-weight: 500;
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
}
.pagination .page-numbers.current { background: var(--green-bright); border-color: var(--green-bright); color: #fff; }
.pagination .page-numbers:hover:not(.current) { border-color: var(--green-bright); color: var(--green-deep); }

.search-form-wrap { margin: 24px 0 40px; }
.search-form { display: flex; gap: 10px; max-width: 520px; }
.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font: inherit;
  background: var(--card);
}
.search-form button {
  background: var(--green-bright);
  border: 0;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.search-form button:hover { background: var(--green); }

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line); }
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-list .comment { margin-bottom: 20px; }
.comment-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
}
.comment-author { font-family: var(--font-display); font-weight: 600; }
.comment-author img { border-radius: 50%; margin-right: 10px; vertical-align: middle; }
.comment-metadata { font-size: .8rem; color: var(--ink-soft); margin: 4px 0 10px; }
.comment-list .children { list-style: none; padding-left: clamp(16px, 4vw, 40px); margin-top: 16px; }

.comment-form label { display: block; font-family: var(--font-display); font-size: .88rem; margin-bottom: 6px; }
.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font: inherit;
  background: var(--card);
  margin-bottom: 16px;
}
.comment-form .submit {
  background: var(--green-bright);
  border: 0;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .2s var(--ease);
}
.comment-form .submit:hover { background: var(--green); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--green-ink);
  color: #d6ecdd;
  margin-top: 24px;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  padding: clamp(40px, 6vw, 64px) 0 36px;
}
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.site-footer a { color: #b7dec3; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-about p { font-size: .94rem; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px 0;
  font-size: .84rem;
  text-align: center;
  color: #9fcaab;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* WP core alignment helpers */
.alignwide { max-width: 980px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption, .wp-block-image figcaption { font-size: .84rem; color: var(--ink-soft); text-align: center; margin-top: 8px; }
.sticky {}
.bypostauthor {}
