/*
Theme Name: Educational Platform Theme
Theme URI: https://example.com/educational-platform
Author: Your Name
Author URI: https://example.com
Description: A custom WordPress theme for educational platforms with RTL support
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: educational-platform-theme
*/

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

body {
    font-family: cairo, 'Tajawal', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    direction: rtl;
    text-align: right;
}

a {
    text-decoration: none;
    color: #0073aa;
}

a:hover {
    color: #00a0d2;
}

img {
    max-width: 100%;
    height: auto;
}

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

.btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #004D90;
    color: #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #005177;
    color: #fff;
}

/* Header Styles */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.top-bar {
    background-color: #f8f8f8;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-media a {
    color: #333;
    margin-left: 15px;
    font-size: 16px;
}

.contact-info a {
    color: #333;
    margin-right: 20px;
    font-size: 14px;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 30px; /* This adds space between the logo and text */
}

.site-logo {
    margin-right: 30px; /* Additional right margin for RTL layout */
}

.site-info {
    margin-left: 20px;
}

.site-info h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
}

.site-info p {
    font-size: 14px;
    color: #666;
    margin: 0 0 5px;
    line-height: 1.4;
}

.site-logo img {
    max-height: 80px;
    width: auto;
}

.training-sessions {
    font-weight: bold;
    position: relative;
}

/* Main Navigation */
.main-navigation {
    background-color: #004D90;
}

.main-navigation .menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation .menu li {
    position: relative;
}

.main-navigation .menu li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.main-navigation .menu li a:hover {
    background-color: #005177;
}

/* Hero Slider Styles */
.hero-slider {
    position: relative;
    overflow: hidden;
    height: 500px;
    margin-bottom: 30px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease;
}

.slide.current {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    max-width: 80%;
    padding: 20px;
    border-radius: 8px;
    z-index: 2;
}

.slide-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.slide-subtitle {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.slide-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #0073aa;
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.slide-button:hover {
    background-color: #005177;
    transform: translateY(-3px);
}

/* Slider Navigation Dots */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 5;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
	background-color: rgba(255,255,255,0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* Section Styles */
section {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #0073aa;
    margin: 15px auto 0;
}

/* Model Lessons Section */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.lesson-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eaeaea;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 ratio */
}

.lesson-card .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.lesson-card .video-container iframe,
.lesson-card .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lesson-card h3 {
    padding: 15px 15px 5px;
    font-size: 20px;
    margin: 0;
    font-size: 18px;
    border-bottom: 1px solid #eaeaea;
}

.lesson-card .lesson-meta {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    background-color: #f9f9f9;
    font-size: 14px;
    color: #666;
}

.lesson-card p {
    padding: 0 15px 15px;
    color: #666;
    font-size: 14px;
    margin: 15px 0;
}

.lesson-card .btn {
    margin: 0 15px 15px;
    display: block;
    text-align: center;
    margin: 15px;
    padding: 10px;
    background-color: #0073aa;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.lesson-card .btn:hover {
    background-color: #005177;
}

.view-all-lessons {
    text-align: center;
    margin-top: 30px;
}

.btn-large {
    padding: 12px 30px;
    font-size: 16px;
}

.no-video {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background-color: #f0f0f0;
    color: #666;
    font-style: italic;
}

/* Single Model Lesson */
.single-model-lesson .entry-header {
    margin-bottom: 30px;
}

.single-model-lesson .lesson-meta {
    margin-top: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.single-model-lesson .lesson-meta div {
    margin-bottom: 5px;
}

.single-model-lesson .lesson-meta span {
    font-weight: bold;
    margin-left: 5px;
}

.single-model-lesson .video-container {
    margin-bottom: 30px;
}

.single-model-lesson .entry-content {
    margin-bottom: 40px;
}

.single-model-lesson .related-lessons {
    padding-top: 30px;
    border-top: 1px solid #eaeaea;
}

.single-model-lesson .related-lessons h3 {
    margin-bottom: 20px;
}

/* Curriculum Section */
.curriculum-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.level-card {
    text-align: center;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    width: 300px;
    transition: transform 0.3s ease;
}

.level-card:hover {
    transform: translateY(-5px);
}

.level-card img {
    max-width: 80px;
    margin-bottom: 20px;
}

.level-card h3 {
    font-size: 22px;
    margin-bottom: 20px;
}

/* Footer Styles */
.site-footer {
    background-color: #222;
    color: #fff;
}

.footer-main {
    padding: 50px 0;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.footer-logo {
    max-width: 150px;
}

.footer-column h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
}

.footer-column h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #0073aa;
    margin-top: 10px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #0073aa;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.footer-contact li i {
    margin-left: 10px;
    color: #0073aa;
}

.footer-social {
    margin-top: 20px;
}

.footer-social a {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: #333;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: #0073aa;
}

.footer-bottom {
    background-color: #111;
    padding: 15px 0;
    text-align: center;
    font-size: 14px;
}

/* Responsive styles */
@media screen and (max-width: 991px) {
    .footer-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 767px) {
    .main-header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-area {
        flex-direction: column;
        margin-bottom: 20px;
    }
    
    .site-info {
        margin: 15px 0;
    }
    
    .main-navigation .menu {
        flex-direction: column;
    }
    
    .lessons-grid,
    .curriculum-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
    }
    
    .hero-slider {
        height: 350px;
    }
    
    .level-card {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .training-menu {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .training-menu li {
        margin: 5px 0;
    }
    
    .slide-title {
        font-size: 1.8rem;
    }
    
    .slide-subtitle {
        font-size: 1rem;
    }
}

/* Add to your style.css file */
.training-sessions {
    position: relative;
}

.training-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.training-menu .training-label {
    font-weight: bold;
    margin-left: 10px;
}

.training-menu li {
    margin-left: 15px;
}

.training-menu li a {
    color: #333;
    transition: color 0.3s ease;
}

.training-menu li a:hover {
    color: #0073aa;
}

/* Video thumbnails and play button */
.video-thumbnail {
    position: relative;
    display: block;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-icon {
    color: white;
    font-size: 24px;
    margin-left: 4px; /* Slight offset for the triangle shape */
}

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

.video-thumbnail:hover .play-button {
    background-color: rgba(0, 0, 0, 0.9);
    width: 65px;
    height: 65px;
}

/* Single video page styles */
.single-model-lesson .video-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.single-model-lesson video {
    width: 100%;
    display: block;
}

/* Responsive video container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container video,
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Default video thumbnail */
.default-thumbnail {
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

.default-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Thumbnails and Player Styles */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.lesson-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #f0f0f0;
}

.video-thumbnail .thumbnail-img,
.video-thumbnail .default-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.default-thumbnail {
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 115, 170, 0.8); /* Primary blue with transparency */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.play-icon {
    color: white;
    width: 30px;
    height: 30px;
}

.video-thumbnail:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(0, 115, 170, 1); /* Full opacity on hover */
}

.lesson-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.lesson-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.lesson-content h3 a {
    color: #333;
    text-decoration: none;
}

.lesson-content h3 a:hover {
    color: #0073aa;
}

.lesson-meta {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    font-size: 14px;
}

.education-level, .class-name {
    padding: 4px 8px;
    background: #f1f1f1;
    border-radius: 4px;
    color: #333;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-align: center;
    margin-top: auto;
}

.btn:hover {
    background-color: #005177;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

/* Video player on single lesson page */
.video-player-wrapper {
    max-width: 100%;
    margin-bottom: 30px;
}

.video-player-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect ratio */
    height: 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.video-player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
}

/* Related lessons section */
.related-lessons {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-lessons h3 {
    margin-bottom: 20px;
}

.related-lessons .lessons-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.related-lessons .lesson-card {
    display: flex;
    flex-direction: column;
}

.related-lessons .lesson-content {
    padding: 10px;
}

.related-lessons h4 {
    font-size: 16px;
    margin: 10px 0 0;
}

.related-lessons .play-button {
    width: 50px;
    height: 50px;
}

/* View all button */
.view-all-lessons {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 40px;
}

#lesson-video {
    width: 100%;
    display: block;
    background-color: #000;
}

/* Custom Video Player Styles */
.custom-video-player-wrapper {
    max-width: 100%;
    margin: 30px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.custom-video-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 8px;
}

.custom-video-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    outline: none;
}

/* Hide native controls on iOS */
.custom-video-element::-webkit-media-controls {
    display: flex !important;
}

.custom-video-element::-webkit-media-controls-enclosure {
    border-radius: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
}

/* Custom play button overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none; /* Allow clicks to pass through to the video */
    opacity: 1;
    transition: opacity 0.3s ease;
}

.custom-video-element:playing ~ .video-overlay {
    opacity: 0;
}

.play-button-large {
    cursor: pointer;
    transform: scale(1);
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.video-overlay:hover .play-button-large {
    transform: scale(1.1);
}

/* Styling for the related videos */
.related-lessons {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-lessons h3 {
    margin-bottom: 30px;
    position: relative;
    font-size: 24px;
    color: #333;
}

.related-lessons h3:after {
    content: "";
    display: block;
    width: 70px;
    height: 3px;
    background: #0073aa;
    margin-top: 10px;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.lesson-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.video-thumbnail a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-thumbnail .thumbnail-img,
.video-thumbnail .default-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.default-thumbnail {
    background-color: #f0f0f0;
}

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

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 115, 170, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.video-thumbnail:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(0, 115, 170, 1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Video player for RTL layouts */
.rtl .custom-video-player-wrapper,
.rtl .custom-video-element {
    direction: ltr; /* Video controls should always be LTR */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lessons-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 20px;
    }
    
    .related-lessons h3 {
        font-size: 20px;
    }
    
    .custom-video-player-wrapper {
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .lessons-grid {
        grid-template-columns: 1fr;
    }
}

/* Tabs Styling */
.tabbed-content-section {
    margin: 50px 0;
}

.tabs-container {
    margin-top: 30px;
}

.tabs-navigation {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.tab-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    color: #555;
}

.tab-button:hover {
    color: #0073aa;
}

.tab-button.active {
    color: #0073aa;
}

.tab-button.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #0073aa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Books Grid Styling */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.book-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.book-thumbnail {
    position: relative;
    padding-top: 140%; /* Book cover aspect ratio */
    overflow: hidden;
}

.book-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-book-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a5276, #2874a6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.book-title-placeholder {
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

.book-content {
    padding: 15px;
}

.book-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.4;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 13px;
}

.education-level, .class-name {
    padding: 3px 8px;
    background: #f1f1f1;
    border-radius: 4px;
    color: #333;
}

/* Documents Grid Styling */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.document-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.document-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.document-type {
    margin-bottom: 15px;
}

.type-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    color: white;
}

.type-badge.exam {
    background-color: #e74c3c;
}

.type-badge.worksheet {
    background-color: #3498db;
}

.document-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

.document-actions {
    margin-top: auto;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-download svg {
    width: 16px;
    height: 16px;
}

/* View All Buttons */
.view-all-books,
.view-all-documents {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .tabs-navigation {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
}

/* Curriculum Section Styles with Class Filtering */
.curriculum-filter {
    margin-bottom: 30px;
}

.filter-by-class {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.filter-label {
    font-weight: bold;
    color: #333;
}

.class-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-btn:hover {
    background-color: #e0e0e0;
}

.filter-btn.active {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.curriculum-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.curriculum-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Animation for filtering */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.curriculum-card.animate-in {
    animation: fadeIn 0.3s ease forwards;
}

.curriculum-thumbnail {
    position: relative;
    padding-top: 75%; /* 4:3 aspect ratio for book covers */
    overflow: hidden;
}

.curriculum-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.default-curriculum-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a5276, #2874a6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.curriculum-title-placeholder {
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

.curriculum-content {
    padding: 15px;
}

.curriculum-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.4;
}

.curriculum-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 13px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.download-icon {
    width: 16px;
    height: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-by-class {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .class-buttons {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .curriculum-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
}

/* Exams & Worksheets Section Styles (Matching Curriculum Styles) */
.exams-worksheets-section {
    padding: 40px 0;
}

.exams-worksheets-section .section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

.exams-worksheets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.document-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.document-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

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

.default-document-cover {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    padding: 20px;
    text-align: center;
    position: relative;
}

.document-title-placeholder {
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1.3;
    max-height: 3.9em;
    overflow: hidden;
}

.document-content {
    padding: 20px;
}

.document-content h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.document-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.document-content h3 a:hover {
    color: #0073aa;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.document-meta .education-level,
.document-meta .class-name,
.document-meta .document-type-label {
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.document-meta .document-type-label {
    background: #f0f4ff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn:hover {
    background: #005f8b;
    color: white;
}

.btn-download {
    background: #4caf50;
}

.btn-download:hover {
    background: #388e3c;
}

.btn-large {
    padding: 12px 24px;
    font-size: 1.1rem;
}

.download-icon {
    margin-right: 6px;
}

.view-all-documents {
    text-align: center;
    margin-top: 20px;
}

.no-documents {
    grid-column: 1/-1;
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    z-index: 1;
}

.type-badge.exam {
    background: #ff7043;
}

.type-badge.worksheet {
    background: #4caf50;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .exams-worksheets-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .exams-worksheets-grid {
        grid-template-columns: 1fr;
    }
    
    .document-thumbnail {
        height: 160px;
    }
}

/* Common styles for both Curriculum and Exams/Worksheets sections */
.curriculum-section,
.exams-worksheets-section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: bold;
}

.curriculum-grid,
.exams-worksheets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.curriculum-card,
.document-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.curriculum-card:hover,
.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.curriculum-thumbnail,
.document-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.curriculum-img,
.document-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.curriculum-card:hover .curriculum-img,
.document-card:hover .document-img {
    transform: scale(1.05);
}

.default-curriculum-cover,
.default-document-cover {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    padding: 20px;
    text-align: center;
    position: relative;
}

.curriculum-title-placeholder,
.document-title-placeholder {
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1.3;
    max-height: 3.9em;
    overflow: hidden;
}

.curriculum-content,
.document-content {
    padding: 20px;
}

.curriculum-content h3,
.document-content h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.curriculum-content h3 a,
.document-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.curriculum-content h3 a:hover,
.document-content h3 a:hover {
    color: #0073aa;
}

.curriculum-meta,
.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.education-level,
.class-name,
.curriculum-type-label,
.document-type-label {
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.curriculum-type-label,
.document-type-label {
    background: #f0f4ff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn:hover {
    background: #005f8b;
    color: white;
}

.btn-download {
    background: #4caf50;
}

.btn-download:hover {
    background: #388e3c;
}

.btn-large {
    padding: 12px 24px;
    font-size: 1.1rem;
}

.download-icon {
    margin-right: 6px;
}

.view-all-curriculum,
.view-all-documents {
    text-align: center;
    margin-top: 20px;
}

.no-curriculum,
.no-documents {
    grid-column: 1/-1;
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    z-index: 1;
}

.type-badge.exam {
    background: #ff7043;
}

.type-badge.worksheet {
    background: #4caf50;
}

.type-badge.curriculum {
    background: #2196F3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .curriculum-grid,
    .exams-worksheets-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .curriculum-grid,
    .exams-worksheets-grid {
        grid-template-columns: 1fr;
    }
    
    .curriculum-thumbnail,
    .document-thumbnail {
        height: 160px;
    }
}
/* WhatsApp Button Styling */
.whatsapp-link {
    display: flex;
    align-items: center;
    background-color: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-link:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.whatsapp-link i {
    font-size: 24px;
    margin-left: 10px; /* For RTL layout */
}

.whatsapp-link span {
    font-weight: bold;
}

/* Mobile responsive styling */
@media screen and (max-width: 768px) {
    .training-sessions {
        margin: 15px 0;
        text-align: center;
    }
    
    .whatsapp-link {
        justify-content: center;
        margin: 0 auto;
        max-width: 200px;
    }
}

