/**
 * Enhanced Educational WordPress Theme Styles
 * 
 * @package School_Theme
 * @version 2.0.0
 */

/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    --font-family-primary: 'Open Sans', sans-serif;
    --font-family-heading: 'Roboto', sans-serif;
    
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-sm: 0.25rem;
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
    
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #2980b9 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, #34495e 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, #c0392b 100%);
}

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-1 { font-size: 6rem; font-weight: 300; }
.display-2 { font-size: 5.5rem; font-weight: 300; }
.display-3 { font-size: 4.5rem; font-weight: 300; }
.display-4 { font-size: 3.5rem; font-weight: 300; }
.display-5 { font-size: 3rem; font-weight: 300; }
.display-6 { font-size: 2.5rem; font-weight: 300; }

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: #2980b9;
    text-decoration: none;
}

/* ===== UTILITY CLASSES ===== */
.hover-lift {
    transition: var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.hover-scale {
    transition: var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: var(--transition-base);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition-slow);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: var(--transition-slow);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== ENHANCED BUTTONS ===== */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1.5rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-base);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--gradient-secondary);
    border: none;
    color: white;
}

.btn-accent {
    background: var(--gradient-accent);
    border: none;
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
}

/* ===== ENHANCED CARDS ===== */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    overflow: hidden;
    background: white;
}

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

.card-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

.card-footer {
    background: var(--light-color);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

/* ===== NAVIGATION ENHANCEMENTS ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark-color);
    padding: 0.75rem 1rem;
    transition: var(--transition-base);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* ===== HERO SECTIONS ===== */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ===== SLIDER ENHANCEMENTS ===== */
.carousel {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.carousel-item {
    position: relative;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border-radius: var(--border-radius);
    padding: 2rem;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    text-align: left;
}

.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition-base);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-indicators {
    bottom: 1rem;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    transition: var(--transition-base);
}

.carousel-indicators .active {
    background: white;
    transform: scale(1.2);
}

/* ===== FEATURE SECTIONS ===== */
.feature-card {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-base);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    color: var(--accent-color);
}

/* ===== NEWS AND BLOG CARDS ===== */
.news-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.news-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.news-image img {
    transition: var(--transition-slow);
    width: 100%;
    height: auto;
    position: absolute;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -1rem;
    left: 2rem;
    font-size: 6rem;
    color: var(--primary-color);
    font-family: serif;
    opacity: 0.3;
}

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

/* ===== FORMS ===== */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition-base);
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--gradient-secondary);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.footer-widget h3 {
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-base);
}

.footer-widget a:hover {
    color: white;
    padding-left: 0.5rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-30px);
    }
    70% {
        transform: translateY(-15px);
    }
    90% {
        transform: translateY(-4px);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .display-1 { font-size: 5rem; }
    .display-2 { font-size: 4.5rem; }
    .display-3 { font-size: 4rem; }
    .display-4 { font-size: 3rem; }
    .display-5 { font-size: 2.5rem; }
    .display-6 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .display-1 { font-size: 3.5rem; }
    .display-2 { font-size: 3rem; }
    .display-3 { font-size: 2.5rem; }
    .display-4 { font-size: 2rem; }
    .display-5 { font-size: 1.75rem; }
    .display-6 { font-size: 1.5rem; }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    .carousel-caption {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .navbar-nav .nav-link::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .carousel-caption {
    text-align: right;
}

[dir="rtl"] .footer-widget h3::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .footer-widget a:hover {
    padding-left: 0;
    padding-right: 0.5rem;
}

/* ===== ACCESSIBILITY ===== */
.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;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: var(--border-radius);
}

.skip-link:focus {
    top: 6px;
}

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

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators,
    .btn,
    .footer-widget {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

