/*
Theme Name: Edutition
Description: A modern, dynamic, and SEO-optimized WordPress theme for online mathematics tuition platform. Features LMS integration, responsive design, and accessibility compliance.
Author: Edutition Team
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: edutition
Tags: education, lms, mathematics, tuition, responsive, accessibility-ready, custom-post-types
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* ==========================================================================
   CSS Reset and Base Styles
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #2d3748;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.2;
    color: #1a202c;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin: 0 0 1rem 0;
}

a {
    color: #3182ce;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #2c5282;
    text-decoration: underline;
}

/* ==========================================================================
   Color Palette - Professional & Trustworthy
   ========================================================================== */

:root {
    /* Primary Colors */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Secondary Colors */
    --secondary-50: #f0fdf4;
    --secondary-100: #dcfce7;
    --secondary-200: #bbf7d0;
    --secondary-300: #86efac;
    --secondary-400: #4ade80;
    --secondary-500: #22c55e;
    --secondary-600: #16a34a;
    --secondary-700: #15803d;
    --secondary-800: #166534;
    --secondary-900: #14532d;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
}

.col-12 { flex: 0 0 100%; }
.col-6 { flex: 0 0 50%; }
.col-4 { flex: 0 0 33.333333%; }
.col-3 { flex: 0 0 25%; }

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.site-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-600);
    text-decoration: none;
}

.site-logo:hover {
    color: var(--primary-700);
    text-decoration: none;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu a {
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--primary-600);
    text-decoration: none;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.btn-primary {
    background-color: var(--primary-600);
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-700);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-600);
    border-color: var(--primary-600);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--primary-600);
    color: #ffffff;
    text-decoration: none;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--secondary-50) 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Card Components
   ========================================================================== */

.card {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

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

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .col-6,
    .col-4,
    .col-3 {
        flex: 0 0 100%;
        margin-bottom: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ==========================================================================
   Homepage Sections
   ========================================================================== */

/* Trust Bar */
.trust-bar {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--gray-200);
}

.trust-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.trust-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-600);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

/* Section Styling */
.featured-courses-section,
.top-tutors-section,
.testimonials-section {
    padding: 4rem 0;
}

.top-tutors-section {
    background-color: var(--gray-50);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem 0.75rem 0 0;
}

.course-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-thumbnail img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-100), var(--secondary-100));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-600);
}

.difficulty-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.difficulty-beginner {
    background-color: var(--secondary-500);
    color: white;
}

.difficulty-intermediate {
    background-color: var(--warning);
    color: white;
}

.difficulty-advanced {
    background-color: var(--error);
    color: white;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.course-category {
    font-size: 0.875rem;
    color: var(--primary-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
    color: #fbbf24;
}

.rating-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.course-title a {
    color: var(--gray-900);
    text-decoration: none;
    font-weight: 600;
}

.course-title a:hover {
    color: var(--primary-600);
}

.course-excerpt {
    color: var(--gray-600);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.course-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.course-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-price .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.course-price .price.free {
    color: var(--secondary-600);
}

/* Tutors Grid */
.tutors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tutor-card {
    text-align: center;
}

.tutor-avatar {
    margin-bottom: 1.5rem;
}

.tutor-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    display: block;
}

.avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
    color: var(--gray-500);
}

.tutor-name a {
    color: var(--gray-900);
    text-decoration: none;
    font-weight: 600;
}

.tutor-name a:hover {
    color: var(--primary-600);
}

.tutor-qualification {
    color: var(--gray-600);
    font-style: italic;
    margin-bottom: 1rem;
}

.tutor-specializations {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.specialization-tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-100);
    color: var(--primary-700);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.tutor-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-weight: 600;
    color: var(--gray-900);
}

.tutor-rate {
    margin-bottom: 1rem;
}

.rate-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.rate-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-600);
    margin-left: 0.5rem;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card .card-body {
    padding: 2rem;
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--gray-700);
    font-style: italic;
    margin: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.author-role {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-primary {
    background-color: white;
    color: var(--primary-600);
}

.cta-section .btn-primary:hover {
    background-color: var(--gray-100);
    color: var(--primary-700);
}

.cta-section .btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.cta-section .btn-secondary:hover {
    background-color: white;
    color: var(--primary-600);
}

/* Footer Styling */
.site-footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
}

.footer-widgets {
    padding: 3rem 0;
}

.footer-widgets .widget-title {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-widgets .widget p {
    color: var(--gray-300);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--gray-800);
    color: var(--gray-300);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: var(--primary-600);
    color: white;
    text-decoration: none;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 0.75rem;
}

.footer-menu a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-menu a:hover {
    color: white;
    text-decoration: none;
}

.contact-info {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--gray-300);
}

.contact-item i {
    color: var(--primary-400);
    width: 20px;
}

.newsletter-signup h5 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 0.375rem;
    background-color: var(--gray-800);
    color: white;
}

.newsletter-form input::placeholder {
    color: var(--gray-400);
}

.newsletter-form button {
    white-space: nowrap;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding: 2rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.footer-nav-menu a {
    color: var(--gray-400);
    font-size: 0.875rem;
    text-decoration: none;
}

.footer-nav-menu a:hover {
    color: white;
    text-decoration: none;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-thumbnail {
    margin-bottom: 1rem;
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.entry-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.entry-title {
    margin-bottom: 1rem;
}

.entry-title a {
    color: var(--gray-900);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--primary-600);
}

.entry-summary {
    color: var(--gray-600);
    flex-grow: 1;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus indicators */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Screen reader only content */
.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;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--gray-300);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
