/* Custom styles for Wisdom and Knowledge website */

/* Mobile-first responsive styles */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Ensure all sections pad properly on mobile */
section {
    padding-left: max(0.75rem, 4vw);
    padding-right: max(0.75rem, 4vw);
}

@media (min-width: 480px) {
    section {
        padding-left: max(1rem, 4vw);
        padding-right: max(1rem, 4vw);
    }
}

/* Testimonials balancing styles */
.home-testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.75rem, 4vw, 2.5rem);
}

.home-testimonial {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Base styles for all testimonials */
.home-testimonial__body {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    max-height: 200px; /* Shorter on mobile */
    transition: max-height 0.5s ease;
}

@media (min-width: 640px) {
    .home-testimonial__body {
        max-height: 280px; /* Default collapsed height for tablets and up */
    }
}

/* Left testimonial - make it shorter */
.home-testimonials-grid .home-testimonial:first-child .home-testimonial__body {
    max-height: 180px; /* Shorter for the first testimonial */
}

/* Right testimonial - keep it at the default height */
.home-testimonials-grid .home-testimonial:last-child .home-testimonial__body {
    max-height: 220px; /* Slightly taller for the second testimonial */
}

/* Add a gradient fade at the bottom to indicate more content */
.home-testimonial__body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgb(255, 255, 255) 0.95, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    opacity: var(--after-opacity, 1);
    transition: opacity 0.3s ease;
}

/* Style the 'Read more' button */
.testimonial-toggle-btn {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    margin: 0.5rem 0 0.75rem;
    background: rgba(26, 188, 156, 0.1);
    color: rgba(26, 188, 156, 0.9);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(26, 188, 156, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 5;
}

.testimonial-toggle-btn:hover {
    background: rgba(26, 188, 156, 0.2);
}

/* Toggleable testimonials without JavaScript */
.testimonial-toggle {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(100%);
    overflow: hidden;
}

.testimonial-toggle:checked + .home-testimonial__body {
    max-height: 2000px;
}

.testimonial-toggle:checked + .home-testimonial__body::after {
    opacity: 0;
    pointer-events: none;
}

.testimonial-toggle-btn__less {
    display: none;
}

.testimonial-toggle:checked ~ .testimonial-toggle-btn .testimonial-toggle-btn__more {
    display: none;
}

.testimonial-toggle:checked ~ .testimonial-toggle-btn .testimonial-toggle-btn__less {
    display: inline;
}
/* Media query for larger screens */
@media (min-width: 1024px) {
    .home-testimonials-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Clickable Coaching Cards */
.page-section.page-section--compact:nth-of-type(3) .card {
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: relative;
}

.page-section.page-section--compact:nth-of-type(3) .card::after {
    content: 'Click to book';
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: rgba(26, 188, 156, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.page-section.page-section--compact:nth-of-type(3) .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.page-section.page-section--compact:nth-of-type(3) .card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile responsive utilities */

/* Responsive iframe container */
.responsive-iframe-wrapper {
    position: relative;
    padding-bottom: 150%; /* Much taller on small mobile */
    height: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* Special styling for the 'What's been going on' section iframe */
.home-updates .responsive-iframe-wrapper {
    padding-bottom: 80%; /* Much less height than standard iframes */
    max-height: 600px;
    margin-bottom: 0;
}

/* Style the home updates card to be more compact */
.home-updates-card {
    padding: 0.75rem;
}

@media (min-width: 640px) {
    .home-updates-card {
        padding: 1rem;
    }
}

.responsive-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    overflow: hidden;
}

@media (min-width: 480px) {
    .responsive-iframe-wrapper {
        padding-bottom: 130%;
    }
    
    .home-updates .responsive-iframe-wrapper {
        padding-bottom: 60%;
    }
}

@media (min-width: 640px) {
    .responsive-iframe-wrapper {
        padding-bottom: 120%;
    }
    
    .home-updates .responsive-iframe-wrapper {
        padding-bottom: 50%;
    }
}

@media (min-width: 768px) {
    .responsive-iframe-wrapper {
        padding-bottom: 100%;
    }
    
    .home-updates .responsive-iframe-wrapper {
        padding-bottom: 40%;
    }
}

/* Mobile stacking and spacing utilities */
.mobile-stack {
    display: flex;
    flex-direction: column;
}

@media (min-width: 640px) {
    .mobile-stack {
        flex-direction: row;
    }
}

/* Responsive text sizes */
.section-heading {
    font-size: clamp(1.5rem, 4vw, 2.25rem) !important;
    line-height: 1.3 !important;
}

.section-subheading {
    font-size: clamp(1.1rem, 3vw, 1.5rem) !important;
}

/* Improve button styling on mobile */
.btn {
    width: 100%;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .btn {
        width: auto;
        margin-bottom: 0;
    }
}

/* Coaching cards responsive adjustments */
.card {
    padding: 1.25rem;
    border-radius: 1rem;
}

@media (min-width: 640px) {
    .card {
        padding: 1.5rem;
        border-radius: 1.25rem;
    }
}

.card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.75rem;
}





