/*
====================================
  Basic Reset and Base Styles
====================================
*/
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f7f9;
    color: #333;
}

/*
====================================
  Dashboard Layout (Desktop)
====================================
*/
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/*
====================================
  Sidebar (Navigation Panel)
====================================
*/
.sidebar {
    width: 250px;
    background-color: #ffffff; /* हल्का बैकग्राउंड */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    flex-shrink: 0;
}

.panel-title {
    font-size: 1.2rem;
    color: #007bff; /* ब्रांड का प्राथमिक रंग */
    text-align: center;
    margin-bottom: 20px;
    padding: 0 15px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    flex-direction: column;
}

.nav-item {
    padding: 12px 25px;
    display: flex;
    align-items: center;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s, color 0.2s;
}

.nav-item i {
    margin-right: 15px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover, .nav-item.active {
    background-color: #e6f0ff;
    color: #007bff;
    border-left: 4px solid #007bff;
    padding-left: 21px; /* बॉर्डर के लिए एडजस्टमेंट */
}

.nav-item.active i {
    color: #007bff;
}

.nav-divider {
    height: 1px;
    background-color: #eee;
    margin: 15px 25px;
}

.nav-logout {
    margin-top: 10px;
    color: #dc3545;
}

.nav-logout:hover {
    background-color: #f8d7da;
    color: #dc3545;
    border-left-color: #dc3545;
}

/*
====================================
  Main Content & Top Bar
====================================
*/
.main-content {
    flex-grow: 1;
    padding: 0; 
    position: relative;
}

.top-bar {
    background-color: #fff;
    padding: 15px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    position: sticky;
    top: 0;
    /* Z-INDEX अपडेट किया गया: इसे साइडबार (1000) से ऊपर रखें */
    z-index: 1010; 
    height: 60px; 
}

.top-icons {
    display: flex;
    gap: 20px;
}

.top-icon {
    font-size: 1.2rem;
    color: #777;
    cursor: pointer;
    transition: color 0.2s;
}

.top-icon:hover {
    color: #007bff;
}

/* हैमबर्गर आइकन को डेस्कटॉप पर छिपाएँ */
.menu-toggle-icon {
    display: none; 
}

/*
====================================
  Dashboard Body & Greetings
====================================
*/
.dashboard-body {
    padding: 25px;
}

.greeting-section {
    margin-bottom: 30px;
}

.greeting-text {
    font-size: 1rem;
    color: #777;
    margin-bottom: 5px;
}

.ambition-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #007bff;
}

/*
====================================
  Modules Grid & Cards
====================================
*/
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.module-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 150px;
    
    /* 🛠️ ADDED/UPDATED: लिंक के डिफ़ॉल्ट स्टाइल को हटाना */
    text-decoration: none; 
    color: inherit; 
}

.module-card:hover,
.module-card:focus {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    
    /* 🛠️ ADDED/UPDATED: Hover पर रंग/अंडरलाइन परिवर्तन को रोकना */
    text-decoration: none; 
    color: inherit; 
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.card-text {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Card Colors */
.card-1 { border-bottom: 4px solid #ffc107; }
.card-1 .card-icon { color: #ffc107; }

.card-2 { border-bottom: 4px solid #dc3545; }
.card-2 .card-icon { color: #dc3545; }

.card-3 { border-bottom: 4px solid #17a2b8; }
.card-3 .card-icon { color: #17a2b8; }

.card-4 { border-bottom: 4px solid #28a745; }
.card-4 .card-icon { color: #28a745; }

.card-5 { border-bottom: 4px solid #6f42c1; }
.card-5 .card-icon { color: #6f42c1; }

.card-6 { border-bottom: 4px solid #fd7e14; }
.card-6 .card-icon { color: #fd7e14; }


/*
====================================
  📱 Media Queries (Mobile Responsiveness) 📱
====================================
*/
@media (max-width: 768px) {
    
    .dashboard-layout {
        display: block; 
    }
    
    .top-bar {
        justify-content: space-between; 
        padding: 10px 15px;
    }

    .menu-toggle-icon {
        display: block; 
        font-size: 1.5rem;
        color: #555;
        cursor: pointer;
        order: -1; 
        /* Z-INDEX अपडेट किया गया: यह साइडबार (1000) और टॉप बार (1010) दोनों से ऊपर है */
        z-index: 1020; 
        position: relative; 
    }

    /* साइडबार को मोबाइल पर छिपाएँ */
    .sidebar {
        position: fixed; 
        top: 0;
        left: 0;
        height: 100%;
        width: 250px; 
        z-index: 1000; /* साइडबार को एक निश्चित z-index दें */
        transform: translateX(-100%); 
        transition: transform 0.3s ease-in-out; 
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    /* JavaScript से 'active' क्लास मिलने पर साइडबार दिखाएँ */
    .sidebar.active {
        transform: translateX(0); 
    }
    
    /* मुख्य सामग्री की पैडिंग कम करें */
    .dashboard-body {
        padding: 15px;
    }

    .ambition-title {
        font-size: 1.8rem;
    }
}

/* छोटे मोबाइल स्क्रीन के लिए कार्ड ग्रिड को एक कॉलम में बदलें */
@media (max-width: 480px) {
    .modules-grid {
        grid-template-columns: 1fr; 
    }
}

/*
====================================
  Live Classes Page Styles (New)
====================================
*/

/* पेज का मुख्य शीर्षक */
.page-main-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #3f51b5; /* एक नया रंग जो शीर्षकों के लिए विशिष्ट हो */
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* कोर्स कार्ड्स ग्रिड */
.course-grid {
    display: grid;
    /* कॉलम सेटअप: 250px की न्यूनतम चौड़ाई के साथ */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 25px;
    
    /* 1. हॉरिजॉन्टल सेंटरिंग के लिए (जब आइटम पूरे ग्रिड को नहीं भरते) */
    justify-content: center; 
    
    /* 2. यह सुनिश्चित करता है कि आइटम ग्रिड एरिया में सही ढंग से संरेखित हों */
    align-items: center; 

    /* 3. ऑटो-प्लेसमेंट को नियंत्रित करता है */
    grid-auto-flow: row dense;
}

/* व्यक्तिगत कोर्स कार्ड */
.course-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s;

    /* चौड़ाई कम करने के लिए */
    max-width: 400px; /* कार्ड की अधिकतम चौड़ाई 400px तक सीमित करें */
    width: 100%; 
    
    /* Center Fix के लिए: ग्रिड आइटम पर margin: auto का उपयोग करना */
    margin: 0 auto; 
    
    /* डिफ़ॉल्ट लिंक स्टाइलिंग हटाना सुनिश्चित करें (यह <a> टैग है) */
    text-decoration: none; 
    color: inherit;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.course-image {
    width: 100%;
    /* ऊँचाई कम करने के लिए */
    max-height: 180px; 
    object-fit: cover; 
    display: block;
}

.course-info {
    /* पैडिंग कम करें */
    padding: 10px; 
}

.course-title {
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    display: block;
    min-height: 40px; 
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.price-tag {
    font-size: 1.1rem;
    font-weight: 700;
    color: #007bff;
}

.purchase-btn {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    border: none;
}

/* 'खरीदें' बटन (आउटलाइन स्टाइल) */
.btn-outline {
    background-color: transparent;
    border: 2px solid #ff9800;
    color: #ff9800;
}
.btn-outline:hover {
    background-color: #ff9800;
    color: #fff;
}

/* 'Purchased' बटन (भरा हुआ स्टाइल) */
.btn-purchased {
    background-color: #28a745;
    color: #fff;
    pointer-events: none; /* क्लिक करने योग्य नहीं */
}
.btn-purchased i {
    margin-right: 5px;
}

/*
====================================
  Classroom/Previous Classes List Styles 
  (New addition for your HTML)
====================================
*/

.classroom-section {
    margin-bottom: 30px;
}

.section-header {
    font-size: 1.2rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.live-btn {
    background-color: #dc3545; /* लाल रंग लाइव के लिए */
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
    transition: background-color 0.2s;
}

.live-btn i {
    margin-right: 10px;
    animation: pulse 1.5s infinite; /* लाइव इफ़ेक्ट */
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.class-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.class-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #007bff;
}

.class-icon {
    font-size: 2rem;
    color: #007bff;
    margin-right: 15px;
    flex-shrink: 0;
}

.class-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.class-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.class-subtitle {
    font-size: 0.85rem;
    color: #777;
    margin-top: 2px;
}

.class-time {
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
}

.play-btn {
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.play-btn:hover {
    background-color: #218838;
}

.play-btn i {
    margin-right: 5px;
}

/* वर्तमान लाइव क्लास के लिए विशिष्ट स्टाइलिंग */
.current-live {
    border: 2px solid #dc3545;
    background-color: #fff5f5; /* हल्का लाल बैकग्राउंड */
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.2);
}

.section-divider {
    height: 1px;
    background-color: #ddd;
    margin: 40px 0;
}

/*
====================================
  Classroom Page Styles (Video & Chat)
====================================
*/

.video-chat-container {
    display: flex;
    flex-grow: 1;
    /* डेस्कटॉप पर, flex-basis: 70% और 30% रहेगा */
}

/* Video Section */
.video-section {
    flex-grow: 1;
    flex-basis: 70%; 
    min-width: 0;
    position: relative;
    background-color: #111;
    height: 100%; 
}

/* Chat Section (Desktop Default) */
.chat-section {
    flex-basis: 30%; /* डेस्कटॉप पर 30% चौड़ाई */
    min-width: 300px;
    border-left: 1px solid #333; /* डार्क बॉर्डर */
    background-color: #2c2c2c; /* चैट पैनल के लिए डार्क बैकग्राउंड */
    display: flex;
    flex-direction: column;
    color: #f0f0f0; /* टेक्स्ट का रंग हल्का */
}

/* Mobile View: Video के नीचे चैट (Previous media query fix) */
@media (max-width: 768px) {
    .video-chat-container {
        flex-direction: column; /* मोबाइल पर स्टैकिंग */
        display: block; /* पूरी चौड़ाई उपयोग करने के लिए */
    }
    
    .video-section {
        flex-basis: auto;
        padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
        height: 0; /* padding-bottom के साथ काम करने के लिए height: 0 */
    }
    
    .chat-section {
        /* मोबाइल पर पूरी चौड़ाई */
        flex-basis: auto;
        min-width: unset;
        width: 100%;
        height: 400px; /* मोबाइल पर चैट की निश्चित ऊँचाई (या आप auto भी रख सकते हैं) */
        border-left: none;
        border-top: 1px solid #333;
    }
}
/* सबसे पहले, टॉप-बार को फ्लेक्स कंटेनर बनाएं */
.top-bar {
    display: flex; /* इसे एक फ्लेक्स कंटेनर बनाता है */
    align-items: center; /* ऊर्ध्वाधर (vertical) संरेखण के लिए */
    justify-content: space-between; /* तत्वों को किनारों तक फैलाता है */
    padding: 10px 20px; /* थोड़ा स्पेस जोड़ें */
}

/* top-left div में आइकन है, यह खुद-ब-खुद बाईं ओर होगा */
.top-left {
    /* कोई अतिरिक्त CSS की आवश्यकता नहीं है, क्योंकि flex इसे बाईं ओर रखता है */
}

.menu-toggle-icon {
    font-size: 24px; /* आइकन का आकार */
    cursor: pointer;
}

/* मुख्य कंटेनर और शीर्षलेख */
.test-series-container {
    padding: 20px 50px; /* अपनी आवश्यकतानुसार पैडिंग समायोजित करें */
    background-color: #f7f9fc; /* पृष्ठभूमि रंग (हल्का नीला जैसा) */
}

.test-series-container h2 {
    color: #1a237e; /* गहरा नीला रंग */
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
}

/* ग्रिड लेआउट - कार्डों को पंक्तियों और स्तंभों में व्यवस्थित करने के लिए */
.test-series-grid {
    display: grid;
    /* तीन समान स्तंभ (Columns) बनाता है */
    grid-template-columns: repeat(3, 1fr); 
    gap: 25px; /* कार्डों के बीच की जगह */
}

/* टेस्ट सीरीज़ कार्ड की स्टाइलिंग */
.test-series-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* हल्का बॉक्स शैडो */
    overflow: hidden; /* सुनिश्चित करता है कि छवि कोने में फिट हो */
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex; /* छवि और विवरण को अगल-बगल रखने के लिए */
    min-height: 140px; /* कार्ड की न्यूनतम ऊँचाई */
}

.test-series-card:hover {
    transform: translateY(-5px); /* माउस ओवर पर हल्का ऊपर उठाव */
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12); /* माउस ओवर पर गहरा शैडो */
}

/* कार्ड की छवि वाला भाग */
.card-image {
    flex: 0 0 100px; /* छवि के लिए निश्चित चौड़ाई */
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
   margin-left: 20px;

}

.card-image img {
    width: 100%;
    height: auto;
    object-fit: cover; /* छवि को फिट करने के लिए */
}

/* कार्ड विवरण (नाम और कीमत) */
.card-details {
    flex-grow: 1; /* बची हुई जगह का उपयोग करें */
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* शीर्षक और कीमत को ऊपर और नीचे रखने के लिए */
    text-decoration: none; 
    color: inherit; 
}

.card-details .title {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 600;
}

.card-details .price {
    font-size: 18px;
    color: #d32f2f; /* लाल रंग कीमत के लिए */
    font-weight: 700;
    text-align: right;
    margin-top: auto; /* कीमत को नीचे धकेलने के लिए */
}

/* मुफ्त (Free) टेस्ट सीरीज़ के लिए स्टाइल */
.card-details .price.free {
    color: #4CAF50; /* हरा रंग '0' के लिए */
}

/* 📱 रिस्पॉन्सिव डिज़ाइन: छोटे स्क्रीन (जैसे टैबलेट) के लिए */
@media (max-width: 1024px) {
    .test-series-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 स्तंभ */
    }
}

/* 📱 रिस्पॉन्सिव डिज़ाइन: बहुत छोटे स्क्रीन (जैसे मोबाइल) के लिए */
@media (max-width: 600px) {
    .test-series-container {
        padding: 15px;
    }
    .test-series-grid {
        grid-template-columns: 1fr; /* 1 स्तंभ */
    }
    .test-series-card {
        flex-direction: row; /* मोबाइल पर भी अगल-बगल रखें */
    }
}

/* सामान्य पेज स्टाइलिंग */
.test-details-page {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    padding: 0 100px; /* मुख्य सामग्री को केंद्रित करने के लिए पैडिंग */
}

/* 1. शीर्षलेख / खरीद अनुभाग CSS */
.purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee; /* टेस्ट लिस्ट से अलग करने के लिए */
}

.series-info {
    display: flex;
    align-items: center;
}

.series-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    margin-right: 15px;
    object-fit: cover;
}

.text-content {
    display: flex;
    flex-direction: column;
}

.series-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.series-price {
    font-size: 22px;
    font-weight: 700;
    color: #d32f2f; /* लाल रंग */
    margin: 5px 0 0 0;
}

.buy-now-btn {
    background-color: #a83633; /* गहरा लाल/भूरा रंग */
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.buy-now-btn:hover {
    background-color: #8c2a27;
}

/* 2. टेस्ट सूची अनुभाग CSS */
.tests-list-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.test-count {
    font-size: 16px;
    color: #777;
    margin-bottom: 25px;
}

/* व्यक्तिगत टेस्ट आइटम स्टाइलिंग */
.test-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #eee;
    cursor: pointer;
}

.test-list-container .test-item:last-child {
    border-bottom: 1px solid #eee; /* अंतिम आइटम के नीचे बॉर्डर */
}

.item-details {
    flex-grow: 1;
    margin-right: 20px;
}

.item-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0 0 5px 0;
}

.item-meta {
    font-size: 13px;
    color: #999;
    margin: 0;
}

.status.closed {
    color: #a83633; /* टेस्ट बंद होने का रंग */
    font-weight: 600;
    font-size: 12px;
    border: 1px solid #a83633;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 10px;
}

/* आइकॉन / एक्शन सेक्शन */
.item-action i {
    font-size: 20px;
    /* आइकनों को बेहतर दिखाने के लिए एक बटन जैसा स्टाइल दें */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
}

/* लॉक (बंद) आइकॉन */
.test-item.locked .lock-icon {
    color: #555;
    /* लॉक आइकॉन के लिए हल्का नीला/ग्रे पृष्ठभूमि */
    background-color: #f7f9fc; 
}

/* ग्रीन टिक (खुला/खरीदा गया) आइकॉन */
.test-item.purchased .unlock-icon {
    color: #4CAF50; /* हरा रंग */
    background-color: #e8f5e9; /* हल्का हरा पृष्ठभूमि */
}

/* 📱 रिस्पॉन्सिव स्टाइलिंग */
@media (max-width: 768px) {
    .test-details-page {
        padding: 0 20px;
    }
    .purchase-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .buy-now-btn {
        margin-top: 15px;
        width: 100%; /* मोबाइल पर फुल-चौड़ाई बटन */
    }
}