/* ======================================== CELIAC DISEASE UK - COMPLETE STYLESHEET Natural Earth Tones & Responsive Design ======================================== */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-green: #4a7c59;
  --primary-dark: #2d4a35;
  --accent-sage: #8fad88;
  --accent-cream: #f5f1e8;
  --warm-beige: #e8dfd0;
  --text-dark: #2c2c2c;
  --text-medium: #5a5a5a;
  --text-light: #8a8a8a;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
}

/* ===== Unified Search Styling ===== */
.global-search,
.search-bar {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 1.5rem auto 2rem;
}

.global-search input[type="text"],
.search-bar input[type="text"] {
  width: 100%;
  padding: 0.8rem 2.8rem 0.8rem 1rem;
  border: 2px solid var(--primary-green);
  border-radius: 30px;
  font-size: 1rem;
  outline: none;
  color: var(--text-dark);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%2366a36c' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.global-search input[type="text"]:focus,
.search-bar input[type="text"]:focus {
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(102, 163, 108, 0.2);
}

/* Dropdown for search type selection (recipes/articles) */
.search-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1000;
}

.search-dropdown button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  background: #fff;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  color: var(--primary-green);
}

.search-dropdown button:hover {
  background: #f4f4f4;
}

/* Dropdown <select> styling for fallback or alternative UI */
.search-bar select {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: #fff;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--accent-cream);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === HEADER & NAVIGATION === */
.main-header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-green);
}

.site-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.site-title a:hover {
  color: var(--primary-dark);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--primary-green);
  border-radius: 3px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 0.5rem;
}

.main-nav a {
  color: var(--text-dark);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav a:focus {
  background: var(--warm-beige);
  color: var(--primary-green);
}

/* === HERO SECTION === */
.hero-section {
  position: relative;
  margin-bottom: 3rem;
}

.hero-image {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(74,124,89,0.85) 0%, rgba(45,74,53,0.75) 100%);
  display: flex;
  align-items: center;
}

.hero-content {
  color: var(--white);
  max-width: 600px;
  animation: fadeInUp 0.8s ease;
}

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.btn-hero {
  background: var(--white);
  color: var(--primary-green);
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.btn-hero:hover {
  background: var(--warm-beige);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === MAIN CONTENT === */
.home-main {
  padding: 3rem 0;
}

/* Intro Section */
.intro-section {
  text-align: center;
  margin-bottom: 4rem;
}

.intro-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.intro-content h2 {
  color: var(--primary-green);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.intro-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-medium);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: var(--primary-green);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--text-medium);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.feature-link {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.feature-link:hover {
  color: var(--primary-dark);
  gap: 0.75rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 4rem 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* === RECIPE PAGES === */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.recipe-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.recipe-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.recipe-content {
  padding: 1.5rem;
}

.recipe-content h3 {
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
  color: var(--primary-green);
}

.recipe-content h3 a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.recipe-content h3 a:hover {
  color: var(--primary-dark);
}

.recipe-content .summary {
  color: var(--text-medium);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.recipe-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--warm-beige);
}

/* Single Recipe */
.recipe-single {
  max-width: 900px;
  margin: 0 auto;
}

.recipe-header {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.recipe-header h1 {
  font-size: 2.5rem;
  color: var(--primary-green);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.recipe-summary {
  font-size: 1.15rem;
  color: var(--text-medium);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.recipe-meta-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: var(--warm-beige);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.meta-item {
  font-size: 0.95rem;
}

.meta-item strong {
  display: block;
  color: var(--primary-green);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.recipe-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.tag {
  background: var(--accent-sage);
  color: var(--white);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.recipe-image {
  margin-bottom: 2rem;
}

.recipe-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.recipe-content {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.recipe-content section {
  margin-bottom: 2.5rem;
}

.recipe-content h2 {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  color: var(--primary-green);
  border-bottom: 3px solid var(--accent-sage);
  padding-bottom: 0.5rem;
}

.recipe-ingredients ul,
.recipe-instructions ol {
  margin-left: 1.5rem;
}

.recipe-ingredients li,
.recipe-instructions li {
  margin-bottom: 0.9rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.recipe-instructions li {
  padding-left: 0.5rem;
}

.recipe-notes {
  background: #fff8e1;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #ffa726;
}

.recipe-notes h2 {
  color: #f57c00;
  border-bottom-color: #ffa726;
}

.recipe-equipment {
  background: var(--warm-beige);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--accent-sage);
  margin-top: 2rem;
}

.recipe-equipment h2 {
  color: var(--primary-green);
  border-bottom-color: var(--accent-sage);
}

.equipment-list {
  list-style: none;
  margin-left: 0;
}

.equipment-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(74,124,89,0.1);
}

.equipment-list li:last-child {
  border-bottom: none;
}

.equipment-link {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.equipment-link:hover {
  color: var(--primary-dark);
  gap: 0.75rem;
}

.affiliate-disclosure {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(74,124,89,0.2);
  color: var(--text-light);
  font-style: italic;
}

.recipe-footer {
  margin-top: 2rem;
  text-align: center;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--accent-sage);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--primary-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-small {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}

/* === FOOTER === */
.main-footer {
  background: var(--primary-dark);
  color: var(--white);
  margin-top: 4rem;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--accent-sage);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section p {
  opacity: 0.9;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.85;
  transition: var(--transition);
}

.footer-section a:hover {
  opacity: 1;
  color: var(--accent-sage);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0.8;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  /* Mobile Menu */
  .menu-toggle {
    display: flex;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.active {
    max-height: 400px;
  }
  .main-nav a {
    padding: 1rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid var(--warm-beige);
  }

  /* Hero */
  .hero-image {
    height: 400px;
  }
  .hero-content h2 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1.1rem;
  }

  /* Content */
  .intro-content h2 {
    font-size: 1.6rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .cta-content h2 {
    font-size: 1.8rem;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  .recipe-header h1 {
    font-size: 2rem;
  }
  .recipe-meta-bar {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-image {
    height: 300px;
  }
  .hero-content h2 {
    font-size: 1.6rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .btn {
    width: 100%;
    text-align: center;
  }
  .cta-buttons {
    flex-direction: column;
  }
  
  
  
}
/* === ABOUT PAGE - LEFT ALIGN OVERRIDE === */
.intro-section {
  text-align: left;
}

.intro-content {
  text-align: left;
}

.intro-content h2 {
  text-align: left;
}

.intro-content p,
.intro-content ul,
.intro-content li {
  text-align: left;
}

.intro-content ul {
  padding-left: 2rem;
  margin-left: 0;
  list-style-position: outside;
}

/* Recipe Tags - Clickable Links */
.tag-link {
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tag-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: var(--primary-green, #4a7c59);
}
/* Article grid layout */
.articles-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 2rem; 
}

.article-card { 
    background: var(--white); 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: var(--shadow-sm); 
    transition: var(--transition); 
    display:flex; 
    flex-direction:column; 
}

.article-card:hover { 
    transform: translateY(-6px); 
    box-shadow: var(--shadow-lg); 
}

.article-card img { 
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
}

.article-content { 
    padding: 1.5rem; 
    flex-grow:1; 
    display:flex; 
    flex-direction:column; 
    justify-content:space-between; 
}

.article-title { 
    font-size: 1.4rem; 
    font-weight:600; 
    color: var(--primary-green); 
    margin-bottom:0.5rem; 
}

.article-summary { 
    font-size:0.95rem; 
    color: var(--text-medium); 
    margin-bottom:1rem; 
    flex-grow:1; 
}

.read-more { 
    align-self:flex-start; 
    background: var(--primary-green); 
    color: var(--white); 
    text-decoration:none; 
    padding:0.5rem 1rem; 
    border-radius:6px; 
    transition:var(--transition); 
    font-weight:600; 
}

.read-more:hover { 
    background: var(--primary-dark); 
}
/* Article page styles */
.article-container { 
    padding: 3rem 2rem; 
    max-width: 800px; 
    margin: 0 auto; 
}

.article-header { 
    margin-bottom: 2rem; 
    text-align: center; 
}

.article-header h1 { 
    font-size: 2rem; 
    color: var(--primary-green); 
}

.article-meta { 
    font-size: 0.9rem; 
    color: var(--text-medium); 
    margin-top: 0.5rem; 
}

.post-image { 
    margin-bottom: 2rem; 
    text-align: center; 
}

.post-image img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 12px; 
    box-shadow: var(--shadow-sm); 
}

.article-content { 
    font-size: 1.05rem; 
    line-height: 1.6; 
    color: var(--text-dark); 
}

.article-references { 
    margin-top: 2rem; 
    padding: 1rem; 
    border-left: 4px solid var(--primary-green); 
    background: #f9f9f9; 
}



