/**
 * Teachers Planit - Enhanced Teacher Profile Styles
 * Comprehensive styling for teacher archive pages and teachers grid
 *
 * Uses standardized CSS variables from style.css
 * All variables use --tp-* prefix for consistency
 *
 * @package Teachers_Planit
 * @since 1.0.0
 */

/* ============================================
   Font Awesome Icon Styling
   ============================================ */

/* Ensure Font Awesome icons display properly */
.stat-icon i,
.qualification-icon i,
.btn-icon i,
.service-card-icon i {
    display: inline-block;
    font-style: normal;
}


/* ============================================
   Hero Section with Purple Gradient
   ============================================ */

.teacher-profile-page {
    width: 100%;
}

.teacher-hero-gradient {
    background: linear-gradient(135deg, #8b71c7 0%, #7c5eb8 50%, #6a4ca3 100%);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* When background image is available */
.teacher-hero-gradient.has-background-image {
    background: none;
}

/* Hero background image container */
.teacher-hero-gradient .hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.teacher-hero-gradient .hero-background-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Hero overlay matching front page */
.teacher-hero-gradient .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(146deg,rgb(26,16,48) 0%,rgb(66,48,105) 99%);
    opacity: .4;
    z-index: 1;
}

.teacher-hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Profile Image with Verification Badge */
.teacher-profile-image {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.teacher-profile-image img {
    width: 200px;
    height: 200px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.verification-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Teacher Name & Subtitle */
.teacher-profile-name {
    font-size: 3rem;
    color: white;
    margin-bottom: 10px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.teacher-profile-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    font-weight: 400;
}

/* Quick Stats Row */
.teacher-quick-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 500;
}
.stat-icon,
.stat-value {
    color: white;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    letter-spacing: 0.03rem;
}

/* CTA Buttons */
.teacher-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ============================================
   Two-Column Layout: Main Content
   ============================================ */

.teacher-main-content {
    padding: 80px 20px;
    background: white;
}

.teacher-content-wrapper {
    max-width: 1024px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Left Column: Main Content */
.teacher-left-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--tp-shadow-sm);
    border: 1px solid #e5e5e5;
}

.content-card h2 {
    color: var(--tp-text-dark);
}

.teacher-about-text,
.teacher-extended-bio {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--tp-text-gray);
    margin-bottom: 15px;
}

.teacher-extended-bio {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

/* Teacher Specialties Section */
.teacher-specialties {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.teacher-specialties h3 {
    font-size: 1.75rem;
    color: var(--tp-text-dark);
    margin-bottom: 25px;
    font-weight: 600;
}

.specialty-group {
    margin-bottom: 25px;
}

.specialty-group:last-child {
    margin-bottom: 0;
}

.specialty-group h4 {
    font-size: 1.1rem;
    color: var(--tp-text-dark);
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.specialty-group h4 i {
    color: var(--tp-primary);
    font-size: 1rem;
}

.taxonomy-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.taxonomy-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--tp-bg-gray);
    color: var(--tp-text-dark);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
}

.taxonomy-tag:hover {
    background: var(--tp-primary);
    color: white;
    border-color: var(--tp-primary);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(124, 94, 184, 0.3);
}

/* Different colors for different taxonomy types */
.subject-tag:hover {
    background: #4CAF50;
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.age-group-tag:hover {
    background: #2196F3;
    border-color: #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.lesson-type-tag:hover {
    background: #FF9800;
    border-color: #FF9800;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.tag-tag:hover {
    background: #E91E63;
    border-color: #E91E63;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

/* Qualifications Section */
.qualifications-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qualification-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--tp-bg-gray);
    border-radius: 8px;
    border-left: 4px solid var(--tp-primary);
}

.qualification-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.qualification-text {
    font-size: 1.05rem;
    color: var(--tp-text-dark);
    line-height: 1.6;
}

/* Teaching Philosophy Section */
blockquote.teaching-philosophy-quote {
    background: linear-gradient(135deg, #f8f5ff 0%, #f0ebff 100%);
    border-left: none;
    padding: 2rem;
    border-radius: 8px;
    color: var(--tp-text-dark);
    font-style: italic;
    margin: 1rem auto 0;
    padding-left: 2rem;
}

.teaching-philosophy-quote p {
    font-size: 1rem;
    padding-left: 2rem;
}

.teaching-philosophy-quote p:last-child {
    margin-bottom: 0;
    margin-top: 0;
}
blockquote.pullquote.teaching-philosophy-quote::before {
    top: 1rem;left:1rem;
}
/* ============================================
   Right Sidebar: Sticky Cards
   ============================================ */

.teacher-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--tp-shadow-sm);
    border: 1px solid #e5e5e5;
}

.sidebar-card h3 {
    font-size: 1.5rem;
    color: var(--tp-text-dark);
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

/* Quick Stats Card */
.sidebar-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: var(--tp-bg-gray);
    border-radius: 8px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: var(--tp-primary);
    margin-bottom: 5px;
}

.stat-text {
    font-size: 0.9rem;
    color: var(--tp-text-gray);
    text-align: center;
}

/* Contact Options Card */
.contact-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Contact button container */
.contact-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Base contact button styles inherit from style.css .contact-btn */
/* Additional spacing for teacher sidebar */
.contact-btn {
    padding: 14px 20px;
}

/* Book consultation button - inherits .btn-primary from style.css */
.book-btn {
    background-color: var(--tp-primary);
    border-color: var(--tp-primary);
    color: var(--tp-white);
}

.book-btn:hover {
    background-color: var(--tp-purple-hover);
    border-color: var(--tp-purple-hover);
    color: var(--tp-white);
}

/* Secondary contact buttons */
.email-btn,
.question-btn,
.phone-btn {
    background-color: var(--tp-bg-gray);
    color: var(--tp-text-dark);
    border-color: #e5e5e5;
}

.email-btn:hover,
.question-btn:hover,
.phone-btn:hover {
    background-color: var(--tp-white);
    border-color: var(--tp-primary);
    color: var(--tp-primary);
}

/* WhatsApp button with brand colors */
.whatsapp-btn {
    background-color: #128C7E;
    border-color: #128C7E;
    color: var(--tp-white);
}

.whatsapp-btn:hover {
    background-color: #25D366;
    border-color: #25D366;
    color: var(--tp-white);
}

/* Button icon sizing */
.btn-icon {
    font-size: 1.2rem;
}

/* Social Links Card */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link.linkedin {
    background: #0077B5;
    color: white;
}

.social-link.twitter {
    background: #000000;
    color: white;
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.social-link.facebook {
    background: #1877F2;
    color: white;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--tp-shadow-md);
}

.social-icon {
    font-size: 1.2rem;
}

/* ============================================
   Lessons Section
   ============================================ */

.teacher-lessons {
    padding: 80px 20px;
    background: white;
    scroll-margin-top: 80px;
}

.teacher-lessons-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
}

.teacher-lessons h2 {
    margin-bottom: 40px;
    color: var(--tp-text-dark);
}

.teacher-contact-form-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--tp-text-dark);
    font-weight: 600;
}

.no-lessons {
    text-align: center;
    font-size: 1.1rem;
    color: var(--tp-text-gray);
    padding: 40px 20px;
}

.teacher-lessons .woocommerce {
    max-width: 1024px;
    margin: 0 auto;
}

.teacher-lessons .woocommerce-pagination {
    margin-top: 40px;
}

/* ============================================
   Other Teachers Section
   ============================================ */

.other-teachers {
    padding: 80px 20px;
    background: var(--tp-bg-gray);
}

.other-teachers-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
}

.other-teachers h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--tp-text-dark);
    font-weight: 600;
}

.other-teachers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1024px;
    margin: 0 auto;
    justify-content: center;
}

/* Dynamic grid layouts based on teacher count */
.other-teachers-grid.grid-1 {
    grid-template-columns: 1fr;
    max-width: 400px;
}

.other-teachers-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
}

.other-teachers-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Teacher Card Styles */
.other-teachers .teacher-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--tp-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.other-teachers .teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--tp-shadow-md);
}

.other-teachers .teacher-card-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.other-teachers .teacher-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

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

.other-teachers .teacher-card:hover .teacher-card-image img {
    transform: scale(1.05);
}

.other-teachers .teacher-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.other-teachers .teacher-card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.other-teachers .teacher-card-title a {
    text-decoration: none;
    color: var(--tp-text-dark);
    transition: color 0.3s ease;
}

.other-teachers .teacher-card:hover .teacher-card-title a {
    color: var(--tp-primary);
}

.other-teachers .teacher-card-excerpt {
    margin-bottom: 20px;
    color: var(--tp-text-gray);
    line-height: 1.6;
    flex-grow: 1;
}

.other-teachers .btn-more {
    align-self: flex-start;
}


/* ============================================
   Teachers Grid (Shortcode & About Page)
   ============================================ */

.about-teachers {
    padding: 80px 0;
    background: var(--tp-bg-gray);
}

.about-teachers h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--tp-text-dark);
}

.section-intro {
    max-width: 700px;
    margin: 0 auto 50px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--tp-text-gray);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.teachers-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.teachers-grid.columns-4 {
    grid-template-columns: repeat(3, 1fr);
}

.teacher-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--tp-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--tp-shadow-md);
}

.teacher-card-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.teacher-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

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

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

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

.teacher-card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.teacher-card-title a {
    text-decoration: none;
    color: var(--tp-text-dark);
    transition: color 0.3s ease;
}

.teacher-card:hover .teacher-card-title a {
    color: var(--tp-primary);
}

.teacher-card-excerpt {
    margin-bottom: 20px;
    color: var(--tp-text-gray);
    line-height: 1.6;
    flex-grow: 1;
}


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

/* Tablet & Below */
@media (max-width: 1024px) {
    .teacher-content-wrapper {
        grid-template-columns: 1fr;
    }

    .teacher-right-sidebar {
        position: static;
        order: 2;
    }

    .teacher-left-column {
        order: 1;
    }
}

/* Mobile Devices (<768px) */
@media (max-width: 767px) {
    .teacher-hero-gradient {
        padding: 60px 20px;
        min-height: 500px;
    }

    .teacher-profile-name {
        font-size: 2rem;
    }

    .teacher-profile-subtitle {
        font-size: 1rem;
    }

    .teacher-profile-image img {
        width: 150px;
        height: 150px !important;
    }

    .verification-badge {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .teacher-quick-stats {
        gap: 20px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .teacher-cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary-hero,
    .btn-secondary-hero {
        width: 100%;
        text-align: center;
    }

    .teacher-main-content {
        padding: 40px 20px;
    }

    .content-card {
        padding: 25px;
    }

    .sidebar-card {
        padding: 20px;
    }

    .teacher-lessons,
    .other-teachers {
        padding: 60px 20px;
    }

    .other-teachers-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
    }

    .teachers-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .teachers-grid.columns-2,
    .teachers-grid.columns-4 {
        grid-template-columns: 1fr;
    }
}

/* Tablet Devices (768px-1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .other-teachers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .teachers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .teachers-grid.columns-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .teachers-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Print Styles */
@media print {
    .teacher-right-sidebar,
    .teacher-cta-buttons,
    .other-teachers,
    .social-links,
    .contact-options {
        display: none;
    }
}
