/**
 * Homepage Custom Styles
 *
 * Styles for front-page.php that can't be achieved with kahunam.css utilities.
 * Uses CSS custom properties from style.css (:root)
 */

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-accent {
  color: var(--bright-green-accent);
}

.text-accent-light {
  color: #7ED957;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(12, 61, 61, 0.85) 0%,
    rgba(12, 61, 61, 0.7) 100%
  );
}

.hero-content {
  color: #fff;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.hero-stars svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Hero Buttons */
.hero-buttons .button-accent,
.hero-buttons .button-secondary,
.hero-buttons .button-primary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.hero-buttons .button-accent {
  background-color: var(--bright-green-accent);
  color: var(--dark-forest-green);
}

.hero-buttons .button-accent:hover {
  background-color: #4bc94b;
  color: var(--dark-forest-green);
}

.hero-buttons .button-secondary {
  background-color: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-buttons .button-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.hero-buttons .button-primary {
  background-color: var(--dark-forest-green);
  color: #fff;
}

.hero-buttons .button-primary:hover {
  background-color: #0a3030;
  color: #fff;
}

.hero-title {
  color: #fff;
  max-width: 600px;
}

.hero-subtitle {
  max-width: 500px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-logo-img {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

/* ==========================================================================
   Feature Section
   ========================================================================== */

.feature-section {
  background-color: #fff;
}

.feature-check {
  width: 20px;
  height: 20px;
  background-color: var(--bright-green-accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-check::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* ==========================================================================
   Courses Section
   ========================================================================== */

.courses-section {
  background-color: var(--faint-green);
}

.course-card {
  display: block;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
}

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

.course-card-image img {
  height: 200px;
}

.course-badge {
  top: 12px;
  left: 12px;
  background-color: var(--bright-green-accent);
  color: #000;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 4px;
}

.course-card-content h3 {
  color: var(--dark-forest-green);
}

.course-card-content p {
  color: #666;
}

/* ==========================================================================
   Testimonial Section
   ========================================================================== */

.testimonial-section {
  background-color: #fff;
}

.testimonial-quotes-carousel {
  min-height: 280px;
}

.testimonial-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.testimonial-card.active {
  position: relative;
  opacity: 1;
  visibility: visible;
}

.testimonial-quote-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--grey-green);
}

.testimonial-quote-item:last-child {
  border-bottom: none;
}

.quote-stars {
  display: flex;
  gap: 2px;
}

.testimonial-quote-item p {
  color: #333;
  font-style: italic;
  margin: 0;
}

.testimonial-image {
  aspect-ratio: 4 / 3;
}

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

.testimonial-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.testimonial-dots .dot.active {
  background-color: var(--bright-green-accent);
}

/* ==========================================================================
   Logo Bar Section
   ========================================================================== */

.logo-bar-section {
  background-color: #fff;
  border-top: 1px solid var(--grey-green);
  border-bottom: 1px solid var(--grey-green);
}

.client-logo-img {
  height: 30px;
  width: auto;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.client-logo-img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* ==========================================================================
   CTA Box Section
   ========================================================================== */

.cta-box-section {
  background-color: #fff;
}

.cta-box {
  background-color: var(--dark-forest-green);
  color: #fff;
}

.cta-box h2 {
  color: #fff;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.85);
}

.button-outline-light {
  background-color: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s, border-color 0.3s;
}

.button-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.price-tag {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
}

/* ==========================================================================
   Newsletter Section
   ========================================================================== */

.newsletter-section {
  background-color: var(--faint-green);
}

.newsletter-input {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--grey-green);
  background: #fff;
  font-size: 16px;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--bright-green-accent);
}

.newsletter-links a {
  color: #666;
  text-decoration: none;
}

.newsletter-links a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Articles Section
   ========================================================================== */

.articles-section {
  background-color: #fff;
}

/* ==========================================================================
   GSAP Slider Base
   ========================================================================== */

.gsap-slider {
  grid-column-gap: 2em;
  grid-row-gap: 2em;
  flex-flow: column;
  align-items: center;
  width: 100%;
  padding-left: 5vw;
  padding-right: 5vw;
  display: flex;
  position: relative;
  overflow: hidden;
}

.gsap-slider__collection {
  width: 100%;
  max-width: 90em;
}

.gsap-slider__list {
  -webkit-user-select: none;
  user-select: none;
  will-change: transform;
  touch-action: pan-y;
  backface-visibility: hidden;
  display: flex;
}

.gsap-slider__item {
  width: calc(((100% - 1px) - (var(--slider-spv) - 1) * var(--slider-gap)) / var(--slider-spv));
  margin-right: var(--slider-gap);
  flex: none;
}

/* Slider Setup Variables */
[data-gsap-slider-init] {
  --slider-status: on;
  --slider-spv: 3;
  --slider-gap: 1.5em;
}

@media screen and (max-width: 991px) {
  [data-gsap-slider-init] {
    --slider-status: on;
    --slider-spv: 2.25;
    --slider-gap: 1.5em;
  }
}

@media screen and (max-width: 767px) {
  [data-gsap-slider-init] {
    --slider-status: on;
    --slider-spv: 1.15;
    --slider-gap: 1em;
  }
}

[data-gsap-slider-item]:last-child {
  margin-right: 0;
}

/* Slider Controls */
.gsap-slider__controls {
  grid-column-gap: 0.5em;
  grid-row-gap: 0.5em;
  justify-content: center;
  align-items: center;
  display: flex;
}

.gsap-slider__control {
  color: var(--dark-forest-green);
  background-color: #fff;
  border: 1px solid var(--grey-green);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gsap-slider__control:hover {
  background-color: var(--faint-green);
  border-color: var(--dark-forest-green);
}

[data-gsap-slider-status="not-active"] [data-gsap-slider-controls] {
  display: none;
}

[data-gsap-slider-control-status="not-active"] {
  opacity: 0.3;
  pointer-events: none;
}

/* ==========================================================================
   Article Cards
   ========================================================================== */

.article-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.article-card-image {
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
  background-color: var(--faint-green);
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--faint-green) 0%, var(--grey-green) 100%);
}

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

/* Category badges on image */
.article-categories {
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.article-category-badge {
  background-color: var(--bright-green-accent);
  color: #000;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 4px;
}

/* Article meta */
.article-meta {
  font-size: 13px;
  color: #666;
}

.article-meta-icon {
  opacity: 0.6;
  flex-shrink: 0;
}

.article-date {
  font-weight: 500;
}

.article-meta-separator {
  opacity: 0.4;
}

.article-author {
  opacity: 0.8;
}

/* Article title */
.article-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--dark-forest-green);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-link:hover .article-title {
  text-decoration: underline;
}

/* Inactive slide states */
[data-gsap-slider-item-status="not-active"] .article-card {
  opacity: 0.5;
}

[data-gsap-slider-item-status="not-active"] .article-card,
[data-gsap-slider-item-status="inview"] .article-card {
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .feature-grid-responsive,
  .testimonial-grid-responsive,
  .cta-grid-responsive {
    grid-template-columns: 1fr;
  }

  .feature-grid-responsive .feature-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 70vh;
  }

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

  .newsletter-input {
    max-width: 100%;
  }

  .newsletter-links span {
    display: none;
  }

  .newsletter-links {
    flex-direction: column;
    gap: 8px;
  }

  .cta-box {
    padding: 2rem;
  }

  .k-hidden-mobile {
    display: none;
  }
}
