/**
 * About Page Styles
 * Custom styling for About page template with alternating backgrounds
 * and sectioned TPT-inspired approach
 *
 * Uses standardized CSS variables from style.css
 *
 * @package Teachers_Planit
 * @since 1.0.0
 */

/* ============================================
   Section 1: Hero
   Background: #FFFFFF
   ============================================ */

.about-hero {
    background-color: var(--tp-white);
    padding: 80px 20px;
}

.about-hero-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 24px;
}

.about-hero-content .hero-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--tp-text-gray);
    margin-bottom: 32px;
}

.about-hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--tp-radius-lg);
    box-shadow: var(--tp-shadow-md);
}

/* YouTube video wrapper for responsive embed */
.about-hero-image .video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--tp-radius-lg);
    box-shadow: var(--tp-shadow-md);
}

.about-hero-image .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--tp-radius-lg);
}

/* ============================================
   Section 2: Value Proposition
   Background: var(--tp-bg-warm)
   ============================================ */

.about-value-prop {
    background-color: var(--tp-bg-warm);
    padding: 80px 20px;
}

.value-prop-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.value-prop-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--tp-text-gray);
    margin-bottom: 20px;
    text-align: left;
}

/* ============================================
   Section 3: Stats Bar
   Background: #8B5FBF (purple brand color)
   ============================================ */

.about-stats {
    background-color: var(--tp-purple-hover);
    padding: 50px 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    color: var(--tp-white);
    text-align: center;
}


.stat-number {
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 12px;
    font-family: var(--tp-font-heading);
    color: var(--tp-white);
}

.stat-label {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Section 4: Mission Statement
   Background: var(--tp-bg-purple-light)
   ============================================ */

.about-mission {
    background-color: var(--tp-bg-warm);
    padding: 80px 20px;
    position: relative;
}

.mission-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

/* Optional: Underline key word in purple */

.mission-content h2 strong {
    color: var(--tp-primary);
    position: relative;
    display: inline-block;
}

.mission-content h2 strong::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--tp-primary);
}

/* ============================================
   Section 5 & 6: Featured Teachers
   Section 5: var(--tp-bg-teal-light)
   Section 6: var(--tp-bg-warm)
   ============================================ */

.about-teacher {
    padding: 80px 20px;
}

hr.divider {
    width: 40%;
    border-bottom: 1px solid rgb(132 88 179 / 10%);
}

.teacher-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin: 0 auto;
}

/* Left layout: text left, photo right */
.teacher-grid-left {
    grid-template-columns: 3fr 1fr;
}

/* Right layout: photo left, text right */
.teacher-grid-right {
    grid-template-columns: 1fr 3fr;
}

.teacher-grid-left .teacher-photo {
    margin-right: auto;
}
.teacher-grid-right .teacher-photo {
    margin-left: auto;
}
.teacher-content h3 {
    font-size: 2rem;
    margin-bottom: 24px;
    color: var(--tp-text-dark);
}

.teacher-content p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--tp-text-gray);
    margin-bottom: 24px;
}

.teacher-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.teacher-meta strong {
    font-size: 1.25rem;
    color: var(--tp-primary);
    font-weight: 600;
}

.teacher-credential,
.teacher-experience {
    font-size: 0.9375rem;
    color: var(--tp-text-gray);
}

.teacher-photo {
    width: 200px;
    height: auto;
    border-radius: var(--tp-radius-lg);
    overflow: hidden;
    box-shadow: var(--tp-shadow-md);
}

.teacher-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-photo-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--tp-bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tp-gray);
    font-size: 6rem;
}

/* ============================================
   Section 7: Services Overview
   Background: #FFFFFF
   Service card styles inherited from style.css
   ============================================ */

.about-services {
    background-color: var(--tp-white);
    padding: 60px 20px;
}

.about-services .section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 48px;
    color: var(--tp-text-dark);
}

/* Service grid and card styles are now global in style.css */

/* ============================================
   Section 8: Final CTA
   Background: var(--tp-bg-purple-light)
   ============================================ */

.about-final-cta {
    background-color: var(--tp-bg-purple-light);
    padding: 80px 20px;
}

.final-cta-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.final-cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--tp-text-dark);
}

.final-cta-content p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--tp-text-gray);
    margin-bottom: 32px;
}

/* ============================================
   English Articles template: Image + Form section
   Background: var(--tp-bg-warm) via .section-bg-warm utility (style.css)
   ============================================ */

.ea-image-form {
    padding: 80px 20px;
}

.ea-image-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1024px;
    margin: 0 auto;
}

.ea-image-form-image .ea-section-image {
    width: 100%;
    height: auto;
    border-radius: var(--tp-radius-lg);
    box-shadow: var(--tp-shadow-md);
    display: block;
}

.ea-image-form-grid--no-image {
    grid-template-columns: 1fr;
    max-width: 700px;
}

.ea-form-placeholder {
    color: var(--tp-text-gray);
    font-style: italic;
}

/* ============================================
   English Articles: Intro block (inside .ea-image-form)
   Centre-aligned H2 + intro text sitting above the image + form grid.
   ============================================ */

.ea-image-form .ea-intro-block {
    max-width: 700px;
    margin: 0 auto 40px;
    text-align: center;
}

.ea-image-form .ea-intro-heading {
    margin: 0 0 16px;
}

.ea-image-form .ea-intro-text p {
    margin: 0 0 12px;
}

.ea-image-form .ea-intro-text p:last-child {
    margin-bottom: 0;
}

/* ============================================
   English Articles: FAQ accordion (inside .ea-image-form)
   Native <details>/<summary>. Content in DOM on load. No JS.
   Centre-aligned "FAQ" heading; questions and answers are left-aligned.
   Visual treatment mirrors the consultation FAQ (bordered card,
   purple question, gray answer) adapted for the accordion toggle.
   ============================================ */

.ea-image-form .ea-faq-block {
    max-width: 800px;
    margin: 60px auto 0;
}

.ea-image-form .ea-faq-heading {
    text-align: center;
    font-size: 1.8rem;
    margin: 0 0 var(--tp-spacing-lg);
}

.ea-image-form .ea-faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ea-image-form .ea-faq-item {
    background: #fff;
    border: 1px solid var(--tp-light);
    border-radius: var(--tp-radius-md);
}

.ea-image-form .ea-faq-item summary {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    list-style: none;
}

.ea-image-form .ea-faq-item summary::-webkit-details-marker {
    display: none;
}

.ea-image-form .ea-faq-item summary:focus {
    outline: none;
}

.ea-image-form .ea-faq-item summary:focus-visible {
    outline: 2px solid var(--tp-purple-hover);
    outline-offset: 2px;
}

.ea-image-form .ea-faq-question {
    font-size: 1.15rem;
    margin: 0;
    color: var(--tp-purple-hover);
    text-align: left;
    flex: 1;
}

.ea-image-form .ea-faq-chevron {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--tp-purple-hover);
    border-bottom: 2px solid var(--tp-purple-hover);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-top: -4px;
}

.ea-image-form .ea-faq-item[open] .ea-faq-chevron {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.ea-image-form .ea-faq-answer {
    padding: 0 24px 20px;
    text-align: left;
}

.ea-image-form .ea-faq-answer p {
    margin: 0;
    color: var(--tp-text-gray);
}

@media (prefers-reduced-motion: reduce) {
    .ea-image-form .ea-faq-chevron {
        transition: none;
    }
}

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

/* Tablet: 768px - 1199px */
@media (max-width: 1199px) {
    .about-hero-grid {
        grid-template-columns: 55% 45%;
        gap: 40px;
    }

    .ea-image-form-grid {
        gap: 40px;
    }

    .about-hero-content h1 {
        font-size: 2.5rem;
    }

    .teacher-photo {
        width: 150px;
    }

    .about-services .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
    /* Reduce padding on all sections */
    .about-hero,
    .about-mission,
    .about-final-cta {
        padding: 40px 20px;
    }

    .about-value-prop,
    .about-stats,
    .about-teacher,
    .about-services,
    .ea-image-form {
        padding: 40px 20px;
    }

    /* Image + Form: stack vertically */
    .ea-image-form-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Intro + FAQ (mobile) */
    .ea-image-form .ea-intro-block {
        margin-bottom: 32px;
    }

    .ea-image-form .ea-faq-block {
        margin-top: 40px;
    }

    .ea-image-form .ea-faq-item summary {
        padding: 16px 18px;
    }

    .ea-image-form .ea-faq-answer {
        padding: 0 18px 16px;
    }

    .ea-image-form .ea-faq-question {
        font-size: 1rem;
    }

    /* Hero: Stack vertically */
    .about-hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-hero-content h1 {
        font-size: 2rem;
    }

    .about-hero-content .hero-description {
        font-size: 1rem;
    }

    .about-hero-image {
        order: -1; /* Image above text on mobile */
    }

    /* Value Proposition */

    .value-prop-content p {
        font-size: 1rem;
    }

    /* Stats: Stack vertically */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .stat-number {
        font-size: 2.75rem;
    }

    /* Mission Statement */

    /* Teachers: Stack vertically */

    .teacher-grid,
    .teacher-grid-left,
    .teacher-grid-right {
        gap: 32px;
    }

    .teacher-grid-left {
        grid-template-columns: 2fr 1fr;
    }
    
    /* Right layout: photo left, text right */
    .teacher-grid-right {
        grid-template-columns: 1fr 2fr;
    }

    .teacher-photo {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 1 / 1;
        margin: 0 auto;
    }

    .teacher-content h3 {
        font-size: 1.5rem;
    }

    .teacher-content p {
        font-size: 1rem;
    }

    /* Services: Title responsive */
    .about-services .section-title {
        font-size: 1.875rem;
    }

    /* Services grid responsive styles in style.css */

    /* Final CTA */
    .final-cta-content h2 {
        font-size: 1.875rem;
    }

    .final-cta-content p {
        font-size: 1rem;
    }

    /* Full-width buttons on mobile */
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Small mobile: < 480px */
@media (max-width: 479px) {
    .about-hero-content h1 {
        font-size: 1.75rem;
    }

    .about-services .section-title {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 2.25rem;
    }

    /* Service icon responsive styles in style.css */
}
