/* ==========================================================================
   People Are Saying Page & Home Page Styles
   ========================================================================== */

/* ==========================================================================
   Video Transcript Modal
   Accessible, SEO-friendly transcript overlay
   ========================================================================== */

/* Transcript Button - appears below video */
.transcript-btn {
    display: inline-block;
    margin-top: 5px;
    padding: 3px 12px;
    background: var(--button-bg, var(--accent-color));
    color: var(--button-text, #fff);
    border: none;
    border-radius: 3px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.transcript-btn:hover {
    background: var(--button-hover-bg, var(--accent-hover));
    color: var(--button-hover-text, #fff);
}

/* Modal Overlay - covers entire screen */
.transcript-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.transcript-modal.active {
    display: flex;
}

/* Modal Content Box */
.transcript-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.transcript-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.transcript-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--primary-color);
}

/* Close Button */
.transcript-close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.transcript-close-btn:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Modal Body - Scrollable transcript area */
.transcript-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Transcript Text */
.transcript-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-color);
}

.transcript-text p {
    margin-bottom: 1em;
}

/* Responsive Modal */
@media (max-width: 576px) {
    .transcript-modal {
        padding: 10px;
    }
    
    .transcript-modal-content {
        max-height: 90vh;
    }
    
    .transcript-modal-header {
        padding: 12px 15px;
    }
    
    .transcript-modal-body {
        padding: 15px;
    }
    
    .transcript-text {
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   Video Thumbnail with Play Button (kept for reference)
   ========================================================================== */
.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
    opacity: 0.8;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.2s ease;
}

.video-thumbnail:hover .video-play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-button svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.video-play-button .play-bg {
    transition: fill-opacity 0.2s ease;
}

.video-thumbnail:hover .play-bg {
    fill-opacity: 0.9;
}

/* ==========================================================================
   Video with Expand Button - iframe with fullscreen option
   ========================================================================== */
.video-with-expand {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}

.video-with-expand iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 1;
}

.video-expand-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-expand-btn:hover {
    background: var(--accent-color);
}

.video-expand-btn svg {
    display: block;
}

/* Ensure video containers don't double up on aspect ratio */
.class-media-container .video-with-expand,
.home-video-item .video-with-expand,
.video-testimonial-item .video-with-expand {
    padding-bottom: 56.25%;
    height: 0;
}

/* ==========================================================================
   Video Modal - Fullscreen Player (sized to fit with visible close button)
   ========================================================================== */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow: auto;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 85vw;
    max-height: 80vh;
    background: #000;
    border-radius: 8px;
    overflow: visible;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--accent-color);
    border: none;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    z-index: 10;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-modal-close:hover {
    background: var(--accent-hover);
}

.video-modal-close::before {
    content: "✕ CLOSE";
}

.video-modal-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Instruction overlay */
.video-modal-instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    z-index: 100;
    border: 2px solid var(--accent-color);
    animation: fadeOutInstruction 3s ease-in-out forwards;
    animation-delay: 2s;
}

.video-modal-instructions p {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.video-modal-instructions .esc-key {
    display: inline-block;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 4px 10px;
    font-family: monospace;
    font-size: 1rem;
    margin: 0 5px;
}

.video-modal-instructions .dismiss-btn {
    background: var(--accent-color);
    border: none;
    color: #fff;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
}

.video-modal-instructions .dismiss-btn:hover {
    background: var(--accent-hover);
}

@keyframes fadeOutInstruction {
    0% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

.video-modal-instructions.dismissed {
    display: none;
}

@media (max-width: 768px) {
    .video-modal {
        padding: 15px;
    }
    
    .video-modal-content {
        max-width: 95vw;
    }
    
    .video-modal-close {
        top: -45px;
        padding: 6px 12px;
        font-size: 16px;
    }
}

@media (max-height: 600px) {
    .video-modal-content {
        max-width: 70vw;
    }
}

/* Video Container - Legacy (for backward compatibility) */
.video-responsive {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Prevent double aspect ratio when video-with-expand is used */
.video-responsive .video-with-expand,
.video-wrapper .video-with-expand {
    padding-bottom: 0;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

/* Section Main Heading */
.section-main-heading {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    position: relative;
    padding: 12px 30px 18px;
    background-color: rgba(253, 251, 247, 0.92);
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.section-main-heading::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* ==========================================================================
   People Are Saying Page
   ========================================================================== */

/* Video Testimonials Grid - 2x2 */
.video-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.video-testimonial-item {
    min-width: 0;
}

/* Stacked testimonial videos - single column like streaming pages */
.testimonial-videos-stacked {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 800px;
    margin: 0 auto 25px;
}

.testimonial-videos-stacked .streaming-video-card {
    overflow: visible;
}

.testimonial-videos-stacked .video-card-info {
    padding: 10px 18px 15px;
}

/* Video Link Button */
.testimonial-video-link {
    text-align: center;
    margin: 25px 0;
}

.video-link-button {
    display: inline-block;
    padding: 12px 25px;
    background: var(--button-bg, var(--accent-color));
    color: var(--button-text, #fff) !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: background 0.3s ease;
}

.video-link-button:hover {
    background: var(--button-hover-bg, var(--accent-hover));
    color: var(--button-hover-text, #fff) !important;
}

/* Text Testimonials */
.testimonial {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-color);
}

.testimonial-content {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.testimonial-content p {
    margin-bottom: 0.5rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2px;
    font-size: 0.875rem;
}

.testimonial-location {
    color: var(--text-light);
    font-size: 0.8125rem;
    margin-bottom: 0;
}

/* Mission Statement */
.mission-statement {
    text-align: center;
    margin-top: 40px;
    padding: 30px 20px;
    background: var(--bg-light);
    border-radius: 6px;
}

.mission-text {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.thanks-text {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0;
}

/* ==========================================================================
   Home Page
   ========================================================================== */

.home-page {
    padding-top: 10px;
}

/* Classes Grid - increased gaps to show background */
.home-classes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.home-classes-grid.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

.home-class-card {
    background: rgba(253, 251, 247, 0.92);  /* Warm cream */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(93, 82, 70, 0.12);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(139, 115, 85, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.home-class-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(93, 82, 70, 0.18);
    background: rgba(255, 253, 250, 0.98);
}

.class-media-container {
    width: 100%;
    padding: 15px 15px 0 15px;
}

/* Reset any nested video containers */
.class-media-container > .video-with-expand {
    margin: 0;
}

.class-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    overflow: hidden;
    background: var(--bg-light);
    border-radius: 6px;
}

.class-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* Video responsive also gets rounded corners */
.class-media-container .video-responsive {
    border-radius: 6px;
    overflow: hidden;
}

.class-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.class-title {
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.class-excerpt {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 10px;
    flex-grow: 1;
}

.class-duration {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.learn-more-btn {
    align-self: flex-start;
    padding: 4px 16px !important;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Featured Tools Section */
.featured-tools-section {
    margin: 0;
    padding: 40px 0;
}

.featured-tools-heading {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.featured-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.featured-tool-card {
    text-align: center;
}

.featured-tool-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.featured-tool-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Square */
    overflow: hidden;
    background: var(--bg-light);
    border-radius: 6px;
    margin-bottom: 10px;
}

.featured-tool-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-tool-card:hover .featured-tool-image img {
    transform: scale(1.05);
}

.featured-tool-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.featured-tool-card:hover .featured-tool-name {
    color: var(--accent-color);
}

/* Home Testimonials Section */
.home-testimonials-section {
    margin-top: 0;
    padding-top: 40px;
}

.home-testimonials-section .section-heading {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

/* About Instructor Section */
.about-instructor-section {
    margin: 0;
    padding: 40px 0;
}

.about-instructor-heading {
    text-align: center;
    font-family: var(--font-primary);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
}

.about-instructor-heading::before,
.about-instructor-heading::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.about-instructor-heading::before {
    left: 0;
}

.about-instructor-heading::after {
    right: 0;
}

.about-instructor-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.about-instructor-text {
    flex: 1;
}

.about-instructor-text p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 15px;
    text-indent: 1.5em;
}

.about-instructor-text p:first-child {
    text-indent: 0;
}

.about-instructor-image {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(93, 82, 70, 0.25);
    border: 4px solid #8B7355;  /* Warm cliff brown */
    border: 4px solid #87CEEB;
}

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

@media (max-width: 768px) {
    .about-instructor-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .about-instructor-image {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }
    
    .about-instructor-text p {
        font-size: 0.875rem;
        text-indent: 0;
    }
    
    .about-instructor-heading::before,
    .about-instructor-heading::after {
        width: 30px;
    }
    
    .about-instructor-heading {
        font-size: 1.375rem;
    }
}

.section-heading {
    text-align: center;
    font-size: 1.375rem;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.home-video-testimonials {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.home-video-item {
    min-width: 0;
}

.home-text-testimonials {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.home-testimonial {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
}

.home-testimonial .testimonial-content {
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.home-testimonial .testimonial-author {
    font-size: 0.8125rem;
}

.see-more-link {
    text-align: center;
    margin-top: 20px;
}

/* ==========================================================================
   Video Products for Sale (Videos Page)
   ========================================================================== */
.video-products-list {
    margin-top: 30px;
}

.video-product-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px 30px;
    margin-bottom: 25px;
    transition: box-shadow 0.3s ease;
}

.video-product-item:hover {
    box-shadow: 0 4px 20px rgba(93, 82, 70, 0.15);
}

.video-product-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.video-product-description {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 20px;
}

.video-product-description p:last-child {
    margin-bottom: 0;
}

.video-product-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.show-btn {
    padding: 10px 25px;
}

.buy-now-btn {
    padding: 10px 25px;
}

/* Show Image Modal */
.show-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.show-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.show-modal-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.show-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.3s ease;
}

.show-close-btn:hover {
    color: var(--accent-color);
}

/* Page intro styling */
.page-intro {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

@media (max-width: 768px) {
    /* Video Grid */
    .video-testimonials-grid,
    .home-video-testimonials {
        grid-template-columns: 1fr;
    }
    
    /* Classes Grid */
    .home-classes-grid,
    .home-classes-grid.three-columns {
        grid-template-columns: 1fr;
    }
    
    /* Featured Tools */
    .featured-tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .featured-tool-name {
        font-size: 0.8125rem;
    }
    
    /* Home Testimonials */
    .home-text-testimonials {
        grid-template-columns: 1fr;
    }
    
    /* Mission */
    .mission-text {
        font-size: 1.25rem;
    }
    
    /* Video Products */
    .video-product-item {
        padding: 20px;
    }
    
    .video-product-title {
        font-size: 1.25rem;
    }
    
    .video-product-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .video-product-actions .btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Featured Tools - smaller screens */
    .featured-tools-grid {
        grid-template-columns: 1fr;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .video-link-button {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
}
