/*
Theme Name: Willow Center
Theme URI: https://example.com/willow-center
Author: Willow Heaven Center
Author URI: https://example.com
Description: Elementor-ready WordPress theme for Willow Center.
Version: 1.0.0
Text Domain: willow-center
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
:root {
  --color-primary: #3a5a40;
  --color-accent: #c9b08e;
  --color-text: #222222;
  --color-bg: #ffffff;
  --font-heading: "Bressay Display", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Proxima Nova", "Montserrat", "Lato", system-ui, -apple-system, sans-serif;
  --font-accent: "Europa", "Jost", "Futura", "Century Gothic", sans-serif;
}
/* Prevent horizontal overflow and extra space site-wide */
html {
  overflow-x: hidden;
  width: 100%;
}
body:not(.elementor-editor-active) {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}
/* Constrain main content and Elementor wrappers so nothing extends past viewport */
#site-content,
body.elementor-page .elementor,
.elementor-section-wrap {
  max-width: 100%;
}
/* Elementor sections: prevent 100vw from causing scroll (scrollbar makes 100vw overflow) */
.elementor-section.elementor-section-stretched,
.elementor-section.elementor-section-full_width {
  max-width: 100%;
}
/* Theme Typography: Headings use Bressay by default, Body uses Proxima Nova */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
}
/* Allow Elementor's specific font-family settings to take precedence */
.elementor-widget-heading .elementor-heading-title,
.elementor-widget-text-editor h1, .elementor-widget-text-editor h2, 
.elementor-widget-text-editor h3, .elementor-widget-text-editor h4, 
.elementor-widget-text-editor h5, .elementor-widget-text-editor h6 {
  font-family: inherit;
}
/* Europa for nav, taglines, and utility */
nav, .site-description, .font-europa { font-family: var(--font-accent); }
a { color: var(--color-primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
main { display: block; }

/* Elementor: do NOT set font-family here so Typography choices in the editor take effect.
   Headings still get theme default via h1–h6; when you change font in Elementor it will apply. */

/* Tighten global footer spacing: remove extra gaps around Elementor footer on all pages */
.elementor-location-footer .elementor-section,
.elementor-location-footer .elementor-container,
.elementor-location-footer .e-con-inner {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}
.elementor-location-footer .elementor-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* --- Blog & Sidebar Styles --- */
.blog-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.blog-row {
    display: flex;
    gap: 40px;
}

.blog-main {
    flex: 1;
    min-width: 0; /* Prevents overflow in flex items */
}

.blog-sidebar {
    width: 350px;
    flex-shrink: 0;
}

/* Archive Header */
.archive-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.archive-title {
    font-size: 32px;
    color: var(--color-primary);
}

/* Post Cards in List */
.blog-post-card {
    margin-bottom: 50px;
}

.blog-post-card .post-thumbnail img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.blog-post-card .post-title {
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.blog-post-card .post-title a {
    color: var(--color-primary);
    text-decoration: none;
}

.blog-post-card .post-meta {
    font-family: var(--font-accent);
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.blog-post-card .post-meta i {
    color: var(--color-accent);
    margin-right: 5px;
}

.blog-post-card .post-excerpt {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
}

.view-post-btn {
    display: inline-block;
    background: #a13a3a; /* Matches the reddish/brown in image */
    color: #fff;
    padding: 10px 25px;
    font-size: 14px;
    font-family: var(--font-accent);
    text-transform: capitalize;
    transition: background 0.3s ease;
}

.view-post-btn:hover {
    background: #8e2d2d;
    color: #fff;
}

/* Pagination */
.willow-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.willow-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #eee;
    color: var(--color-primary);
    font-family: var(--font-accent);
    font-size: 14px;
    transition: all 0.3s ease;
}

.willow-pagination .page-numbers:hover,
.willow-pagination .page-numbers.current {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Single Post Styles */
.single-post-article .post-thumbnail {
    margin-bottom: 20px;
}

.single-meta {
    margin-bottom: 20px;
}

.single-title {
    font-size: 42px;
    margin-bottom: 25px;
}

.single-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.single-content h2, .single-content h3 {
    margin-top: 35px;
    margin-bottom: 15px;
}

/* Sidebar Widget Styling */
.blog-sidebar {
    background: #fff;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

/* Search Widget */
.search-form {
    position: relative;
    display: flex;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #eee;
    font-size: 14px;
}

.search-form button {
    background: none;
    border: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

/* Category Widget */
.widget_categories ul {
    list-style: none;
    padding: 0;
}

.widget_categories ul li {
    padding: 10px 0;
    border-bottom: 1px solid #f9f9f9;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.widget_categories ul li a {
    color: #666;
}

/* Latest News (Custom Widget) Styling */
.willow-latest-news-list {
    list-style: none;
    padding: 0;
}

.willow-latest-news-list li {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.rp-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.rp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.rp-content {
    display: flex;
    flex-direction: column;
}

.rp-content a {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
    color: var(--color-primary);
}

.rp-view-more {
    font-size: 12px;
    color: #888 !important;
    text-transform: capitalize;
    font-weight: 400 !important;
}

/* Gallery Widget (Styled as a grid) */
.widget_media_gallery .gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.widget_media_gallery .gallery-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 991px) {
    .blog-row {
        flex-direction: column;
    }
    .blog-sidebar {
        width: 100%;
    }
}

