/***************************************************
*                                                  *
*          WPD Teachers Modern CSS                 *
*          Unified with Homepage Design            *
*                                                  *
***************************************************/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Prata:wght@400&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    letter-spacing: 0.5px;
    background-color: #f3f3f3;
}

/* Header Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.2;
}

h1 {
    font-family: 'Prata', serif;
    font-weight: 400;
    font-size: 3rem;
}

h2 {
    font-family: 'Prata', serif;
    font-weight: 400;
    font-size: 2.5rem;
}

h3 {
    font-family: 'Prata', serif;
    font-weight: 400;
    font-size: 2rem;
}

h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

/* ==========================================================================
   Root Variables
   ========================================================================== */
:root {
  --primary-color: #8f4c73;
  --primary-hover: #631641;
  --dark-purple: #631641;
  --medium-purple: #7a3960;
  --green: #2F855A;
  --text-dark: #333;
  --text-light: #666;
  --bg-light: #f3f3f3;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

/* Screen reader only utility class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/***************************************************
*                                                  *
*              Teachers Page Styles                *
*                                                  *
***************************************************/

/* Main page container */
.wpd-teachers-page {
    background-color: #ffffff;
    padding: 10rem 1.5rem 4rem;
    position: relative;
}

.wpd-teachers-page__container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Page Header */
.wpd-teachers-page__header {
    text-align: center;
    margin-bottom: 4rem;
}

.wpd-teachers-page__title {
    font-family: 'Prata', serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-sm);
    letter-spacing: -0.5px;
}

.wpd-teachers-page__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background-color: var(--primary-color);
}

.wpd-teachers-page__subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/***************************************************
*                                                  *
*              Quick Access Teacher Cards          *
*                                                  *
***************************************************/

.wpd-teacher-cards {
    background: rgba(143, 76, 115, 0.05);
    padding: var(--spacing-lg);
    border-radius: 8px;
    margin-bottom: 4rem;
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.wpd-teacher-cards__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

/* Individual Teacher Cards */
.wpd-teacher-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid transparent;
}

.wpd-teacher-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}

.wpd-teacher-card__image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.wpd-teacher-card__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.wpd-teacher-card:hover .wpd-teacher-card__bg {
    transform: scale(1.05);
}

.wpd-teacher-card__info {
    padding: var(--spacing-md);
}

.wpd-teacher-card__name {
    font-family: 'Prata', serif;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0 0 var(--spacing-xs) 0;
}

.wpd-teacher-card__position {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 300;
    margin: 0;
}

/***************************************************
*                                                  *
*              Detailed Teacher Profiles           *
*                                                  *
***************************************************/

.wpd-teacher-profiles {
    display: grid;
    gap: 4rem;
}

.wpd-teacher-profile {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: var(--spacing-lg);
    scroll-margin-top: 8rem;
    transition: box-shadow 0.3s ease;
}

.wpd-teacher-profile:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Profile Header */
.wpd-teacher-profile__header {
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: var(--spacing-sm);
}

.wpd-teacher-profile__name {
    font-family: 'Prata', serif;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0 0 var(--spacing-xs) 0;
}

.wpd-teacher-profile__position {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 300;
    margin: 0;
    font-style: italic;
}

/* Profile Content Layout */
.wpd-teacher-profile__content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.wpd-teacher-profile__image {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 3px solid var(--bg-light);
}

.wpd-teacher-profile__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Profile Details */
.wpd-teacher-profile__details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Contact Information */
.wpd-teacher-profile__contact {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.wpd-teacher-profile__phone,
.wpd-teacher-profile__email {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
    background: var(--bg-light);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 400;
}

.wpd-teacher-profile__phone:hover,
.wpd-teacher-profile__email:hover {
    background: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.wpd-teacher-profile__phone i,
.wpd-teacher-profile__email i {
    font-size: 0.8rem;
}

/* Biography */
.wpd-teacher-profile__bio {
    color: var(--text-light);
    line-height: 1.7;
}

.wpd-teacher-profile__bio p {
    margin-bottom: var(--spacing-sm);
    font-weight: 300;
}

.wpd-teacher-profile__bio p:last-child {
    margin-bottom: 0;
}

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

/* Tablet Large Responsive Styles (1024px and below) */
@media (max-width: 1024px) {
    .wpd-teachers-page {
        padding: 11.5rem 1.5rem 6rem;
    }

    .wpd-teachers-page__title {
        font-size: 2rem;
    }

    .wpd-teacher-profile {
        scroll-margin-top: 6rem;
    }

    .wpd-teacher-profile__content {
        grid-template-columns: 280px 1fr;
        gap: var(--spacing-lg);
    }

    .wpd-teacher-profile__image {
        height: 350px;
    }

    .wpd-teacher-profile__name {
        font-size: 1.6rem;
    }
}

/* Tablet Responsive Styles (768px and below) */
@media (max-width: 768px) {
    .wpd-teachers-page {
        padding: 10.5rem 1.5rem 5rem;
    }

    .wpd-teachers-page__title {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }

    .wpd-teachers-page__subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }

    .wpd-teacher-cards {
        padding: var(--spacing-md);
    }

    .wpd-teacher-card__image {
        height: 220px;
    }

    .wpd-teacher-profile {
        padding: var(--spacing-md);
        scroll-margin-top: 5rem;
    }

    .wpd-teacher-profile__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .wpd-teacher-profile__image {
        max-width: 400px;
        height: 300px;
        margin: 0 auto;
    }

    .wpd-teacher-profile__name {
        font-size: 1.5rem;
    }

    .wpd-teacher-profile__contact {
        justify-content: center;
    }
}

/* Mobile Responsive Styles (480px and below) */
@media (max-width: 480px) {
    .wpd-teachers-page {
        padding: 9rem 1rem 4rem;
    }

    .wpd-teachers-page__title {
        font-size: 1.75rem;
        padding-bottom: var(--spacing-xs);
    }

    .wpd-teachers-page__title::after {
        width: 60px;
        height: 2px;
    }

    .wpd-teachers-page__subtitle {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: var(--spacing-lg);
    }

    .wpd-teacher-cards {
        padding: var(--spacing-sm);
    }

    .wpd-teacher-cards__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .wpd-teacher-card__image {
        height: 200px;
    }

    .wpd-teacher-card__info {
        padding: var(--spacing-sm);
    }

    .wpd-teacher-card__name {
        font-size: 1.1rem;
    }

    .wpd-teacher-card__position {
        font-size: 0.85rem;
    }

    .wpd-teacher-profile {
        padding: var(--spacing-sm);
        scroll-margin-top: 4rem;
    }

    .wpd-teacher-profile__image {
        max-width: 100%;
        height: 250px;
    }

    .wpd-teacher-profile__name {
        font-size: 1.4rem;
    }

    .wpd-teacher-profile__position {
        font-size: 1rem;
    }

    .wpd-teacher-profile__contact {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xs);
    }

    .wpd-teacher-profile__phone,
    .wpd-teacher-profile__email {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .wpd-teacher-profile__bio {
        font-size: 0.9rem;
    }
}

/***************************************************
*                                                  *
*              Accessibility & Focus Styles        *
*                                                  *
***************************************************/

/* Focus styles for accessibility */
.wpd-teacher-card:focus,
.wpd-teacher-profile__phone:focus,
.wpd-teacher-profile__email:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .wpd-teacher-card,
    .wpd-teacher-card__bg,
    .wpd-teacher-profile__phone,
    .wpd-teacher-profile__email {
        transition: none;
    }
    
    .wpd-teacher-card:hover,
    .wpd-teacher-card:hover .wpd-teacher-card__bg {
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wpd-teacher-card {
        border: 2px solid var(--text-dark);
    }
    
    .wpd-teachers-page__title::after {
        height: 4px;
    }
    
    .wpd-teacher-profile {
        border: 2px solid var(--text-dark);
    }
    
    .wpd-teacher-profile__phone,
    .wpd-teacher-profile__email {
        border: 2px solid var(--primary-color);
    }
}