﻿/* --- Global Variables and Basic Reset --- */
:root {
    --primary-color: #ffc107; /* Warning yellow */
    --secondary-color: #007bff; /* Blue for secondary actions */
    --danger-color: #dc3545; /* Red for enrollment buttons */
    --dark-color: #343a40;    /* Dark Gray */
    --light-gray: #f8f9fa;
    --font-family: 'Arial', sans-serif; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Core Typography --- */
h1, h2, h3 {
    margin-bottom: 0.5em;
    line-height: 1.2;
}

h2 {
    font-size: 2.2rem; 
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.content-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem; 
    text-transform: uppercase;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #6c757d;
}

.bg-light-gray {
    background-color: var(--light-gray);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #e0a800;
}

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

.btn-secondary:hover {
    background-color: #0056b3;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c82333;
}

/* --- Header and Navigation --- */
.site-header {
    background: var(--dark-color);
    color: white;
    padding: 15px 0;
    position: sticky; 
    top: 0;
    z-index: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.logo {
    font-size: 1.5em;
    font-weight: bold;
}

.main-nav {
    /* Initially visible on desktop */
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0 15px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;    
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}

/* ------------------------------------------------------------- */
/* HERO SECTION SLIDESHOW STYLES */
/* ------------------------------------------------------------- */
.hero-section {
    height: 70vh;
    position: relative;
    overflow: hidden;
}

.slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; 
    animation: fade-slides 15s infinite; 
}

.slide .container {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white; 
}

.slide .container h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem); 
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); 
    font-weight: 900;
}
.slide .container h3 {
    font-size: clamp(1.2rem, 3vw, 2rem);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    font-weight: 500;
}
.slide .container strong {
    color: var(--primary-color);
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.slideshow .slide:nth-child(1) { animation-delay: 0s; }
.slideshow .slide:nth-child(2) { animation-delay: 5s; }
.slideshow .slide:nth-child(3) { animation-delay: 10s; }

@keyframes fade-slides {
    0%   { opacity: 0; }
    5%   { opacity: 1; }
    30%  { opacity: 1; }
    33%  { opacity: 0; }
    100% { opacity: 0; }
}

/* ------------------------------------------------------------- */
/* FEATURES SECTION */
/* ------------------------------------------------------------- */

.features-section .section-title {
    margin: 0 auto 50px auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-item {
    border: 1px solid #ddd;
    padding: 30px;
    text-align: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.feature-item h3 {
    margin-top: 10px;
}

.feature-item ul {
    list-style: disc;
    text-align: left;
    margin: 10px 0 20px 20px;
}

.feature-item li {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    margin: 0 auto 15px auto;
    color: white; 
}

/* ------------------------------------------------------------- */
/* COURSES SECTION - FIXED CAROUSEL */
/* ------------------------------------------------------------- */

.courses-section .section-title,
.courses-section .section-subtitle {
    text-align: center;
    margin: 0 auto 40px auto;
}

.course-carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.courses-grid-container {
    overflow: hidden;
    width: 100%;
    padding: 0 60px;
}

.courses-grid {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

/* COURSE ITEM STYLING - DEFAULT 3 COLUMNS */
.course-item {
    flex-shrink: 0;
    width: 33.333%; /* 3 COLUMNS ON DESKTOP */
    padding: 0 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    min-height: 700px;
}

.course-item .course-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.course-item .course-content p {
    flex-grow: 1;
}

.thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.thumbnail {
    position: relative;
}

.price {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--dark-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
}

.category {
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--primary-color);
    color: var(--dark-color);
    padding: 5px 10px;
    font-weight: 700;
}

.course-content h3 {
    font-size: 1.2em;
    min-height: 60px;
    margin-bottom: 10px;
}

.rating {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
}

/* --- Carousel Arrows (Courses) --- */
.course-carousel-prev,
.course-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark-color);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s;
    border-radius: 5px;
}

.course-carousel-prev:hover,
.course-carousel-next:hover { 
    opacity: 1; 
}

.course-carousel-prev { 
    left: 10px; 
}

.course-carousel-next { 
    right: 10px; 
}

.course-carousel-prev:disabled,
.course-carousel-next:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ------------------------------------------------------------- */
/* TESTIMONIALS SECTION - FIXED CAROUSEL */
/* ------------------------------------------------------------- */

.testimonials-section .section-title {
    text-align: center;
    margin-bottom: 40px;
}

.video-carousel-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.video-grid-container {
    overflow: hidden;
    width: 100%;
    padding: 0 40px;
}

.video-grid {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

/* VIDEO ITEM STYLING - DEFAULT 3 COLUMNS */
.video-item {
    flex-shrink: 0;
    width: 33.333%; /* 3 COLUMNS ON DESKTOP */
    padding: 0 10px;
    text-align: center;
    box-sizing: border-box;
}

.video-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.video-link {
    position: relative;
    display: block;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 5px;
}

.video-link:hover .play-overlay {
    opacity: 1;
}

.video-caption {
    margin-top: 10px;
    font-weight: bold;
}

/* Testimonial Arrows */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark-color);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 50;
    opacity: 0.8;
    transition: opacity 0.3s;
    border-radius: 5px;
}

.carousel-prev:hover,
.carousel-next:hover { opacity: 1; }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-prev:disabled,
.carousel-next:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ------------------------------------------------------------- */
/* OTHER SECTIONS - KEEP ORIGINAL */
/* ------------------------------------------------------------- */

.about-section {
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
    padding: 80px 0;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.about-section .container {
    position: relative;
    z-index: 2;
}

.about-section p {
    margin-bottom: 1em;
}
.about-section h2, .about-section p {
    text-align: left; 
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.teacher-item {
    display: flex;
    gap: 20px;
    border: 1px solid #eee;
    padding: 20px;
    align-items: flex-start;
    background: white;
    border-radius: 8px;
}

.teacher-photo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

.teacher-info h3 {
    margin-bottom: 0;
}

.teacher-info span {
    display: block;
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
}

.teacher-info ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 10px;
}

/* --- VIDEO MODAL/LIGHTBOX STYLES --- */
.modal-overlay {
    display: none; 
    position: fixed;
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    background-color: var(--dark-color);
    margin: 5% auto; 
    padding: 20px;
    width: 90%;
    max-width: 800px;
    position: relative;
}

.modal-close {
    color: white;
    font-size: 30px;
    font-weight: bold;
    position: absolute;
    top: 5px;
    right: 15px;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.video-player-container {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
}

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

/* ------------------------------------------------------------- */
/* CONTACT SECTION STYLES */
/* ------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
}

.contact-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.contact-details h3 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

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

.contact-details i {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.2em;
    width: 20px;
    text-align: center;
}

.social-links a {
    color: var(--dark-color);
    font-size: 1.8em;
    margin-right: 15px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
}

.form-message {
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
}

/* ------------------------------------------------------------- */
/* MEDIA QUERIES - FIXED MOBILE MENU */
/* ------------------------------------------------------------- */

/* TABLET (768px and below) - 2 COLUMNS */
@media (max-width: 768px) {
    .course-item {
        width: 50%; /* 2 columns */
    }
    
    .video-item {
        width: 50%; /* 2 columns */
    }
    
    .courses-grid-container {
        padding: 0 40px;
    }
    
    .video-grid-container {
        padding: 0 30px;
    }

    /* Mobile Navigation - FIXED */
    .main-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--dark-color);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }
    
    .nav-links {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }
    
    .nav-links li {
        margin: 10px 0;
    }
    
    .nav-links a {
        padding: 15px 20px;
        display: block;
    }
    
    .menu-toggle {
        display: block; 
    }
}

/* MOBILE (480px and below) - 1 COLUMN */
@media (max-width: 480px) {
    .course-item {
        width: 100%; /* 1 column */
    }
    
    .video-item {
        width: 100%; /* 1 column */
    }
    
    .courses-grid-container {
        padding: 0 20px;
    }
    
    .video-grid-container {
        padding: 0 20px;
    }
    
    .course-carousel-prev,
    .course-carousel-next {
        padding: 10px 15px;
        font-size: 1.2em;
    }
    
    .carousel-prev,
    .carousel-next {
        padding: 8px 12px;
        font-size: 1.2em;
    }
}

/* ------------------------------------------------------------- */
/* DROPDOWN MENU */
/* ------------------------------------------------------------- */

/* SIMPLE DROPDOWN FIX - PROPER DROPDOWN POSITION */
@media (max-width: 768px) {
    .dropdown {
        position: relative;
        width: auto; /* Don't take full width */
    }
    
    .dropdown-toggle {
        position: relative;
        padding-right: 25px; /* Space for arrow */
        cursor: pointer;
    }
    
    .dropdown-toggle::after {
        content: '▼';
        font-size: 0.7em;
        margin-left: 8px;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .dropdown.active .dropdown-toggle::after {
        content: '▲';
    }
    
    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 200px;
        background: #444;
        z-index: 1000;
        border-radius: 0 0 5px 5px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu a {
        color: white;
        padding: 12px 20px;
        border-bottom: 1px solid #555;
        display: block;
        text-decoration: none;
    }
    
    .dropdown-menu li:last-child a {
        border-bottom: none;
    }
    
    .dropdown-menu a:hover {
        background: #555;
    }
}

/* DESKTOP DROPDOWN STYLES */
@media (min-width: 769px) {
    .dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        min-width: 200px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border-radius: 4px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        list-style: none;
        z-index: 1000;
        margin: 0;
        padding: 0;
    }
    
    .dropdown-menu a {
        color: #333;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #eee;
        white-space: nowrap;
        text-decoration: none;
        display: block;
    }
    
    .dropdown-menu a:hover {
        background: #f5f5f5;
        color: #333;
    }
    
    .dropdown-menu li:last-child a {
        border-bottom: none;
    }
    
    /* Show dropdown on hover for desktop */
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Dropdown arrow */
    .dropdown-toggle::after {
        content: '▼';
        font-size: 0.7em;
        margin-left: 5px;
    }
}

/* ------------------------------------------------------------- */
/* Header layout adjustment for language switcher */
/* ------------------------------------------------------------- */

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on mobile */
}

/* On mobile, make sure language switcher doesn't interfere with menu */
@media (max-width: 768px) {
    .site-header .container {
        padding: 10px 0;
    }
    
    .language-switcher {
        order: 3; /* Move to end if needed */
        width: 120px;
        align-self: center;
    }
    
    .main-nav {
        order: 2;
        width: 100%;
    }
}