/* Base styles and resets */
:root {
  --primary-color: #4c6ef5;
  --primary-dark: #364fc7;
  --primary-light: #748ffc;
  --secondary-color: #fd7e14;
  --text-color: #343a40;
  --text-light: #868e96;
  --bg-color: #f8f9fa;
  --bg-accent: #e9ecef;
  --border-color: #dee2e6;
  --success-color: #37b24d;
  --danger-color: #f03e3e;
  --warning-color: #f59f00;
  --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-serif: 'Merriweather', Georgia, Times, serif;
  --font-mono: 'Roboto Mono', 'Courier New', Courier, monospace;
  --transition: all 0.3s ease;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
  --radius: 6px;
}

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

html {
  font-size: 62.5%; /* 10px = 1rem */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul, ol {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

h1 { font-size: 3.6rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 2.4rem; }
h4 { font-size: 2rem; }
h5 { font-size: 1.8rem; }
h6 { font-size: 1.6rem; }

p {
  margin-bottom: 1.5rem;
}

/* Container and Layout */
.container {
  width: 100%;
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  text-align: center;
  text-transform: none;
}

.btn:hover, .btn:focus {
  background-color: var(--primary-dark);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background-color: var(--primary-color);
}

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

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

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

.welcome-banner {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 1.4rem;
}

header .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
}

.logo {
  flex: 0 0 auto;
  margin-right: 2rem;
}

.logo img {
  max-height: 5rem;
  border-radius: var(--radius);
}

header h1 {
  font-size: 2.4rem;
  margin-bottom: 0;
  flex: 1;
}

.tagline {
  display: block;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-light);
}

nav {
  flex: 0 0 auto;
}

nav ul {
  display: flex;
  gap: 2rem;
}

nav a {
  font-weight: 500;
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

nav a:hover, 
nav a:focus,
nav a.active {
  color: var(--primary-color);
  background-color: var(--bg-accent);
}

/* Featured post */
.featured-post {
  display: flex;
  margin: 4rem 0;
  background-color: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  flex-direction: column;
}

.featured-post img {
  width: 100%;
  height: 30rem;
  object-fit: cover;
}

.featured-content {
  padding: 2rem;
}

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

.post-meta {
  font-size: 1.4rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  display: block;
}

/* Posts grid */
.section-title {
  margin-top: 4rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

.section-title:after {
  content: "";
  display: block;
  width: 6rem;
  height: 0.3rem;
  background-color: var(--primary-color);
  margin: 1.5rem auto 0;
  border-radius: 2px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
  gap: 3rem;
  margin: 3rem 0;
}

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

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.post-card img {
  height: 20rem;
  object-fit: cover;
  width: 100%;
}

.post-card h3 {
  font-size: 1.8rem;
  margin: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.post-card p {
  padding: 0 1.5rem;
  color: var(--text-light);
}

.post-card .btn {
  margin: 1.5rem;
  align-self: flex-start;
  margin-top: auto;
}

/* Newsletter section */
.newsletter-section {
  background-color: var(--primary-color);
  color: white;
  padding: 6rem 0;
  margin: 6rem 0;
}

.newsletter-content {
  text-align: center;
  max-width: 60rem;
  margin: 0 auto;
}

.newsletter-content h2 {
  color: white;
  font-size: 3rem;
  margin-bottom: 2rem;
}

.newsletter-form {
  display: flex;
  margin-top: 3rem;
  max-width: 50rem;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 1.2rem 1.5rem;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 1.6rem;
}

.newsletter-form button {
  border-radius: 0 var(--radius) var(--radius) 0;
  background-color: var(--secondary-color);
  padding: 1.2rem 2.5rem;
}

.newsletter-form button:hover {
  background-color: darken(var(--secondary-color), 10%);
}

/* Footer */
footer {
  background-color: var(--text-color);
  color: white;
  padding: 5rem 0 2rem;
  font-size: 1.4rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.footer-section {
  flex: 1;
  min-width: 25rem;
  margin-bottom: 2rem;
  padding-right: 2rem;
}

.footer-section h3 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-section h3:after {
  content: "";
  display: block;
  width: 4rem;
  height: 0.2rem;
  background-color: var(--primary-light);
  margin-top: 1rem;
}

.footer-section p {
  margin-bottom: 1rem;
  opacity: 0.8;
}

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

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

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

.icon {
  width: 2rem;
  height: 2rem;
  fill: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: white;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary-light);
}

/* Blog post page */
.blog-post {
  background-color: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 4rem 0;
}

.post-header {
  padding: 3rem;
  padding-bottom: 0;
}

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

.post-featured-image {
  margin: 3rem 0;
  width: 100%;
  max-height: 50rem;
  object-fit: cover;
}

.post-content {
  padding: 0 3rem 3rem;
}

.post-content h2 {
  margin-top: 3rem;
  font-size: 2.6rem;
}

.post-content h3 {
  margin-top: 2.5rem;
  font-size: 2.2rem;
}

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

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

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

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.post-tags span {
  font-weight: 700;
}

.post-tags a {
  display: inline-block;
  background-color: var(--bg-accent);
  color: var(--text-color);
  padding: 0.5rem 1.2rem;
  border-radius: 2rem;
  font-size: 1.4rem;
}

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

.related-posts {
  margin: 5rem 0;
}

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

/* About page */
.about-page {
  background-color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 4rem;
  margin: 4rem 0;
}

.about-intro {
  text-align: center;
  max-width: 80rem;
  margin: 0 auto 5rem;
}

.our-mission {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  margin-bottom: 5rem;
}

.mission-content {
  flex: 1;
  min-width: 30rem;
}

.mission-image {
  flex: 1;
  min-width: 30rem;
}

.mission-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.team-section {
  margin-top: 5rem;
}

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

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

.team-member {
  background-color: var(--bg-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

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

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

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

.team-member p:first-of-type {
  font-weight: 500;
  color: var(--primary-color);
}

.team-member .social-icons {
  justify-content: center;
  margin-bottom: 2rem;
}

.team-member .social-icons a {
  background-color: var(--bg-accent);
}

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

.team-member .icon {
  fill: var(--text-color);
}

.team-member .social-icons a:hover .icon {
  fill: white;
}

.testimonials {
  margin-top: 6rem;
}

.testimonials h2 {
  text-align: center;
  margin-bottom: 4rem;
}

.testimonial-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: 3rem;
}

.testimonial {
  background-color: var(--bg-accent);
  padding: 3rem;
  border-radius: var(--radius);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.testimonial:before {
  content: """;
  font-family: Georgia, serif;
  font-size: 8rem;
  position: absolute;
  top: -1rem;
  left: 1rem;
  color: rgba(0, 0, 0, 0.1);
  line-height: 1;
}

.quote {
  font-style: italic;
  margin-bottom: 2rem;
}

.author {
  font-weight: 700;
  margin-bottom: 0;
}

/* Contact page */
.contact-page {
  background-color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 4rem;
  margin: 4rem 0;
}

.contact-page h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.contact-intro {
  text-align: center;
  max-width: 70rem;
  margin: 0 auto 4rem;
}

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

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
  gap: 2rem;
}

.contact-card {
  background-color: var(--bg-color);
  padding: 3rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.icon-wrapper {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 2rem;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.contact-card .icon {
  width: 3rem;
  height: 3rem;
  fill: white;
}

.contact-card h3 {
  margin-bottom: 1.5rem;
}

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

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

.contact-form-container h3 {
  margin-bottom: 2rem;
  text-align: center;
}

.contact-form {
  display: grid;
  gap: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  padding: 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1.6rem;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 110, 245, 0.2);
}

.consent-checkbox {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.consent-checkbox input {
  margin-top: 0.4rem;
}

.consent-checkbox label {
  margin-bottom: 0;
  font-size: 1.4rem;
}

.map-container {
  margin-top: 5rem;
}

.map-container h3 {
  text-align: center;
  margin-bottom: 2rem;
}

.map {
  height: 40rem;
  border-radius: var(--radius);
  overflow: hidden;
}

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

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

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

.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.4rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--text-color);
}

.modal-icon {
  width: 8rem;
  height: 8rem;
  margin: 0 auto 2rem;
  background-color: var(--success-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-icon svg {
  width: 4rem;
  height: 4rem;
  fill: white;
}

.modal-content h3 {
  margin-bottom: 1.5rem;
  font-size: 2.4rem;
}

.modal-content p {
  margin-bottom: 2.5rem;
}

.close-btn {
  background-color: var(--success-color);
}

.close-btn:hover {
  background-color: darken(var(--success-color), 10%);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
  display: none;
}

.cookie-content {
  max-width: 120rem;
  margin: 0 auto;
  padding: 2rem;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

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

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

.btn-reject {
  background-color: var(--danger-color);
}

.cookie-more-info {
  font-size: 1.4rem;
  margin-bottom: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  html {
    font-size: 58%;
  }

  header .container {
    flex-direction: column;
    padding: 1.5rem;
  }

  .logo {
    margin-right: 0;
    margin-bottom: 1.5rem;
  }

  header h1 {
    margin-bottom: 1.5rem;
    text-align: center;
  }

  nav ul {
    justify-content: center;
  }

  .featured-post {
    flex-direction: column;
  }

  .featured-post img {
    width: 100%;
    height: auto;
    max-height: 30rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input {
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
  }

  .newsletter-form button {
    border-radius: var(--radius);
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-section {
    min-width: 100%;
    margin-bottom: 3rem;
    padding-right: 0;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .about-page,
  .contact-page {
    padding: 3rem;
  }

  .contact-card {
    padding: 2rem;
  }

  .cookie-content {
    padding: 1.5rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .featured-post {
    flex-direction: column;
  }
  
  .footer-section {
    min-width: 45%;
  }
}
