/*
Theme Name: NourishLive
Theme URI: https://example.com/nourishlive
Author: NourishLive Team
Author URI: https://example.com
Description: A clean, lifestyle-focused WordPress theme for everyday wellbeing. Move · Nourish · Balance · Live. Perfect for healthy living, food, fitness, mind & mood, and life articles.
Version: 1.9.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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nourishlive
Tags: blog, lifestyle, health, clean, custom-menu, featured-images, responsive
*/

:root {
  --color-primary: #4a7c59;
  --color-primary-dark: #3a6247;
  --color-accent: #c4a574;
  --color-bg: #faf8f5;
  --color-text: #2c3e50;
  --color-text-light: #5a6c7d;
  --color-white: #ffffff;
  --color-border: #e8e4df;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 17px;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 0.75em;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

.site-branding {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 70%;
}

.site-title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.5px;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-title a { color: inherit; }

.site-tagline {
  font-size: clamp(0.65rem, 2vw, 0.8rem);
  color: var(--color-text-light);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Custom Logo (WordPress) */
.custom-logo-link {
  display: inline-block;
  line-height: 0;
}

.custom-logo {
  max-height: 60px;
  width: auto;
  max-width: 180px;
  height: auto;
  display: block;
}

/* Navigation */
.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 8px;
  flex-wrap: wrap;
}

.main-navigation a {
  display: block;
  padding: 8px 14px;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
  background: var(--color-primary);
  color: var(--color-white);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Homepage Cover - Floating Style */
.homepage-cover {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  margin: 30px auto 40px;
  max-width: 1140px;
  width: calc(100% - 40px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.08);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Subtle left gradient for text readability */
.homepage-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.4) 38%, rgba(0,0,0,0.1) 70%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.homepage-cover .container {
  position: relative;
  z-index: 2;
  text-align: left;
  padding: 50px 40px 50px 50px;
  max-width: 620px;
  margin-left: 0;
  margin-right: auto;
}

.homepage-cover h1,
.homepage-cover .tagline,
.homepage-cover .motto,
.homepage-cover h1 *,
.homepage-cover .tagline * {
  color: #ffffff !important;
  text-shadow: 
    0 1px 2px rgba(0,0,0,0.9),
    0 2px 6px rgba(0,0,0,0.75),
    0 4px 16px rgba(0,0,0,0.55),
    0 0 30px rgba(0,0,0,0.35) !important;
}

.homepage-cover h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 16px;
  font-weight: 600;
  color: #ffffff !important;
}

.homepage-cover .tagline {
  font-size: 1.12rem;
  max-width: 480px;
  margin: 0 0 28px 0;
  line-height: 1.6;
  color: #ffffff !important;
}

.homepage-cover .motto {
  color: #ffffff !important;
  letter-spacing: 2px;
  margin-bottom: 12px;
  font-weight: 600;
}

.homepage-cover:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(0,0,0,0.16), 0 12px 25px rgba(0,0,0,0.1);
}

.homepage-cover .container {
  position: relative;
  z-index: 2;
  text-align: left;
  padding: 50px 40px 50px 50px;
  max-width: 620px;
  margin-left: 0;
  margin-right: auto;
}

.homepage-cover h1,
.homepage-cover .tagline,
.homepage-cover .motto {
  color: #fff;
  text-shadow: 
    0 2px 4px rgba(0,0,0,0.6),
    0 4px 12px rgba(0,0,0,0.45),
    0 8px 24px rgba(0,0,0,0.3);
}

.homepage-cover h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.homepage-cover .tagline {
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 0 28px 0;
  line-height: 1.6;
}

.homepage-cover .motto {
  color: #f8e9d4;
  letter-spacing: 2px;
  margin-bottom: 12px;
  font-weight: 600;
}

.homepage-cover .btn {
  background: var(--color-primary);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  margin-top: 10px;
}

/* Fallback gradient when no cover image */
.hero:not(.homepage-cover) {
  background: linear-gradient(135deg, #f5f0ea 0%, #e8f0e8 100%);
  margin: 30px auto 40px;
  max-width: 1140px;
  width: calc(100% - 40px);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.hero h1 {
  font-size: 3.2rem;
  margin-bottom: 12px;
  color: var(--color-primary-dark);
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 24px;
}

.motto {
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
  font-weight: 600;
}

/* Content */
.site-main { padding: 60px 0; min-height: 60vh; }

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

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid var(--color-border);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.card-image {
  height: 200px;
  background: linear-gradient(135deg, #d4e4d4, #e8d4c4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

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

.card-content { padding: 22px; }

.card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.card-title a { color: var(--color-text); }
.card-title a:hover { color: var(--color-primary); }

.card-excerpt {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--color-text-light);
}

/* Single / Page */
.entry-header { margin-bottom: 32px; text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; }
.entry-content { max-width: 780px; margin: 0 auto; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content h2, .entry-content h3 { margin-top: 1.8em; }
.entry-content ul, .entry-content ol { margin: 1em 0 1em 1.5em; }
.entry-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5em 0; }

/* Footer */
.site-footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 50px 0 30px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand .site-title { color: #fff; font-size: 1.4rem; }
.footer-brand p { font-size: 0.9rem; color: #bdc3c7; max-width: 280px; margin-top: 8px; }

.footer-nav h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-weight: 600;
}

.footer-nav ul { list-style: none; }
.footer-nav a { color: #bdc3c7; display: block; padding: 5px 0; font-size: 0.92rem; }
.footer-nav a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #3d5166;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #95a5a6;
}

.disclaimer-note {
  font-size: 0.8rem;
  color: #95a5a6;
  margin-top: 8px;
  font-style: italic;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  transition: background 0.2s;
}
.btn:hover { background: var(--color-primary-dark); }

/* Responsive Design - All Screen Sizes */

/* Large Desktop */
@media (min-width: 1200px) {
  .container { max-width: 1200px; }
  .hero h1 { font-size: 3.6rem; }
  .posts-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .hero { padding: 70px 0 50px; }
  .hero h1 { font-size: 2.8rem; }
  .posts-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
  .site-main { padding: 50px 0; }
}

/* Tablet Portrait */
@media (max-width: 900px) {
  .header-inner { gap: 12px; }
  .main-navigation a { padding: 8px 10px; font-size: 0.9rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero .tagline { font-size: 1.05rem; }
  .footer-inner { gap: 25px; }
}

/* Mobile Landscape & Small Tablet */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .menu-toggle { display: block; }
  .main-navigation { 
    display: none; 
    width: 100%; 
    order: 3;
    margin-top: 10px;
  }
  .main-navigation.toggled { display: block; }
  .main-navigation ul { 
    flex-direction: column; 
    gap: 4px; 
    background: var(--color-white);
    border-radius: 10px;
    padding: 8px;
    border: 1px solid var(--color-border);
  }
  .header-inner { flex-wrap: wrap; padding: 12px 0; }
  .site-branding { max-width: 65%; }
  .site-title { font-size: clamp(1.15rem, 5vw, 1.5rem); }
  .site-tagline { font-size: clamp(0.6rem, 2.2vw, 0.75rem); letter-spacing: 0.3px; }
  .custom-logo { max-height: 48px; max-width: 140px; }
  .header-inner { padding: 10px 0; gap: 10px; }
  .homepage-cover .container {
    padding: 40px 28px;
    text-align: left;
  }
  .homepage-cover { min-height: 380px; padding: 0; }
  .homepage-cover h1 { font-size: 1.9rem; }
  .hero .tagline { font-size: 1rem; padding: 0 10px; }
  .motto { letter-spacing: 2px; font-size: 0.85rem; }
  .posts-grid { grid-template-columns: 1fr; gap: 20px; }
  .card-image { height: 180px; }
  .card-content { padding: 18px; }
  .card-title { font-size: 1.2rem; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.6rem; }
  .site-main { padding: 40px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-brand p { max-width: 100%; }
  .entry-header { padding: 0 10px; }
  .entry-content { padding: 0 8px; }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .homepage-cover,
  .hero:not(.homepage-cover) {
    margin: 16px auto 24px;
    width: calc(100% - 20px);
    border-radius: 14px;
    min-height: 340px;
  }
  .homepage-cover h1 { font-size: 1.75rem; }
  .homepage-cover .tagline { font-size: 0.95rem; }
  .hero .tagline { font-size: 0.95rem; }
  .btn { padding: 10px 22px; font-size: 0.95rem; }
  .site-branding { max-width: 60%; }
  .site-title { font-size: 1.2rem; }
  .site-tagline { 
    font-size: 0.6rem; 
    letter-spacing: 0.2px;
    display: none; /* hide tagline on very small screens to save space */
  }
  .custom-logo { max-height: 40px; max-width: 120px; }
  .card-image { height: 160px; }
  .card-content { padding: 16px; }
  .card-title { font-size: 1.15rem; }
  .card-excerpt { font-size: 0.9rem; }
  .site-footer { padding: 40px 0 20px; }
  .footer-bottom { font-size: 0.8rem; }
  h1 { font-size: 1.7rem; }
  .motto { letter-spacing: 1.5px; }
}

/* Very Small Screens */
@media (max-width: 360px) {
  .hero h1 { font-size: 1.65rem; }
  .site-title { font-size: 1.25rem; }
  .container { padding: 0 12px; }
}
