/* Base Styles and Variables */
:root {
  --primary-color: #6b7d64;
  --primary-dark: #4a5a43;
  --primary-light: #8a9c83;
  --secondary-color: #e6d3b3;
  --accent-color: #e8a87c;
  --text-color: #333333;
  --light-text: #666666;
  --lighter-text: #999999;
  --white: #ffffff;
  --off-white: #f8f8f8;
  --light-gray: #f0f0f0;
  --medium-gray: #e0e0e0;
  --dark-gray: #aaaaaa;
  --black: #222222;
  --success-color: #5cb85c;
  --info-color: #5bc0de;
  --warning-color: #f0ad4e;
  --danger-color: #d9534f;
  --font-heading: 'Georgia', serif;
  --font-body: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  --border-radius: 4px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--black);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, .btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
}

button:hover, .btn:hover {
  background-color: var(--primary-dark);
  color: white;
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(107, 125, 100, 0.2);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

/* Header and Navigation */
header {
  background-color: var(--white);
  box-shadow: var(--box-shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

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

.logo img {
  height: 50px;
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
}

nav ul li {
  margin-left: 2rem;
}

nav ul li a {
  font-weight: 600;
  position: relative;
  padding-bottom: 0.25rem;
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-color);
  border-radius: 3px;
}

/* Hero Section */
.hero {
  background-color: var(--primary-light);
  background-image: linear-gradient(rgba(107, 125, 100, 0.8), rgba(107, 125, 100, 0.8)), url('images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 8rem 0;
  margin-top: 74px; /* Header height */
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Page Header */
.page-header {
  background-color: var(--primary-light);
  background-image: linear-gradient(rgba(107, 125, 100, 0.8), rgba(107, 125, 100, 0.8)), url('images/page-header-bg.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 6rem 0 4rem;
  text-align: center;
  margin-top: 74px; /* Header height */
}

.page-header h1 {
  color: var(--white);
}

/* Featured Posts Section */
.featured-posts,
.related-posts {
  padding: 4rem 0;
  background-color: var(--off-white);
}

.featured-posts h2,
.related-posts h2 {
  text-align: center;
  margin-bottom: 3rem;
}

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

.posts-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.post-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.post-image {
  height: 200px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  color: var(--light-text);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.post-meta .date {
  margin-right: 1rem;
}

.post-meta .category {
  color: var(--accent-color);
}

.post-content h2, 
.post-content h3 {
  margin-bottom: 0.75rem;
}

.post-content p {
  margin-bottom: 1rem;
  flex-grow: 1;
}

.read-more {
  font-weight: 600;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  margin-top: auto;
}

.read-more::after {
  content: '→';
  margin-left: 0.25rem;
  transition: var(--transition);
}

.read-more:hover::after {
  margin-left: 0.5rem;
}

/* Newsletter Section */
.newsletter {
  background-color: var(--secondary-color);
  padding: 4rem 0;
  text-align: center;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter h2 {
  margin-bottom: 1rem;
}

.newsletter p {
  margin-bottom: 2rem;
}

.email-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.form-group {
  flex-grow: 1;
  position: relative;
}

.newsletter .btn {
  min-width: 120px;
}

/* Tooltip styles */
.tooltip {
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
  cursor: pointer;
}

.info-icon {
  fill: var(--dark-gray);
  vertical-align: middle;
}

.tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--black);
  color: var(--white);
  text-align: center;
  border-radius: var(--border-radius);
  padding: 0.5rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.75rem;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--black) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Footer */
footer {
  background-color: var(--black);
  color: var(--white);
  padding: 4rem 0 2rem;
}

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

.footer-logo img {
  height: 60px;
  margin-bottom: 1rem;
}

.footer-links h3,
.footer-policies h3,
.footer-contact h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-links ul,
.footer-policies ul {
  list-style: none;
  margin: 0;
}

.footer-links li,
.footer-policies li {
  margin-bottom: 0.75rem;
}

.footer-links a,
.footer-policies a {
  color: var(--medium-gray);
}

.footer-links a:hover,
.footer-policies a:hover {
  color: var(--white);
}

.footer-contact p {
  margin-bottom: 0.75rem;
  color: var(--medium-gray);
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.social-icons a:hover {
  background-color: var(--primary-color);
}

.social-icons svg {
  fill: var(--white);
  width: 18px;
  height: 18px;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--dark-gray);
  font-size: 0.875rem;
}

/* Blog Post Page */
.blog-post {
  padding: 6rem 0 4rem;
  margin-top: 74px; /* Header height */
}

.post-header {
  text-align: center;
  margin-bottom: 3rem;
}

.post-header h1 {
  margin-bottom: 1.5rem;
}

.author {
  display: inline-flex;
  align-items: center;
  margin: 1rem 0;
}

.author-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1rem;
}

.author-info {
  text-align: left;
}

.author-name {
  font-weight: 600;
  display: block;
}

.author-title {
  color: var(--light-text);
  font-size: 0.875rem;
}

.post-featured-image {
  margin-bottom: 3rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.post-featured-image img {
  width: 100%;
  height: auto;
}

.post-content {
  max-width: 800px;
  margin: 0 auto 3rem;
}

.post-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
  margin-bottom: 2rem;
}

.post-content li {
  margin-bottom: 0.75rem;
}

.post-content strong {
  font-weight: 600;
  color: var(--black);
}

.post-tags {
  margin-bottom: 2rem;
}

.post-tags span {
  font-weight: 600;
  margin-right: 0.5rem;
}

.post-tags a {
  display: inline-block;
  background-color: var(--light-gray);
  color: var(--light-text);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.post-tags a:hover {
  background-color: var(--primary-light);
  color: var(--white);
}

.post-share {
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
}

.post-share span {
  font-weight: 600;
  margin-right: 1rem;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
  padding: 2rem 0;
  margin-bottom: 4rem;
}

.prev-post,
.next-post {
  max-width: 45%;
}

.prev-post span,
.next-post span {
  display: block;
  color: var(--light-text);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.prev-post a,
.next-post a {
  font-weight: 600;
  font-size: 1.125rem;
}

.next-post {
  text-align: right;
}

/* Blog Posts Page */
.blog-posts {
  padding: 4rem 0;
}

/* About Page */
.about-intro {
  padding: 4rem 0;
}

.about-intro .container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: center;
}

.about-content h2 {
  margin-top: 0;
}

.about-image {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.team-section {
  padding: 4rem 0;
  background-color: var(--off-white);
}

.team-section h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.team-member {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  text-align: center;
  padding-bottom: 2rem;
}

.team-member img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.team-member h3 {
  margin: 1.5rem 0 0.25rem;
}

.team-member p {
  margin: 0 1.5rem 1rem;
}

.team-member p:first-of-type {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--light-gray);
  border-radius: 50%;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
}

.social-links svg {
  fill: var(--text-color);
  width: 18px;
  height: 18px;
}

.social-links a:hover svg {
  fill: var(--white);
}

.values-section {
  padding: 4rem 0;
}

.values-section h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.value-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

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

.value-icon {
  margin-bottom: 1.5rem;
}

.value-icon svg {
  fill: var(--primary-color);
}

.value-card h3 {
  margin-bottom: 1rem;
}

.value-card p {
  margin-bottom: 0;
}

.research-section {
  padding: 4rem 0;
  background-color: var(--off-white);
}

.research-section .container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: center;
}

.research-content h2 {
  margin-top: 0;
}

.research-list {
  margin-bottom: 2rem;
}

.research-list li {
  margin-bottom: 1.5rem;
}

.research-image {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

/* Contact Page */
.contact-section {
  padding: 4rem 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.info-card {
  background-color: var(--off-white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.info-card:hover {
  box-shadow: var(--box-shadow);
}

.info-icon {
  margin-bottom: 1rem;
}

.info-icon svg {
  fill: var(--primary-color);
}

.info-card h3 {
  margin-bottom: 0.75rem;
}

.info-card p {
  margin-bottom: 0.5rem;
}

.info-card p.small {
  font-size: 0.875rem;
  color: var(--light-text);
}

.contact-form-container {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
}

.contact-form-container h2 {
  margin-bottom: 2rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.contact-form .checkbox-group {
  display: flex;
  align-items: flex-start;
}

.contact-form .checkbox-group input {
  width: auto;
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}

.contact-form .checkbox-group label {
  font-weight: normal;
}

.map-section {
  padding: 4rem 0;
  background-color: var(--off-white);
}

.map-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.map-container {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  height: 400px;
}

.map-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faq-section {
  padding: 4rem 0;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 2rem;
}

.faq-item {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
}

.faq-item h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.faq-item p {
  margin-bottom: 0;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-icon {
  margin-bottom: 1.5rem;
}

.modal-icon svg {
  fill: var(--success-color);
}

.modal h2 {
  margin-bottom: 1rem;
}

.modal p {
  margin-bottom: 2rem;
}

.modal-btn {
  min-width: 120px;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.cookie-content p {
  margin-bottom: 1rem;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-cookie {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
}

.btn-cookie.accept {
  background-color: var(--success-color);
  color: white;
}

.btn-cookie.customize {
  background-color: var(--light-gray);
  color: var(--text-color);
}

.btn-cookie.decline {
  background-color: var(--light-gray);
  color: var(--text-color);
}

.cookie-link {
  margin-left: 1rem;
  font-size: 0.875rem;
}

/* Media Queries */
@media (max-width: 992px) {
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .hero {
    padding: 6rem 0;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .contact-layout,
  .about-intro .container,
  .research-section .container {
    grid-template-columns: 1fr;
  }
  
  .research-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  nav {
    position: fixed;
    top: 74px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }
  
  nav.show {
    transform: translateY(0);
  }
  
  nav ul {
    flex-direction: column;
    padding: 0 1.5rem;
  }
  
  nav ul li {
    margin: 0 0 1rem 0;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .posts-grid,
  .team-grid,
  .values-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
  
  .post-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .prev-post,
  .next-post {
    max-width: 100%;
  }
  
  .next-post {
    text-align: left;
  }
  
  .email-form {
    flex-direction: column;
  }
  
  .newsletter .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .hero {
    padding: 5rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .cookie-content {
    text-align: center;
  }
  
  .cookie-buttons {
    justify-content: center;
  }
  
  .post-share {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-share span {
    margin-bottom: 0.5rem;
  }
}
