/*
Theme Name: EirStates
Theme URI: https://eirstates.com
Author: EirStates
Author URI: https://eirstates.com
Description: Official EirStates blog theme — refined, editorial, Irish-inspired.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: eirstates
*/

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Variables ──────────────────────────────────────────── */
:root {
  --cream:  #f5f0e8;
  --ink:    #1a1a18;
  --moss:   #3d5a3e;
  --gold:   #b08c52;
  --mist:   #d4cfc6;
  --mid:    #4a4a44;
  --light:  #ede8df;
}

/* ─── Base ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
  opacity: 0.4;
}

/* Top border */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--moss), var(--gold), transparent);
  z-index: 200;
}

a { color: var(--moss); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

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

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.4rem; color: var(--mid); }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 2px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink);
}

blockquote cite {
  display: block;
  font-size: 0.8rem;
  font-family: 'Jost', sans-serif;
  font-style: normal;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.6rem;
}

pre, code {
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  background: var(--light);
  border-radius: 4px;
}

code { padding: 0.1em 0.4em; }

pre {
  padding: 1.2rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 2px solid var(--mist);
}

pre code { background: none; padding: 0; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1.4rem; color: var(--mid); }
li { margin-bottom: 0.4rem; }

hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mist), transparent);
  margin: 3rem auto;
  max-width: 320px;
}

/* ─── Layout ─────────────────────────────────────────────── */
.site-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.site-content {
  padding: 4rem 0 6rem;
}

/* ─── Site Header ────────────────────────────────────────── */
.site-header {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--mist);
}

.site-header .ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.site-header .ornament-line {
  width: 40px;
  height: 1px;
  background: var(--gold);
}

.site-header .ornament-diamond {
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}

.site-branding a {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}

.site-branding a em {
  font-style: italic;
  color: var(--moss);
}

.site-branding a:hover { color: var(--ink); }

.site-tagline {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.8rem;
}

/* ─── Navigation ─────────────────────────────────────────── */
.site-nav {
  margin-top: 1.8rem;
}

.site-nav ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2rem 2rem;
}

.site-nav ul li { margin: 0; }

.site-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover,
.site-nav .current-menu-item a {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

/* ─── Blog Index ─────────────────────────────────────────── */
.blog-header {
  text-align: center;
  padding: 3rem 0 3.5rem;
}

.blog-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
  display: block;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

/* ─── Post Card ──────────────────────────────────────────── */
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--mist);
  transition: border-color 0.25s, transform 0.25s;
}

.post-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.post-card-thumb {
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--light);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.03);
}

.post-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-thumb-placeholder svg {
  opacity: 0.2;
}

.post-card-body {
  padding: 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-meta {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.post-card-meta .dot {
  width: 3px; height: 3px;
  background: var(--mist);
  border-radius: 50%;
  display: inline-block;
}

.post-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 300;
  line-height: 1.25;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--moss); }

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.65;
  margin-bottom: 1.4rem;
  flex: 1;
}

.post-card-readmore {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moss);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  border-bottom: 1px solid var(--moss);
  padding-bottom: 1px;
  width: fit-content;
  transition: color 0.2s, border-color 0.2s;
}

.post-card-readmore:hover { color: var(--gold); border-bottom-color: var(--gold); }
.post-card-readmore::after { content: '→'; }

/* ─── Featured Post ──────────────────────────────────────── */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--mist);
  margin-bottom: 3.5rem;
  transition: border-color 0.25s;
}

.featured-post:hover { border-color: var(--gold); }

.featured-post-thumb {
  overflow: hidden;
  min-height: 360px;
  background: var(--light);
}

.featured-post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.featured-post:hover .featured-post-thumb img { transform: scale(1.03); }

.featured-post-body {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-badge {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--moss);
  padding: 0.3rem 0.8rem;
  display: inline-block;
  margin-bottom: 1.2rem;
  width: fit-content;
}

.featured-post-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}

.featured-post-title a { color: var(--ink); }
.featured-post-title a:hover { color: var(--moss); }

/* ─── Single Post ────────────────────────────────────────── */
.post-hero {
  text-align: center;
  padding: 4rem 0 3rem;
  max-width: 760px;
  margin: 0 auto;
}

.post-hero .post-meta {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-hero .post-meta .sep {
  width: 3px; height: 3px;
  background: var(--mist);
  border-radius: 50%;
  display: inline-block;
}

.post-hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-bottom: 1.2rem;
  line-height: 1.1;
}

.post-hero .post-subtitle {
  font-size: 1.1rem;
  color: var(--mid);
  max-width: 600px;
  margin: 0 auto;
}

.post-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0;
}

.post-divider-line {
  width: 48px;
  height: 1px;
  background: var(--gold);
}

.post-divider-diamond {
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}

.post-featured-image {
  margin: 0 0 3.5rem;
  overflow: hidden;
  max-height: 520px;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.post-content { font-size: 1.05rem; line-height: 1.85; }

.post-content h2 {
  margin: 2.5rem 0 1rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.post-content h3 {
  margin: 2rem 0 0.8rem;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.post-content p { color: var(--mid); }

.post-content img {
  margin: 2rem auto;
  max-width: 100%;
}

.post-content .wp-caption {
  text-align: center;
  margin: 2rem auto;
}

.post-content .wp-caption-text {
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
  font-style: italic;
}

.post-footer {
  max-width: 720px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--mist);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.post-tag {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss);
  border: 1px solid var(--moss);
  padding: 0.25rem 0.7rem;
  transition: background 0.2s, color 0.2s;
}

.post-tag:hover {
  background: var(--moss);
  color: var(--cream);
}

/* ─── Author Box ─────────────────────────────────────────── */
.author-box {
  max-width: 720px;
  margin: 3rem auto;
  padding: 2rem;
  border: 1px solid var(--mist);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.author-avatar img {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.author-bio { font-size: 0.9rem; color: var(--mid); margin: 0; }

/* ─── Related Posts ──────────────────────────────────────── */
.related-posts {
  max-width: 720px;
  margin: 4rem auto 0;
}

.related-posts h3 {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.8rem;
  font-weight: 400;
}

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

.related-post-item h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.related-post-item h4 a { color: var(--ink); }
.related-post-item h4 a:hover { color: var(--moss); }

.related-post-item .post-date {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── Comments ───────────────────────────────────────────── */
.comments-area {
  max-width: 720px;
  margin: 4rem auto 0;
  padding-top: 3rem;
  border-top: 1px solid var(--mist);
}

.comments-title {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  font-weight: 400;
}

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

.comment-body {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--light);
}

.comment-author { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; }
.comment-metadata { font-size: 0.75rem; color: var(--gold); letter-spacing: 0.1em; margin: 0.3rem 0 0.8rem; }
.comment-content p { font-size: 0.95rem; color: var(--mid); }

/* Comment Form */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--mist);
  padding: 0.8rem 1rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 1rem;
  transition: border-color 0.2s;
  outline: none;
  appearance: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--gold);
}

.comment-form textarea { min-height: 140px; resize: vertical; }

.comment-form label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.4rem;
}

.comment-form input[type="submit"] {
  background: var(--moss);
  color: var(--cream);
  border: none;
  padding: 0.75rem 2rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s;
  width: auto;
  margin-bottom: 0;
}

.comment-form input[type="submit"]:hover { background: #2e4430; }

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar-widget {
  margin-bottom: 2.5rem;
}

.sidebar-widget-title {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--mist);
  margin-bottom: 1.2rem;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
}

.sidebar-widget ul { list-style: none; padding: 0; }
.sidebar-widget ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--light);
  font-size: 0.9rem;
  color: var(--mid);
}

.sidebar-widget ul li a { color: var(--mid); }
.sidebar-widget ul li a:hover { color: var(--moss); }

/* ─── Pagination ─────────────────────────────────────────── */
.pagination {
  text-align: center;
  padding: 3rem 0 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.page-numbers {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mist);
  color: var(--mid);
  transition: all 0.2s;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--moss);
  border-color: var(--moss);
  color: var(--cream);
}

/* ─── Site Footer ────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--mist);
  padding: 2.5rem 0;
  text-align: center;
}

.footer-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.footer-ornament-line { width: 32px; height: 1px; background: var(--mist); }
.footer-ornament-diamond { width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--mist);
}

/* ─── Search Form ────────────────────────────────────────── */
.search-form {
  display: flex;
  gap: 0;
  max-width: 400px;
  margin: 0 auto;
}

.search-form input[type="search"] {
  flex: 1;
  background: transparent;
  border: 1px solid var(--mist);
  border-right: none;
  padding: 0.6rem 1rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  outline: none;
  appearance: none;
}

.search-form input:focus { border-color: var(--gold); }

.search-form button {
  background: var(--moss);
  color: var(--cream);
  border: 1px solid var(--moss);
  padding: 0.6rem 1.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  transition: background 0.2s;
}

.search-form button:hover { background: #2e4430; }

/* ─── Category / Tag Archive ─────────────────────────────── */
.archive-header {
  text-align: center;
  padding: 3rem 0 3.5rem;
}

.archive-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.archive-description { max-width: 540px; margin: 1rem auto 0; font-size: 0.95rem; color: var(--mid); }

/* ─── 404 / No Results ───────────────────────────────────── */
.not-found {
  text-align: center;
  padding: 6rem 2rem;
}

.not-found h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  color: var(--mist);
  margin-bottom: 0.5rem;
}

.not-found p { color: var(--mid); max-width: 400px; margin: 0.5rem auto 2rem; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-post-thumb { min-height: 220px; }
  .featured-post-body { padding: 1.8rem; }

  .posts-grid { grid-template-columns: 1fr; }

  .author-box { flex-direction: column; }

  .post-footer { flex-direction: column; }

  .site-wrapper { padding: 0 1.2rem; }
}

@media (max-width: 480px) {
  .site-branding a { font-size: 2.2rem; }
  .site-header { padding: 2.5rem 0 2rem; }
  .site-content { padding: 2.5rem 0 4rem; }
}
