/*
Theme Name: SnailWorld Lite
Theme URI: https://thesnailworld.com
Author: The Snail World
Author URI: https://thesnailworld.com
Description: A fast, clean, AdSense-friendly WordPress theme built for The Snail World. Lightweight, no bloat, semantic markup, nature-inspired color palette.
Version: 1.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: snailworld-lite
*/

/* ==========================================================================
   1. CSS VARIABLES — NATURE / SNAIL COLOR PALETTE
   ========================================================================== */
:root{
  --color-bg: #FAF6EE;          /* warm cream background */
  --color-surface: #FFFFFF;     /* card / content background */
  --color-text: #2E2A22;        /* dark charcoal-brown text */
  --color-text-muted: #6B6355;  /* muted brown-gray for secondary text */
  --color-primary: #4A6741;     /* moss green - primary brand color */
  --color-primary-dark: #35492F;/* darker moss green - hover states */
  --color-accent: #A0623A;      /* shell / terracotta brown - accents */
  --color-accent-light: #C98A5E;/* lighter terracotta - hover */
  --color-border: #E4DCC9;      /* soft tan border */
  --color-link: #4A6741;
  --color-link-hover: #A0623A;
  --max-width: 1180px;
  --content-width: 760px;
  --radius: 6px;
  --font-base: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Fraunces', Georgia, "Times New Roman", serif;
}

/* ==========================================================================
   2. RESET / BASE
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-base);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: var(--color-link); text-decoration: none; }
a:hover{ color: var(--color-link-hover); text-decoration: underline; }
ul, ol{ padding-left: 1.4em; }
figure{ margin: 0 0 1.5em; }
table{ width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
th, td{ padding: 0.6em 0.8em; border: 1px solid var(--color-border); text-align: left; }

h1, h2, h3, h4, h5, h6{
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.3;
  margin: 1.4em 0 0.5em;
  font-weight: 700;
}
h1{ font-size: 2.1rem; margin-top: 0; }
h2{ font-size: 1.6rem; border-bottom: 2px solid var(--color-border); padding-bottom: 0.3em; }
h3{ font-size: 1.3rem; }
h4{ font-size: 1.1rem; }
p{ margin: 0 0 1.3em; }
blockquote{
  margin: 1.5em 0;
  padding: 0.8em 1.2em;
  border-left: 4px solid var(--color-accent);
  background: #F4EFE2;
  color: var(--color-text-muted);
  font-style: italic;
}
code, pre{
  background: #F0ECDF;
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
}
code{ padding: 0.15em 0.4em; font-size: 0.9em; }
pre{ padding: 1em; overflow-x: auto; }
hr{ border: 0; border-top: 1px solid var(--color-border); margin: 2em 0; }

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */
.site-wrap{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.site-content{
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding: 40px 0 60px;
}
.primary-content{
  flex: 1 1 auto;
  min-width: 0;
  max-width: var(--content-width);
}
.primary-content.full-width{ max-width: 100%; }
.sidebar{
  flex: 0 0 300px;
  width: 300px;
}
@media (max-width: 860px){
  .site-content{ flex-direction: column; }
  .sidebar{ width: 100%; flex: 1 1 auto; }
}

/* ==========================================================================
   4. HEADER
   ========================================================================== */
.site-header{
  background: var(--color-surface);
  border-bottom: 3px solid var(--color-primary);
  box-shadow: 0 2px 10px rgba(46, 42, 34, 0.06);
  position: relative;
  z-index: 100;
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  flex-wrap: wrap;
  gap: 12px;
}
.site-branding{ display: flex; align-items: center; gap: 12px; }
.site-title{
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin: 0;
  color: var(--color-primary-dark);
}
.site-title a{ color: inherit; }
.site-title a:hover{ text-decoration: none; color: var(--color-accent); }
.site-description{
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 2px 0 0;
}
.custom-logo{ max-height: 52px; width: auto; }

/* Nav */
.main-navigation{ position: relative; }
.menu-toggle{
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
}
.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after{
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  position: relative;
}
.menu-toggle-icon::before{ content: ""; position: absolute; top: -6px; }
.menu-toggle-icon::after{ content: ""; position: absolute; top: 6px; }
.primary-menu{
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.primary-menu li{ position: relative; }
.primary-menu a{
  display: block;
  padding: 10px 16px;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}
.primary-menu a:hover, .primary-menu .current-menu-item > a{
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}
.primary-menu ul{
  list-style: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  min-width: 200px;
  padding: 6px;
  display: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  z-index: 50;
}
.primary-menu li:hover > ul{ display: block; }
.primary-menu ul a{ padding: 8px 10px; }

@media (max-width: 860px){
  .menu-toggle{ display: flex; }
  .primary-menu{
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 10px;
  }
  .primary-menu.is-open{ display: flex; }
  .primary-menu ul{ position: static; display: none; border: none; box-shadow: none; padding-left: 12px; }
  .primary-menu li:hover > ul{ display: none; }
  .primary-menu li.submenu-open > ul{ display: flex; flex-direction: column; }
}

/* ==========================================================================
   5. AD ZONES (AdSense-friendly widget areas)
   ========================================================================== */
.ad-zone{
  max-width: var(--max-width);
  margin: 18px auto;
  padding: 0 20px;
  text-align: center;
}
.ad-zone .widget{ margin: 0 auto; }
.ad-zone-label{
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.ad-in-content{ margin: 2em 0; text-align: center; }

/* ==========================================================================
   6. ARTICLE / CONTENT
   ========================================================================== */
.entry-header{ margin-bottom: 1.2em; }
.entry-title{ font-size: 2rem; }
.entry-title a{ color: var(--color-primary-dark); }
.entry-title a:hover{ color: var(--color-accent); text-decoration: none; }
.entry-meta{
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1em;
}
.entry-meta a{ color: var(--color-text-muted); }
.entry-meta span::after{ content: "•"; margin: 0 8px; color: var(--color-border); }
.entry-meta span:last-child::after{ content: none; }
.entry-thumbnail{ margin-bottom: 1.5em; border-radius: var(--radius); overflow: hidden; }
.entry-content{ font-size: 1.05rem; }
.entry-content img{ border-radius: var(--radius); margin: 1em 0; }
.entry-footer{
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.tag-links a{
  display: inline-block;
  background: #F0ECDF;
  color: var(--color-primary-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin: 0 6px 6px 0;
}
.tag-links a:hover{ background: var(--color-primary); color: #fff; text-decoration: none; }

/* Post list / archive cards */
.post-list{ list-style: none; margin: 0; padding: 0; }
.post-card{
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.post-card .entry-title{ font-size: 1.4rem; margin-top: 0; }
.post-card .entry-excerpt{ color: var(--color-text-muted); }
.read-more{
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--color-accent);
}
.read-more:hover{ color: var(--color-primary); }

/* Pagination */
.pagination{
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 30px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span{
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
}
.pagination .current{
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.pagination a:hover{ background: #F0ECDF; text-decoration: none; }

/* ==========================================================================
   7. SIDEBAR / WIDGETS
   ========================================================================== */
.widget{
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.widget-title{
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin: 0 0 12px;
  color: var(--color-primary-dark);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 8px;
}
.widget ul{ list-style: none; padding: 0; margin: 0; }
.widget li{ padding: 6px 0; border-bottom: 1px dashed var(--color-border); }
.widget li:last-child{ border-bottom: none; }

/* ==========================================================================
   8. COMMENTS
   ========================================================================== */
.comments-area{ margin-top: 3em; }
.comment-list{ list-style: none; padding: 0; margin: 0; }
.comment-body{
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea{
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  margin-bottom: 12px;
}
.comment-form textarea{ min-height: 120px; }

/* ==========================================================================
   9. BUTTONS / FORMS
   ========================================================================== */
button, input[type="submit"], .btn{
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
}
button:hover, input[type="submit"]:hover, .btn:hover{
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}
input[type="search"]{
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
}
.search-form{ display: flex; gap: 8px; }
.search-form input[type="search"]{ flex: 1; }

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.site-footer{
  background: var(--color-primary-dark);
  color: #EDE7D6;
  margin-top: 40px;
}
.footer-widgets{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding: 40px 0;
}
.footer-widgets .widget{
  background: transparent;
  border: none;
  padding: 0;
}
.footer-widgets .widget-title{
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.2);
}
.footer-widgets a{ color: #D8CFB4; }
.footer-widgets a:hover{ color: #fff; }

/* Social icons row */
.footer-social-row{
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 24px 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.social-icons{ display: flex; gap: 10px; }
.social-icon{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #EDE7D6;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.social-icon:hover{
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

/* Bottom bar: copyright left, legal links right */
.site-footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 0;
  font-size: 0.85rem;
  color: #C9BFA1;
}
.site-footer-bottom a{ color: #EDE7D6; }
.footer-bottom-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copyright{
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-legal-nav{ margin-left: auto; }
.footer-legal-menu,
.footer-nav ul{
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.footer-legal-menu a{
  color: #D8CFB4;
  font-size: 0.85rem;
}
.footer-legal-menu a:hover{ color: #fff; text-decoration: underline; }

@media (max-width: 700px){
  .footer-bottom-inner{ flex-direction: column; text-align: center; }
  .footer-legal-nav{ margin-left: 0; }
  .footer-legal-menu{ justify-content: center; }
}

/* ==========================================================================
   11. UTILITIES
   ========================================================================== */
.screen-reader-text{
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
}
.alignwide{ max-width: 100%; }
.alignfull{ width: 100vw; margin-left: calc(50% - 50vw); }
.aligncenter{ margin-left: auto; margin-right: auto; }
.has-text-align-center{ text-align: center; }
