/* ===================================================
   EDUWORKS WORDPRESS THEME - MAIN STYLESHEET
   Version: 2.0.0
   WordPress Ready: Yes
   Author: Eduworks Team
   ================================================== */

/*
 * WORDPRESS THEME CONVERSION NOTES:
 * ================================
 * This modular CSS architecture is designed for seamless WordPress integration:
 * 
 * 1. Custom Properties (CSS Variables) are WordPress Customizer ready
 * 2. Component classes follow WordPress naming conventions  
 * 3. All styles use the 'ew-' prefix to prevent theme conflicts
 * 4. Responsive design uses WordPress-compatible breakpoints
 * 5. Components are structured for easy template part conversion
 * 
 * WORDPRESS INTEGRATION ROADMAP:
 * - Convert ew-service-card → template-parts/service-card.php
 * - Convert ew-testimonial-card → template-parts/testimonial-card.php  
 * - Convert ew-blog-card → template-parts/post-card.php
 * - Hero sections → template-parts/hero-{page}.php
 * - Navigation → header.php with wp_nav_menu()
 */

/* ===== CORE FRAMEWORK IMPORTS ===== */
@import url('ew-core.css');          /* Variables, typography, base styles */
@import url('ew-components.css');    /* Cards, buttons, forms, interactive elements */
@import url('ew-layout.css');        /* Sections, grids, hero areas, carousels */

/* ===== WORDPRESS COMPATIBILITY LAYER =====
 * These styles ensure backwards compatibility during theme conversion
 * Remove these once WordPress theme is fully implemented
 */

/* Base body styles for static HTML (WordPress handles this in style.css) */
body {
    font-family: 'Inter', sans-serif;
    /* WordPress Custom Properties - Ready for Customizer integration */
    --brand-teal: var(--ew-primary);
    --brand-dark: var(--ew-secondary);  
    --brand-light-teal: var(--ew-primary-light);
}

/* ===== LEGACY COMPATIBILITY CLASSES =====
 * These provide backwards compatibility with existing HTML
 * Will be removed in WordPress theme version
 */

/* Brand color utilities - WordPress Customizer ready */
.text-brand-teal { color: var(--ew-primary); }
.bg-brand-teal { background-color: var(--ew-primary); }
.bg-brand-light-teal { background-color: var(--ew-primary-light); }
.border-brand-teal { border-color: var(--ew-primary); }
.hover-bg-brand-teal-dark:hover { 
    background-color: var(--ew-primary-dark);
    transition: background-color var(--ew-transition-normal);
}
.text-brand-dark { color: var(--ew-secondary); }
.bg-brand-dark { background-color: var(--ew-secondary); }

/* ===== LEGACY DROPDOWN SYSTEM =====
 * Maintained for HTML compatibility - WordPress will use wp_nav_menu()
 * TODO: Replace with WordPress navigation walker
 */

.dropdown-menu {
    display: none;
    animation: fadeIn var(--ew-transition-normal);
    border: 1px solid var(--ew-border-medium);
    background-color: var(--ew-bg-primary);
    border-radius: var(--ew-radius-lg);
    box-shadow: var(--ew-shadow-xl);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--ew-text-primary);
    transition: all var(--ew-transition-fast);
    border-bottom: 1px solid var(--ew-border-light);
    text-decoration: none;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: var(--ew-primary);
    color: white;
    padding-left: 1.5rem;
}

.dropdown-menu a:first-child {
    border-top-left-radius: var(--ew-radius-lg);
    border-top-right-radius: var(--ew-radius-lg);
}

.dropdown-menu a:last-child {
    border-bottom-left-radius: var(--ew-radius-lg);
    border-bottom-right-radius: var(--ew-radius-lg);
}

/* Dropdown arrow styling */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent var(--ew-bg-primary) transparent;
    z-index: 2;
}

.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -11px;
    left: 20px;
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent var(--ew-border-medium) transparent;
    z-index: 1;
}

/* ===== LEGACY NAVIGATION STYLES =====
 * WordPress will handle this with wp_nav_menu() and walker classes
 */

.main-nav-link {
    position: relative;
    padding-bottom: 6px;
    font-weight: 500;
    color: var(--ew-text-secondary);
    transition: color var(--ew-transition-normal);
    text-decoration: none;
}

.main-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 0;
    margin: auto;
    height: 2px;
    background-color: var(--ew-primary);
    transition: width var(--ew-transition-normal);
}

.main-nav-link:hover::after,
.main-nav-link.active::after {
    width: 100%;
}

.dropdown-toggle .fa-chevron-down {
    transition: transform var(--ew-transition-normal);
}

.dropdown-toggle.open .fa-chevron-down {
    transform: rotate(180deg);
}

/* Mobile navigation - WordPress mobile menu compatibility */
.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--ew-radius-md);
    font-weight: 500;
    color: var(--ew-text-primary);
    transition: all var(--ew-transition-fast);
    text-decoration: none;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background-color: var(--ew-primary);
    color: white;
}

.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-dropdown-toggle .fa-chevron-down {
    transition: transform var(--ew-transition-normal);
}

.mobile-dropdown-toggle.open .fa-chevron-down {
    transform: rotate(180deg);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--ew-transition-slow);
    background-color: var(--ew-bg-secondary);
    border-radius: var(--ew-radius-md);
}

/* ===== LEGACY CARD HOVER EFFECTS =====
 * Maintained for current HTML - new ew-* classes handle this better
 * WordPress theme will use only ew-* prefixed classes
 */

.stat-card, .process-card, .blog-card, .service-card, .value-card, 
.process-step-card, .service-component-card, .testimonial-card, 
.spotlight-card, .philosophy-card {
    transition: all var(--ew-transition-normal);
}

.stat-card:hover, .process-card:hover, .blog-card:hover, .service-card:hover, 
.value-card:hover, .process-step-card:hover, .service-component-card:hover, 
.testimonial-card:hover, .spotlight-card:hover, .philosophy-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ew-shadow-xl);
}

/* University logo effects - WordPress will use ew-university-logo */
.university-logo {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--ew-transition-normal);
}

.university-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ===== HERO SECTION BACKGROUNDS =====
 * WordPress Note: These will become dynamic backgrounds in WordPress
 * Use WordPress custom fields or theme customizer for image management
 */

.hero-section {
    background: linear-gradient(rgba(45, 55, 72, 0.6), rgba(45, 55, 72, 0.6)), 
                url('../images/hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

.cta-section {
    background: linear-gradient(rgba(45, 55, 72, 0.85), rgba(45, 55, 72, 0.85)), 
                url('../images/cta-bg.jpeg') no-repeat center center;
    background-size: cover;
}

/* Page-specific hero backgrounds - WordPress dynamic backgrounds */
.hero-section-about {
    background: linear-gradient(rgba(45, 55, 72, 0.7), rgba(45, 55, 72, 0.7)), 
                url('../images/about-hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

.hero-section-process {
    background: linear-gradient(rgba(45, 55, 72, 0.7), rgba(45, 55, 72, 0.7)), 
                url('../images/process-hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

.hero-section-parents {
    background: linear-gradient(rgba(45, 55, 72, 0.7), rgba(45, 55, 72, 0.7)), 
                url('../images/parents-hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

.hero-section-schools {
    background: linear-gradient(rgba(45, 55, 72, 0.7), rgba(45, 55, 72, 0.7)), 
                url('../images/schools-hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

.hero-section-success {
    background: linear-gradient(rgba(45, 55, 72, 0.7), rgba(45, 55, 72, 0.7)), 
                url('../images/success-hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

.hero-section-services {
    background: linear-gradient(rgba(45, 55, 72, 0.7), rgba(45, 55, 72, 0.7)), 
                url('../images/services-hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

.hero-section-blog {
    background: linear-gradient(rgba(45, 55, 72, 0.7), rgba(45, 55, 72, 0.7)), 
                url('../images/blog-hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

.hero-section-events {
    background: linear-gradient(rgba(45, 55, 72, 0.7), rgba(45, 55, 72, 0.7)), 
                url('../images/events-hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

.hero-section-faq {
    background: linear-gradient(rgba(45, 55, 72, 0.7), rgba(45, 55, 72, 0.7)), 
                url('../images/faq-hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

.hero-section-contact {
    background: linear-gradient(rgba(45, 55, 72, 0.7), rgba(45, 55, 72, 0.7)), 
                url('../images/contact-hero-bg.jpeg') no-repeat center center;
    background-size: cover;
}

/* ===== LEGACY TIMELINE STYLES =====
 * WordPress Note: Convert to Gutenberg block or ACF flexible content
 */

.timeline-item:before {
    content: '';
    position: absolute;
    left: -31px;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: var(--ew-primary);
}

.timeline-dot {
    position: absolute;
    left: -42px;
    top: 5px;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background-color: var(--ew-primary);
    border: 4px solid var(--ew-primary-light);
}

/* ===== LEGACY CATEGORY BUTTONS =====
 * WordPress Note: Use for post category filtering or taxonomy displays
 */

.category-btn {
    padding: var(--ew-space-sm) var(--ew-space-lg);
    border: 1px solid var(--ew-border-medium);
    border-radius: 9999px;
    font-weight: 500;
    color: var(--ew-text-secondary);
    transition: all var(--ew-transition-fast);
    background-color: var(--ew-bg-primary);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.category-btn:hover {
    background-color: var(--ew-secondary);
    color: white;
    border-color: var(--ew-secondary);
}

.category-btn.active {
    background-color: var(--ew-primary);
    color: white;
    border-color: var(--ew-primary);
}

/* ===== LEGACY FAQ ACCORDION =====
 * WordPress Note: Convert to Gutenberg FAQ block or ACF repeater
 */

.faq-item {
    border: 1px solid var(--ew-border-light);
    border-radius: var(--ew-radius-lg);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.25rem;
    font-weight: 600;
    color: var(--ew-text-primary);
    text-align: left;
    background-color: var(--ew-bg-secondary);
    transition: background-color var(--ew-transition-fast);
    border: none;
    cursor: pointer;
}

.faq-question:hover {
    background-color: var(--ew-border-light);
}

.faq-question i {
    transition: transform var(--ew-transition-normal);
}

.faq-question.open i {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--ew-transition-slow), padding var(--ew-transition-slow);
}

.faq-answer p {
    padding: 0 1.25rem 1.25rem 1.25rem;
    color: var(--ew-text-secondary);
}

/* ===== LEGACY CAROUSEL STYLES =====
 * WordPress Note: Convert to Gutenberg carousel block or ACF gallery
 */

.testimonials-carousel-container {
    position: relative;
    overflow: hidden;
    cursor: grab;
}

.testimonials-carousel-container.grabbing {
    cursor: grabbing;
}

.testimonials-carousel-track-container {
    position: relative;
    padding: 0 60px;
}

.testimonials-carousel-track {
    display: flex;
    transition: transform var(--ew-transition-slow);
    will-change: transform;
}

.testimonials-carousel-slide {
    flex: 0 0 100%;
    min-height: 400px;
    padding: 0 15px;
}

/* Responsive carousel adjustments */
@media (max-width: 1023px) {
    .testimonials-carousel-track-container {
        padding: 0 50px;
    }
}

@media (max-width: 767px) {
    .testimonials-carousel-track-container {
        padding: 0 40px;
    }
    .testimonials-carousel-slide {
        padding: 0 10px;
    }
}

/* Carousel navigation styles */
.testimonials-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid var(--ew-border-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ew-bg-primary);
    border-radius: 50%;
    box-shadow: var(--ew-shadow-md);
    transition: all var(--ew-transition-normal);
    z-index: 10;
}

.testimonials-nav:hover {
    background-color: var(--ew-primary);
    border-color: var(--ew-primary);
    color: white;
}

.testimonials-nav-prev {
    left: 15px;
}

.testimonials-nav-next {
    right: 15px;
}

.testimonials-nav i {
    font-size: 16px;
}

.testimonials-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.testimonials-dot {
    width: 10px;
    height: 10px;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    background-color: var(--ew-border-medium);
    transition: background-color var(--ew-transition-normal);
}

.testimonials-dot:hover,
.testimonials-dot.active {
    background-color: var(--ew-primary);
}

.testimonials-carousel-container.grabbing .testimonials-carousel-track {
    transition: none;
}

.testimonials-carousel-slide .testimonial-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonials-carousel-slide .testimonial-card > div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.testimonials-carousel-slide .testimonial-card p {
    flex: 1;
}

/* ===== LEGACY ANIMATIONS =====
 * WordPress compatible animations
 */

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ===== WORDPRESS DEVELOPMENT NOTES =====
 * 
 * CUSTOM POST TYPES TO CREATE:
 * - Services (ew-service-card content)
 * - Testimonials (ew-testimonial-card content)  
 * - Team Members (about page content)
 * - Events (events page content)
 * - FAQ Items (faq page content)
 * 
 * THEME CUSTOMIZER SECTIONS:
 * - Brand Colors (--ew-primary, --ew-secondary, etc.)
 * - Typography Settings (font families, sizes)
 * - Layout Options (container widths, spacing)
 * - Hero Images (all background images)
 * 
 * TEMPLATE HIERARCHY:
 * - index.php (blog homepage)
 * - front-page.php (static homepage)
 * - page-{slug}.php (custom page templates)
 * - single-{post-type}.php (custom post type templates)
 * - archive-{post-type}.php (custom post type archives)
 * 
 * REQUIRED WORDPRESS FUNCTIONS:
 * - wp_enqueue_style() for CSS files
 * - wp_enqueue_script() for JavaScript files  
 * - wp_nav_menu() for navigation
 * - get_template_part() for modular templates
 * - wp_get_attachment_image() for responsive images
 */
