/*
 * Homepage Specific Styles
 */

/* 1. Hero Section & Animated Grid Background */
.hero-section {
    min-height: 70vh;
}

.hero-grid-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;

    /* Base grid using the brand's Clarity Blue */
    background-color: #FFFFFF;
    background-image: 
        linear-gradient(var(--chai-clarity-blue) 1px, transparent 1px),
        linear-gradient(to right, var(--chai-clarity-blue) 1px, transparent 1px);
    background-size: 40px 40px;
    
    /* Animation: Gently moves the grid */
    animation: grid-pan 60s linear infinite;
    opacity: 0.1; /* Subtle, as per blueprint */
}

@keyframes grid-pan {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 400px 400px;
    }
}

/* 2. Workshop Teaser Cards */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.07) !important;
}

/* 3. Testimonial Carousel Controls */
#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
    background-color: var(--chai-deep-charcoal);
    border-radius: 50%;
    padding: 1.2rem;
}

#testimonialCarousel .carousel-indicators button {
    background-color: var(--chai-deep-charcoal);
}

/* hero */
.hero-section {
    position: relative;
    padding-top: 3rem;
    padding-bottom: 3rem;
}
@media (min-width: 768px) {
    .hero-section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}
.hero-section .display-3 {
    line-height: 1.15;
    font-size: clamp(2rem, 2.2vw, 3rem);
    color: var(--chai-deep-charcoal, #212529);
    margin-bottom: 1rem;
}
.hero-section .lead {
    font-size: 1.125rem;
    line-height: 1.5;
    color: rgba(0,0,0,0.7);
    max-width: 42ch;
    margin-top: 1rem !important;
    margin-bottom: 1.5rem !important;
}
@media (max-width: 768px) {
    .hero-section .lead {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}
.hero-section .btn.btn-lg {
    border-radius: 0.6rem;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.hero-section .btn.btn-outline-dark:hover,
.hero-section .btn.btn-outline-dark:focus {
    background-color: #000;
    color: #fff;
    border-color: #000;
}
@media (max-width: 576px) {
    .hero-section .btn.btn-lg {
        width: 100%;
        text-align: center;
    }
}

/* hero bg motion accessibility */
.hero-grid-background {
    pointer-events: none;
    filter: blur(0.3px);
    mix-blend-mode: normal;
}
@media (prefers-reduced-motion: reduce) {
    .hero-grid-background {
        animation: none !important;
        background-position: 0 0 !important;
    }
}

/* workshops cards */
#workshops .card {
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
    background-color: #fff;
    transition: all 0.25s ease;
}
#workshops .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem !important;
}
#workshops .card-title {
    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--chai-deep-charcoal, #212529);
    margin-bottom: 0.5rem;
}
#workshops .card-text {
    font-size: 0.95rem;
    line-height: 1.45;
    color: rgba(0,0,0,0.7);
    margin-bottom: 1rem;
}
#workshops .card .btn.btn-outline-primary {
    font-weight: 600;
    border-radius: 0.5rem;
    line-height: 1.3;
    margin-top: auto;
}
#workshops .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

/* services block typography */
section.py-5 h2[style*="Roboto Slab"] {
    line-height: 1.25;
    font-size: clamp(1.4rem, 1.2vw, 1.8rem);
    font-weight: 600;
    color: var(--chai-deep-charcoal, #212529);
    margin-bottom: 1rem;
}
section.py-5 .lead {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(0,0,0,0.75);
}
section.py-5 .list-unstyled.lead.fs-6 li {
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(0,0,0,0.8);
}
section.py-5 .list-unstyled.lead.fs-6 i {
    font-size: 1.1rem;
    vertical-align: middle;
}

/* testimonial carousel */
#testimonialCarousel .carousel-inner {
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    background-color: #fff;
}
#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
    background-color: var(--chai-deep-charcoal, #212529);
    border-radius: 50%;
    padding: 1.2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.25);
}
#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
    width: auto;
    opacity: 1;
}
@media (max-width: 768px) {
    #testimonialCarousel .carousel-control-prev-icon,
    #testimonialCarousel .carousel-control-next-icon {
        padding: 0.9rem;
    }
}
#testimonialCarousel .carousel-indicators button {
    background-color: var(--chai-deep-charcoal, #212529);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.35;
    transition: opacity 0.15s linear;
}
#testimonialCarousel .carousel-indicators .active {
    opacity: 1;
}
#testimonialCarousel .fst-italic {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(0,0,0,0.8);
}
#testimonialCarousel h4[style*="Roboto Slab"] {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--chai-deep-charcoal, #212529);
    margin-bottom: 0.5rem;
}
#testimonialCarousel ~ .text-center .btn.btn-outline-dark.btn-lg {
    border-radius: 0.6rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
#testimonialCarousel ~ .text-center .btn.btn-outline-dark.btn-lg:hover,
#testimonialCarousel ~ .text-center .btn.btn-outline-dark.btn-lg:focus {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* === testimonial arrow + card visual tweaks === */

/* give the testimonial card a subtle border + soft radius + light shadow */
#testimonialCarousel .carousel-inner {
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
    background-color: #fff;
}

/* arrow buttons */
#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
    width: auto;
    opacity: 1;
    top: 50%;
    transform: translateY(-50%);
}

#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
    background-color: rgba(33,37,41,0.75); /* chai-deep-charcoal @ ~75% */
    border-radius: 50%;
    padding: 0.9rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    border: 1px solid rgba(0,0,0,0.25);
}

/* nudge arrows slightly away from card edges */
#testimonialCarousel .carousel-control-prev {
    left: -1.5rem;
}
#testimonialCarousel .carousel-control-next {
    right: -1.5rem;
}

@media (max-width: 768px) {
    #testimonialCarousel .carousel-control-prev {
        left: -1rem;
    }
    #testimonialCarousel .carousel-control-next {
        right: -1rem;
    }

    #testimonialCarousel .carousel-control-prev-icon,
    #testimonialCarousel .carousel-control-next-icon {
        padding: 0.7rem;
    }
}

/* heading accents for sections (brand colour usage) */
#workshops h2,
section.py-5 h2[style*="Roboto Slab"],
section.py-5.bg-canvas-white h2[style*="Roboto Slab"] {
    position: relative;
}
#workshops h2::after,
section.py-5 h2[style*="Roboto Slab"]::after,
section.py-5.bg-canvas-white h2[style*="Roboto Slab"]::after {
    content: "";
    display: block;
    width: 32px;
    height: 3px;
    background-color: var(--chai-insight-gold); /* gold accent bar */
    border-radius: 2px;
    margin: 0.75rem auto 0;
}
#workshops .text-center h2::after {
    margin-left: auto;
    margin-right: auto;
}

/* Testimonial arrows — brand styling */
#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
  background-color: var(--chai-clarity-blue);  /* brand blue pill */
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
  padding: 0.8rem;
}

/* Replace default glyphs with white chevrons */
#testimonialCarousel .carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L6.707 7l4.647 4.646a.5.5 0 1 1-.708.708l-5-5a.5.5 0 0 1 0-.708l5-5a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}
#testimonialCarousel .carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l5 5a.5.5 0 0 1 0 .708l-5 5a.5.5 0 1 1-.708-.708L9.293 7 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Slightly smaller on mobile */
@media (max-width: 768px) {
  #testimonialCarousel .carousel-control-prev-icon,
  #testimonialCarousel .carousel-control-next-icon {
    padding: 0.65rem;
  }
}

/* Mobile: reduce hero padding so content pulls up under transparent header */
@media (max-width: 576px) {
    .hero-section { padding-top: 1.75rem; padding-bottom: 2rem; }
}

/* Hero: gold accent under headline */
.hero-section h1 {
  position: relative;
}
.hero-section h1::after{
  content:"";
  display:block;
  width:40px; height:4px;
  background: var(--chai-insight-gold);
  border-radius: 2px;
  margin-top: .75rem;
}
@media (max-width: 768px){
  .hero-section h1::after{
    width:32px; height:3px;
    margin-left:auto; margin-right:auto; /* center on mobile */
  }
}

/* Services list: gold check icons */
section.py-5 .list-unstyled.lead.fs-6 .bi-check-circle-fill{
  color: var(--chai-insight-gold) !important;
  opacity: .95;
}

/* Carousel dots: gold */
#testimonialCarousel .carousel-indicators button {
  background-color: rgba(255, 217, 102, 0.45) !important; /* gold, subtle */
  width: 8px; height: 8px; border-radius: 50%;
  opacity: 1; transition: transform .15s ease;
}
#testimonialCarousel .carousel-indicators .active {
  background-color: var(--chai-insight-gold) !important;
  transform: scale(1.15);
}

/* Workshop cards: thin gold bar on top */
#workshops .card { position: relative; overflow: hidden; }
#workshops .card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--chai-insight-gold);
}
#workshops .card:hover::before { height: 4px; }

/* === Glassy upgrade for testimonial arrows === */
#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
  position: relative;
  border-radius: 999px;
  padding: 0.9rem;
  border: 1px solid rgba(0,0,0,0.22);
  /* deeper glassy depth */
  box-shadow:
    inset 0 2px 8px rgba(255,255,255,0.55),
    inset 0 -3px 10px rgba(0,0,0,0.22),
    0 10px 22px rgba(0,0,0,0.25),
    0 2px 0 rgba(0,0,0,0.12);
  filter: saturate(1.05);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

/* layered gloss + chevrons + base gradient */
#testimonialCarousel .carousel-control-prev-icon {
  background-image:
    /* chevron (top layer) */
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L6.707 7l4.647 4.646a.5.5 0 1 1-.708.708l-5-5a.5.5 0 0 1 0-.708l5-5a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"),
    /* glossy top sweep */
    linear-gradient(to bottom, rgba(255,255,255,.70), rgba(255,255,255,.15) 45%, rgba(255,255,255,0) 60%),
    /* inner highlight bloom */
    radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,.45) 0%, rgba(255,255,255,0) 55%),
    /* base brand gradient */
    linear-gradient(145deg, #5b95ef 0%, #2a62bc 100%);
  background-blend-mode: normal, screen, soft-light, normal;
}
#testimonialCarousel .carousel-control-next-icon {
  background-image:
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l5 5a.5.5 0 0 1 0 .708l-5 5a.5.5 0 1 1-.708-.708L9.293 7 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"),
    linear-gradient(to bottom, rgba(255,255,255,.70), rgba(255,255,255,.15) 45%, rgba(255,255,255,0) 60%),
    radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,.45) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(145deg, #5b95ef 0%, #2a62bc 100%);
  background-blend-mode: normal, screen, soft-light, normal;
}

/* rim highlight & specular sparkle */
#testimonialCarousel .carousel-control-prev-icon::after,
#testimonialCarousel .carousel-control-next-icon::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,.85),
    inset 0 0 12px rgba(255,255,255,.35);
  background:
    radial-gradient(80% 60% at 50% 20%, rgba(255,255,255,.22), transparent 60%);
  pointer-events: none;
}

/* hover/press = stronger glass effect */
#testimonialCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next:hover .carousel-control-next-icon {
  transform: translateY(-1px);
  box-shadow:
    inset 0 2px 10px rgba(255,255,255,0.6),
    inset 0 -3px 12px rgba(0,0,0,0.24),
    0 12px 26px rgba(0,0,0,0.28),
    0 3px 0 rgba(0,0,0,0.12);
  filter: saturate(1.12);
}
#testimonialCarousel .carousel-control-prev:active .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next:active .carousel-control-next-icon {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 4px rgba(0,0,0,0.25),
    inset 0 -1px 3px rgba(255,255,255,0.2),
    0 6px 12px rgba(0,0,0,0.2),
    0 1px 0 rgba(0,0,0,0.1);
}

/* Ensure hero media never overflows height on small laptops */
.hero-media-el { max-width: 100%; }