/* Homepage full-width styling overrides */
.homepage-content {
  width: 100%;
  margin: 0;
  padding: 0;
  max-width: none;
}

/* Override any CKAN default container constraints */
body.eoc-theme.homepage {
  overflow-x: hidden;
}

.main-banner,
.blog-section,
.partners-section,
.testimonials-section,
.faqs-section {
  width: 100%;
}

.main-banner .container,
.blog-section .container,
.partners-section .container,
.testimonials-section .container,
.faqs-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Hero Section Styles */
.main-banner {
  position: relative;
  min-height: 70vh;
  max-height: min(700px, 80vh);
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("/eoc/images/poster-cover.webp");
  background-size: cover;
  background-position: center right;
  z-index: -1;
}

.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(46, 107, 71, 0.9) 0%,
    rgba(46, 107, 71, 0.7) 70%,
    rgba(46, 107, 71, 0) 100%
  );
  z-index: 0;
}

.banner-content {
  position: relative;
  z-index: 1;
}

.banner-text {
  max-width: 37.5rem;
  padding: calc(var(--spacing-unit) * 1.875) 0;
}

.banner-text h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  margin-bottom: calc(var(--spacing-unit) * 1.25);
  line-height: var(--leading-tight);
}

.banner-text p {
  font-size: var(--text-md);
  font-weight: var(--font-regular);
  margin-bottom: calc(var(--spacing-unit) * 1.875);
  line-height: var(--leading-relaxed);
}

.btn-cta {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--white);
  font-weight: var(--font-bold);
  padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.875);
  border-radius: 30px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-cta:hover {
  background-color: var(--secondary-dark);
  color: white;
  text-decoration: none;
}

/* Blog Section */
.blog-section {
  padding: var(--section-padding) 0;
  background-color: var(--bg-light-green);
}

.blog-section .section-title {
  font-weight: var(--font-bold);
  font-size: var(--text-3xl-lg);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--primary-dark);
}

.section-title-break {
  display: block;
}

.blog-card {
  position: relative;
  overflow: hidden;
  transition:
    var(--transition-normal),
    box-shadow 0.3s;
  margin-bottom: calc(var(--spacing-unit) * 1.5);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-image:hover {
  transform: translateY(-0.3125rem);
  box-shadow: var(--shadow-md);
}

.blog-image {
  border-radius: var(--card-radius);
  height: min(13.75rem, 50vh);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.blog-title {
  color: var(--primary-dark);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-bottom: 0.5rem;
  line-height: var(--leading-tight);
}

.blog-summary {
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  margin-bottom: 0.75rem;
}

/* Partners Section */
.partners-section {
  padding: var(--section-padding) 0;
  background-color: var(--white);
}

.partners-section .section-title {
  font-weight: var(--font-regular);
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 2.5);
  color: var(--text-primary);
}

.partners-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(var(--spacing-unit) * 1.25);
  margin-top: calc(var(--spacing-unit) * 2.5);
  flex-wrap: nowrap;
}

.partner-logo {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--spacing-unit) * 0.625);
  transition: transform 0.3s ease;
  width: calc(100% / 6);
}

.partner-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .partner-logo {
    padding: calc(var(--spacing-unit) * 0.5);
  }
}

@media (max-width: 991px) {
  .partners-grid {
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 1.5);
  }

  .partner-logo {
    width: calc(33.333% - var(--spacing-unit));
  }
}

@media (max-width: 576px) {
  .partner-logo {
    width: calc(50% - var(--spacing-unit));
    height: 4rem;
  }

  .blog-content {
    padding: var(--spacing-unit);
    margin-top: 0.5rem;
  }

  .blog-title {
    font-size: var(--text-lg);
    margin-bottom: 0.375rem;
  }
}

/* Testimonials Section */
.testimonials-section {
  padding: var(--section-padding) 0;
}

.testimonial-wrapper {
  width: 100%;
  overflow: hidden;
}

.testimonial-content {
  padding: var(--spacing-xl) var(--spacing-lg);
  background-color: var(--white);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition:
    opacity 0.4s ease-in-out,
    transform 0.4s ease-in-out;
}

.testimonial-quote {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
}

.testimonial-quote h3 {
  font-size: var(--text-2xl-lg);
  line-height: var(--leading-relaxed);
  font-weight: var(--font-semibold);
  color: var(--primary-dark);
  position: relative;
  padding-left: var(--spacing-lg);
}

.testimonial-quote h3:before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -1rem;
  font-size: 3.75rem;
  color: var(--primary-dark);
  line-height: 1;
}

.testimonial-quote h3:after {
  content: "\201D";
  position: absolute;
  font-size: 3.75rem;
  color: var(--primary-dark);
  line-height: 1;
}

/* Flex container for attribution and navigation */
.testimonial-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-sm);
}

.testimonial-attribution {
  display: flex;
  flex-direction: column;
}

.testimonial-attribution p {
  font-weight: var(--font-semibold);
  font-size: var(--text-md);
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.testimonial-attribution span {
  color: var(--light-text-color);
  font-size: var(--text-sm);
}

.testimonial-navigation {
  display: flex;
  gap: var(--spacing-sm);
}

.nav-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
  color: var(--text-primary);
  margin: 0 0.25rem;
}

.nav-button:hover {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.nav-button:active {
  background-color: var(--primary-dark);
  transform: translateY(0);
}

.testimonials-section .row {
  display: flex;
  flex-wrap: wrap;
}

.testimonials-section .col-md-6 {
  display: flex;
  flex-direction: column;
}

/* Testimonial image consistency */
.testimonial-image {
  height: 100%;
  position: relative;
  transition:
    opacity 0.4s ease-in-out,
    transform 0.4s ease-in-out;
}

.image-container {
  height: 100%;
  min-height: 350px;
  max-height: 450px;
  overflow: hidden;
}

.testimonial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Testimonial animations */
.testimonial-transition .testimonial-quote h3,
.testimonial-transition .testimonial-meta,
.testimonial-transition .image-container {
  animation: fadeTransition 0.6s ease-in-out;
}

@keyframes fadeTransition {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.testimonial-image {
  position: relative;
  overflow: visible;
  height: 100%;
}

.image-container {
  height: 100%;
  min-height: 450px;
  max-height: 550px;
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: var(--shadow-md);
}

.testimonial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.5s ease;
}

/* Add subtle hover effect */
.testimonial-image:hover img {
  transform: scale(1.03);
}

.overlay-info {
  position: absolute;
  bottom: var(--spacing-unit);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  padding: calc(var(--spacing-unit) * 1.25);
  width: auto;
  min-width: 90%;
  max-width: 95%;
  border: 1px solid rgba(255, 255, 255, 0.49);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--card-radius);
  display: flex;
  flex-direction: column;
}

/* Name and star rating in same row */
.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: calc(var(--spacing-unit) * 0.5);
  width: 100%;
}

.overlay-info h4 {
  font-size: var(--text-2xl-lg);
  font-weight: var(--font-semibold);
  margin: 0;
  flex: 1;
}

.overlay-info p {
  margin-bottom: calc(var(--spacing-unit) * 0.5);
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  color: rgba(255, 255, 255, 0.8);
}

.overlay-info .organization {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.star-rating {
  display: flex;
  justify-content: flex-end;
  color: white;
  margin: 0;
  white-space: nowrap;
}

.star-rating i {
  margin-left: 0.25rem;
}

/* FAQs Section */
.faqs-section {
  padding: var(--section-padding) 0;
  background-color: var(--bg-light-green);
}

.faqs-section .section-title {
  font-weight: var(--font-semibold);
  font-size: var(--text-3xl-lg);
  line-height: var(--leading-tight);
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 1.25);
  color: var(--primary-dark);
}

.section-subtitle {
  text-align: center;
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: var(--font-regular);
  max-width: 43.75rem;
  margin: 0 auto calc(var(--spacing-unit) * 2.5);
}

.faqs-accordion {
  max-width: 50rem;
  margin: 0 auto;
  border-top: 1px solid var(--border-light);
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  border-left: none;
  border-right: none;
  overflow: hidden;
}

.faq-question {
  padding: calc(var(--spacing-unit) * 1.125) calc(var(--spacing-unit) * 1.25);
  font-weight: var(--font-medium);
  font-size: var(--text-md);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s;
}

/* Circular toggle icon styling */
.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: var(--text-md);
  color: var(--icon-gray);
  border: 2px solid #98a2b3;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
  line-height: 1;
  font-weight: var(--font-semibold);
}

.faq-answer {
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  padding: 0 calc(var(--spacing-unit) * 1.25);
  max-height: 0;
  overflow: hidden;
  color: var(--text-primary);
  line-height: var(--leading-normal);
  transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 12.5rem;
  padding: 0 calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 1.25);
}

.faq-item.active .toggle-icon {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.faq-item.active .faq-question {
  font-weight: var(--font-semibold);
  color: var(--primary-color);
}

/* FAQ CTA button container */
.faq-cta-container {
  text-align: center;
  margin-top: calc(var(--spacing-unit) * 3);
}

.faq-cta-container .btn-cta {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--white);
  font-weight: var(--font-bold);
  padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.875);
  border-radius: 30px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.faq-cta-container .btn-cta:hover {
  background-color: var(--secondary-dark);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-banner {
    min-height: 50vh;
  }

  .banner-text h1 {
    font-size: var(--text-2xl);
  }

  .banner-text p {
    font-size: var(--text-base);
  }

  .testimonial-content {
    padding: var(--spacing-xl) var(--spacing-lg);
  }

  .testimonial-quote h3 {
    font-size: var(--text-lg);
  }

  .testimonial-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }

  .testimonial-navigation {
    align-self: flex-end;
    margin-top: var(--spacing-sm);
  }

  .testimonial-image {
    min-height: 18.75rem;
  }

  .overlay-info {
    max-width: 100%;
  }

  .masthead {
    padding: calc(var(--spacing-unit) * 0.625) 0;
  }

  .logo-container img {
    height: 1.875rem;
  }

  .collapse.navbar-collapse {
    width: 100%;
  }

  .header-actions {
    justify-content: space-between;
    width: 100%;
    margin-top: calc(var(--spacing-unit) * 0.625);
    flex-direction: column;
    align-items: flex-start;
  }

  .expandable-search {
    width: 100%;
    margin-bottom: calc(var(--spacing-unit) * 0.625);
  }

  .expandable-search.active .search-input-container {
    width: 100%;
  }

  .navbar-collapse {
    background-color: #fff;
    border-top: 1px solid #eee;
    margin-top: calc(var(--spacing-unit) * 0.9375);
  }

  .blog-content {
    padding: calc(var(--spacing-unit) * 1.25);
  }

  .blog-title {
    font-size: calc(var(--text-lg) + 0.125rem);
    margin-bottom: calc(var(--spacing-unit) * 0.625);
  }

  .blog-summary {
    font-size: var(--text-base);
    margin-bottom: calc(var(--spacing-unit) * 0.875);
  }

  .partners-grid {
    gap: calc(var(--spacing-unit) * 1.25);
  }

  .partner-logo {
    height: 4rem;
    padding: calc(var(--spacing-unit) * 0.625);
  }

  .blog-section .section-title,
  .partners-section .section-title,
  .testimonials-section .section-title,
  .faqs-section .section-title {
    font-size: var(--text-2xl);
    margin-bottom: calc(var(--spacing-unit) * 2);
  }

  .faq-cta-container {
    margin-top: calc(var(--spacing-unit) * 2);
  }
}

@media (max-width: 576px) {
  .main-banner {
    min-height: 40vh;
  }

  .gradient-overlay {
    width: 100%;
    background: linear-gradient(
      0deg,
      rgba(46, 107, 71, 0.9) 0%,
      rgba(46, 107, 71, 0.7) 70%,
      rgba(46, 107, 71, 0.5) 100%
    );
  }

  .banner-text {
    text-align: center;
    padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 1);
  }

  .banner-text h1 {
    font-size: calc(var(--text-xl) + 0.25rem);
  }

  .blog-card {
    min-height: auto;
  }

  .blog-image {
    height: 10rem;
  }

  .testimonial-content,
  .overlay-info {
    padding: var(--spacing-unit);
  }

  .blog-section,
  .partners-section,
  .testimonials-section,
  .faqs-section {
    padding: calc(var(--section-padding) * 0.7) 0;
  }
}
