/* Base Styles */
:root {
    --primary-color: #8ecae6;
    --secondary-color: #219ebc;
    --accent-color: #ffb703;
    --dark-color: #023047;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--dark-color);
}
/* Logo sizing - works even if some pages forgot the logo-img class */
.logo img,
.logo-img {
  height: 70px;
  width: auto;
  display: block;
}

/* Desktop only: bigger logo */
@media (min-width: 769px) {
  .logo img,
  .logo-img {
    height: 110px; /* adjust 90–130 if you want */
  }
}


.language-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-btn {
    background: none;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background-color: var(--secondary-color);
    color: white;
}

.lang-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Navigation */
nav {
    background-color: var(--dark-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    transition: var(--transition);
}

.nav-links a:hover {
    background-color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(2, 48, 71, 0.7), rgba(2, 48, 71, 0.7));
    background-size: cover;
    background-position: center;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--dark-color);
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
}

.cta-button:hover {
    background-color: #fd9e02;
    transform: translateY(-3px);
}

/* Page Content */
.page-header {
    background-color: white;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: var(--box-shadow);
}

.page-header h1 {
    color: var(--dark-color);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.page-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    margin-bottom: 40px;
}

.page-content h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.page-content h3 {
    color: var(--secondary-color);
    margin: 25px 0 15px;
}

.page-content p {
    margin-bottom: 15px;
}

/* Main Content */
.main-content {
    display: flex;
    gap: 30px;
    padding: 40px 0;
}

.content-area {
    flex: 1;
}

.sidebar {
    width: 300px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
}

.sidebar h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.journal-entry {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.journal-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.journal-content {
    font-size: 0.95rem;
}



/* Section Cards */
.section-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 36px;
    margin: 50px 0;
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-img {
    height: 200px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.card-content {
    padding: 20px;
    text-align: center ;
}

.card h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.card p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.card-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.card-button:hover {
    background-color: var(--dark-color);
}

/* Development Domains */
.development-domains {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.domain-card {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
}

.age-groups {
    margin: 30px 0;
}

.age-group {
    background-color: var(--light-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
}

.age-group h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.resources-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--primary-color);
}

.resource-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tip-card, .featured-story, .story-card {
    background-color: var(--light-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
}

.tip-card h4, .featured-story h4, .story-card h4 {
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.story-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.photo-gallery {
    margin: 30px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    height: 150px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: var(--border-radius);
}

.journey-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.highlight-card {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: var(--border-radius);
}

.highlight-card h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.story-section {
    margin: 30px 0;
    padding: 25px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
}

.story-section h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

.community-vision {
    background-color: var(--light-color);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 30px 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.benefit-card {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.benefit-card h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.get-involved-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.option-card {
    background-color: var(--light-color);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
}

.option-card h4 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

.book-preorder {
    background-color: var(--light-color);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 25px 0;
    text-align: center;
}

.book-preorder h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.community-login {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: var(--border-radius);
    margin: 40px 0;
}

.community-login h2 {
    text-align: center;
    margin-bottom: 25px;
}

.login-form {
    max-width: 400px;
    margin: 0 auto;
}

.login-form p {
    text-align: center;
    margin-top: 15px;
}

.login-form a {
    color: var(--secondary-color);
    text-decoration: none;
}

.login-form a:hover {
    text-decoration: underline;
}

/* Comments Section */
.comments-section {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-top: 40px;
}

.comments-section h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.comment-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

.submit-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: var(--dark-color);
}

.comment {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: bold;
    color: var(--dark-color);
}

.comment-date {
    color: #666;
    font-size: 0.9rem;
}

.comment-content {
    font-size: 0.95rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section p, .footer-section a {
    color: #ccc;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* Make sure all pages have consistent styling */
.page-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.page-content li {
    margin-bottom: 8px;
}

.page-content strong {
    color: var(--dark-color);
}

.page-content em {
    color: var(--secondary-color);
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-container {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

@media (min-width: 768px) {
  .hero {
    padding: 60px 20px;
  }
}

    
    .mobile-menu-btn {
        display: block;
        position: relative;
        margin-left: auto;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--dark-color);
        flex-direction: column;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    
    /* ... keep your other existing mobile styles below ... */
    .hero h2 {
        font-size: 2rem;
    }
    /* etc... */
}
    

    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .resource-links {
        flex-direction: column;
    }
    
    .get-involved-options {
        grid-template-columns: 1fr;
    }
    .hero-buttons {
  margin-top: 30px;
  margin-bottom: 10px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-buttons .cta-button {
  display: inline-block;
  padding: 14px 26px;
  background-color: #155a72; 
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.hero-buttons .cta-button:hover {
  background-color: rgba(255,255,255,0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hero-buttons .cta-button.secondary {
  background-color: #155a72;
  
}

.hero-buttons .cta-button.secondary:hover {
  background-color: rgba(255,255,255,0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15)
}


/* ===== Home Page Block 2: Hero spacing + button contrast ===== */

/* More breathing room between hero paragraph blocks */
.hero .hero-line {
  margin: 14px auto;         /* spacing between paragraphs */
  max-width: 780px;          /* keeps lines readable on wide screens */
  line-height: 1.6;
}

.content-section {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

.content-section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--dark-color);
}

.content-section p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.soft-list {
  margin: 16px 0 24px 20px;
}

.soft-list li {
  margin-bottom: 8px;
}
.practice-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;
  margin-top:20px;
}

.practice-item{
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 16px 18px;
}

.practice-item h3{
  margin: 0 0 8px;
}

.practice-item p{
  margin: 0;
}

.next-steps{
  text-align: center;
}

.next-steps p{
  max-width: 720px;
  margin: 0 auto 14px;
}

.next-steps-buttons{
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.small-note{
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.95rem;
  opacity: 0.85;
  text-align: center;
}
/* --- Grow with Children ONLY: main content + sidebar --- */
.page-grow .content-area{
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: nowrap;
}

.page-grow .page-content{
  flex: 1 1 auto;
  min-width: 0;
}

.page-grow .sidebar{
  flex: 0 0 320px;
  width: 320px;
}

/* Stack only on small screens (Grow page only) */
@media (max-width: 700px){
  .page-grow .content-area{
    flex-direction: column;
  }
  .page-grow .sidebar{
    width: 100%;
    flex: none;
  }
}
/* ===== Photo Gallery Fix (Safe) ===== */

.photo-gallery {
  margin-top: 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.gallery-item {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;   /* IMPORTANT */
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;     /* IMPORTANT */
}

.gallery-item figcaption {
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
  background: #fafafa;
}
/* ================================
   YAN'AN PAGE FIXES (SAFE)
   ================================ */

/* 1) Make gallery images show fully and consistently */
.gallery-item {
  height: auto;              /* override the old 150px */
  display: block;            /* override old flex center */
  color: inherit;            /* just in case */
}

.gallery-item img {
  width: 100%;
  height: 220px;             /* consistent gallery height */
  object-fit: cover;         /* fills nicely without distortion */
  display: block;
}
.gallery-item img{
  width: 100%;
  height: 220px;        /* makes all tiles same height */
  object-fit: cover;    /* crops nicely instead of stretching */
  display: block;
}


/* Optional: on large screens, make images a bit taller */
@media (min-width: 992px) {
  .gallery-item img {
    height: 240px;
  }
}

/* 2) HERO image: show more of the whole photo (less crop feeling) */
.yanan-hero img {
  width: 100%;
  height: 420px;             /* controls how “tall” the hero appears */
  object-fit: contain;       /* shows the whole photo */
  background: #fff;          /* fills empty space if needed */
  border-radius: 10px;
  display: block;
}

/* Mobile hero height */
@media (max-width: 768px) {
  .yanan-hero img {
    height: 260px;
  }
}

/* 3) Map image: show complete map */
.yanan-map img {
  width: 100%;
  height: auto;
  max-height: 720px;         /* prevents it from being too tall */
  object-fit: contain;       /* show full map */
  background: #fff;
  border-radius: 10px;
  display: block;
}

/* 4) “Read More Reflections” button — make it prettier */
.read-more-btn {
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(33, 158, 188, 0.35);
  background: rgba(142, 202, 230, 0.25);
  color: var(--dark-color);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.read-more-btn::after {
  content: "✨";
  font-size: 1rem;
  line-height: 1;
}

.read-more-btn:hover {
  background: rgba(142, 202, 230, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.10);
}

/* 5) Make the “family-support” photos look clearer (visual polish) */
.family-support img {
  filter: contrast(1.05) saturate(1.05);
}
.sidebar {
  position: sticky;
  top: 140px; /* aligns below header */
  align-self: flex-start;
}
/* === Family Support Full Image Fix === */
.family-support-full {
  height: auto;          /* remove fixed height */
  display: block;
}

.family-support-full img {
  width: 100%;
  height: auto;          /* show full image */
  display: block;
  border-radius: 6px;
  object-fit: contain;   /* IMPORTANT: no cropping */
}

/* === Single Journey Resource Button (clean + calm) === */
.single-info-button {
  display: inline-block;
  padding: 12px 22px;
  background: linear-gradient(
    135deg,
    rgba(33, 158, 188, 0.85),
    rgba(2, 48, 71, 0.9)
  );
  color: #ffffff;
  font-size: 0.95rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  text-align: center;
  margin-top: 12px;
}
.social-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Social buttons: fix wrapping for X / TikTok */
.social-grid a{
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 12px 10px;
  min-height: 64px;     /* gives room for 2 lines */
  line-height: 1.25;

  white-space: normal;
  word-break: keep-all; /* important for Chinese */
}

.social-btn{
  display: inline-block;
  text-align: center;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
/* Social Connect Section */
.social-connect {
  margin-top: 24px;
}

.social-connect h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #023047;
}

.social-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.social-buttons a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #e9f4f8;
  color: #023047;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.social-buttons a:hover {
  background: #cfe9f2;
  transform: translateY(-2px);
}
/* Route map: show the whole image (no cropping) */
.route-map{
  width: 100%;
  max-width: 900px;      /* adjust if you want larger */
  height: auto;
  display: block;
  margin: 12px auto 18px;
}
/* Sidebar social buttons */
.sidebar .card-button,
.sidebar button,
.sidebar a.button {
  white-space: normal;
  word-break: keep-all;
  line-height: 1.4;
  text-align: center;
}
/* English nav: force single-line items */
html[lang="en"] .nav-links a {
  white-space: nowrap;
}

