/*
Theme Name: YLN Blog
Theme URI: https://yourlatinanutritionist.com
Author: Cowboy Code
Author URI: https://cowboycoderanch.com
Description: Branded blog theme for Your Latina Nutritionist — culturally affirming nutrition content from a team of Latina registered dietitians.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
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: yln-blog
*/

:root { --mauve: #b685b1; --sage: #aabba7; --cream: #fdf1df; --orange: #d05330; --blush: #f8eef4; --white: #ffffff; --dark: #2d2024; --dark-soft: #4a3742; --mauve-dark: #9a6e95; --sage-dark: #8ea88a; --orange-hover: #b8441f; --text-body: #3d2e36; --text-light: #6b5662; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', sans-serif; color: var(--text-body); background: var(--cream); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4 { font-family: 'DM Serif Display', serif; color: var(--dark); line-height: 1.2; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-label { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mauve); margin-bottom: 12px; }
.btn { display: inline-block; padding: 16px 36px; border-radius: 50px; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; transition: all 0.3s ease; border: none; text-align: center; }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: 0 4px 16px rgba(208,83,48,0.3); }
.btn-primary:hover { background: var(--orange-hover); transform: translateY(-2px); }
.btn-white { background: var(--white); color: var(--orange); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.btn-white:hover { transform: translateY(-2px); }

/* BANNER & NAV */
.top-banner { background: var(--mauve); color: var(--white); padding: 10px 0; position: sticky; top: 0; z-index: 1000; font-size: 14px; font-weight: 600; }
.top-banner .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.banner-message { flex: 1; text-align: center; }
.banner-links { display: flex; gap: 16px; font-size: 13px; font-weight: 500; align-items: center; }
.banner-links a { color: rgba(255,255,255,0.85); }
.lang-toggle { background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.navbar { background: var(--cream); padding: 16px 0; border-bottom: 1px solid rgba(182,133,177,0.15); position: sticky; top: 42px; z-index: 999; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; position: relative; }
.nav-logo img { height: 40px; width: auto; }
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; font-weight: 600; }
.nav-links a { color: var(--dark-soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--mauve); }
.nav-cta { background: var(--orange) !important; color: var(--white) !important; padding: 10px 24px !important; border-radius: 50px !important; font-size: 13px !important; }
.mobile-menu { display: none; background: none; border: none; cursor: pointer; color: var(--dark-soft); }

/* BLOG INDEX HERO */
.blog-hero { padding: 60px 0 40px; background: var(--blush); text-align: center; }
.blog-hero h1 { font-size: 48px; color: var(--dark); margin-bottom: 16px; }
.blog-hero p { font-size: 17px; line-height: 1.7; color: var(--text-light); max-width: 600px; margin: 0 auto 28px; }

/* CATEGORY FILTERS */
.category-bar { padding: 20px 0; background: var(--white); border-bottom: 1px solid rgba(182,133,177,0.1); position: sticky; top: 100px; z-index: 998; }
.category-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cat-link { padding: 8px 20px; border-radius: 50px; font-size: 13px; font-weight: 600; color: var(--text-light); background: var(--cream); transition: all 0.2s; }
.cat-link:hover, .cat-link.active { background: var(--mauve); color: var(--white); }

/* POST GRID */
.blog-grid-section { padding: 60px 0 80px; background: var(--cream); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { background: var(--white); border-radius: 20px; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; display: block; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.post-image { width: 100%; aspect-ratio: 16/10; background: var(--blush); display: flex; align-items: center; justify-content: center; color: var(--mauve); font-size: 14px; font-weight: 500; overflow: hidden; }
.post-image img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 24px; }
.post-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mauve); margin-bottom: 8px; }
.post-title { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--dark); line-height: 1.3; margin-bottom: 10px; }
.post-excerpt { font-size: 14px; line-height: 1.6; color: var(--text-light); margin-bottom: 14px; }
.post-meta { font-size: 12px; color: var(--text-light); display: flex; gap: 12px; flex-wrap: wrap; }
.read-more { font-size: 14px; font-weight: 700; color: var(--orange); margin-top: 12px; display: inline-block; }

/* PAGINATION */
.yln-pagination { margin-top: 48px; }
.yln-pagination .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.yln-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 50px; background: var(--white); color: var(--text-body); font-weight: 700; font-size: 14px; transition: all 0.2s; }
.yln-pagination a.page-numbers:hover { background: var(--mauve); color: var(--white); }
.yln-pagination .page-numbers.current { background: var(--mauve); color: var(--white); }
.yln-pagination .page-numbers.dots { background: transparent; }

/* SINGLE POST */
.post-hero { padding: 60px 0 40px; background: var(--white); }
.post-hero .container { max-width: 800px; }
.post-hero .breadcrumb { font-size: 13px; color: var(--text-light); margin-bottom: 20px; }
.post-hero .breadcrumb a { color: var(--mauve); font-weight: 600; }
.post-hero h1 { font-size: 44px; line-height: 1.15; color: var(--dark); margin-bottom: 20px; }
.post-hero .post-meta-full { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--sage); display: flex; align-items: center; justify-content: center; color: var(--white); font-weight: 700; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-info .author-name { font-weight: 700; font-size: 14px; color: var(--dark); }
.author-info .post-date { font-size: 13px; color: var(--text-light); }
.post-featured-image { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.post-featured-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 20px; }
.post-featured-image .image-placeholder { width: 100%; aspect-ratio: 16/9; background: var(--blush); border-radius: 20px; }

/* POST CONTENT */
.post-content { padding: 60px 0 80px; background: var(--cream); }
.post-content .container { max-width: 720px; }
.post-content h2 { font-size: 30px; margin: 40px 0 16px; }
.post-content h3 { font-size: 24px; margin: 32px 0 12px; }
.post-content p { font-size: 17px; line-height: 1.9; color: var(--text-body); margin-bottom: 20px; }
.post-content ul, .post-content ol { margin: 16px 0 20px 24px; }
.post-content li { font-size: 16px; line-height: 1.7; margin-bottom: 8px; color: var(--text-body); }
.post-content a { color: var(--orange); text-decoration: underline; }
.post-content a:hover { color: var(--orange-hover); }
.post-content img { border-radius: 16px; margin: 28px 0; height: auto; }
.post-content figure { margin: 28px 0; }
.post-content figure img { margin: 0; }
.post-content figcaption, .post-content .wp-caption-text { font-size: 13px; color: var(--text-light); text-align: center; margin-top: 8px; }
.post-content .aligncenter { margin-left: auto; margin-right: auto; }
.post-content .alignleft { float: left; margin: 8px 28px 16px 0; }
.post-content .alignright { float: right; margin: 8px 0 16px 28px; }
.post-content strong { color: var(--dark-soft); }
.post-content blockquote { border-left: 4px solid var(--mauve); padding: 16px 24px; margin: 28px 0; background: var(--blush); border-radius: 0 12px 12px 0; font-style: italic; font-size: 17px; line-height: 1.7; color: var(--dark-soft); }
.post-content blockquote p { margin-bottom: 0; }
.post-content .callout { background: var(--sage); color: var(--white); border-radius: 16px; padding: 28px; margin: 32px 0; text-align: center; }
.post-content .callout h3 { color: var(--white); margin: 0 0 8px; }
.post-content .callout p { color: rgba(255,255,255,0.85); margin-bottom: 16px; }

/* POST CTA */
.post-sidebar-cta { background: var(--blush); border-radius: 20px; padding: 32px 24px; text-align: center; margin: 40px auto 0; max-width: 720px; }
.post-sidebar-cta h3 { font-size: 22px; margin-bottom: 10px; }
.post-sidebar-cta p { font-size: 14px; color: var(--text-light); line-height: 1.6; margin-bottom: 20px; }

/* RELATED POSTS */
.related-posts { padding: 60px 0; background: var(--white); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* NEWSLETTER */
.newsletter { padding: 64px 0; background: var(--blush); text-align: center; }
.newsletter h2 { font-family: 'DM Serif Display', serif; font-size: 34px; margin-bottom: 12px; }
.newsletter p { font-size: 16px; color: var(--text-light); margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }
.newsletter-form { display: flex; gap: 12px; justify-content: center; max-width: 480px; margin: 0 auto; }
.newsletter-form input { flex: 1; padding: 14px 20px; border: 2px solid rgba(182,133,177,0.3); border-radius: 50px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; background: var(--white); color: var(--text-body); outline: none; }
.newsletter-form input:focus { border-color: var(--mauve); }
.newsletter-form button { padding: 14px 28px; background: var(--orange); color: var(--white); border: none; border-radius: 50px; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; }
.newsletter-form button:hover { background: var(--orange-hover); }

/* FOOTER */
.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--white); margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { padding: 4px 0; font-size: 14px; }
.footer-col a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-col a:hover { color: var(--mauve); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; gap: 16px; }
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: rgba(255,255,255,0.5); font-size: 14px; font-weight: 600; }
.footer-social a:hover { color: var(--mauve); }

/* STATES: 404 / SEARCH / EMPTY */
.yln-message { padding: 80px 0; text-align: center; }
.yln-message h1 { font-size: 40px; margin-bottom: 16px; }
.yln-message p { font-size: 17px; color: var(--text-light); margin-bottom: 24px; }

@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .top-banner .container { flex-direction: column; gap: 6px; }
  .banner-links { display: none; }
  .nav-links { display: none; }
  .nav-links.is-open { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); padding: 20px 24px; border-bottom: 1px solid rgba(182,133,177,0.15); box-shadow: 0 10px 28px rgba(0,0,0,0.10); }
  .nav-links.is-open .nav-cta { align-self: stretch; }
  .mobile-menu { display: block; }
  .blog-hero h1 { font-size: 32px; }
  .post-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .related-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .category-links { gap: 6px; }
  .cat-link { padding: 6px 14px; font-size: 12px; }
  .post-hero h1 { font-size: 30px; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* Fix: bottom-of-post CTA button text was inheriting .post-content link color (orange+underline) */
.post-content a.btn { color: var(--white) !important; text-decoration: none !important; }
.post-content a.btn:hover { color: var(--white) !important; text-decoration: none !important; }
