/* --- Global Styles & Variables --- */
:root {
    --primary-color: #004AAD;
    --secondary-color: #FFC107;
    --light-gray: #F8F9FA;
    --dark-text: #212529;
    --light-text: #6c757d;
    --white: #ffffff;
    --border-color: #dee2e6;
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    color: var(--dark-text);
    background-color: var(--white);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }

/* --- Buttons --- */
.btn {
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}
.btn-primary:hover {
    background-color: #003a8c;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--dark-text);
}
.btn-secondary:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}

.btn-secondary-light {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-secondary-light:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* --- Header & Navigation --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--dark-text);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-auth {
    display: flex;
    gap: 15px;
}

/* --- Hero Section --- */
.hero {
    background-color: var(--light-gray);
    text-align: center;
    padding: 100px 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar input {
    flex-grow: 1;
    padding: 15px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px 0 0 5px;
    border-right: none;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.2);
}

.search-bar button {
    border-radius: 0 5px 5px 0;
}

/* --- Featured Courses & Course Card Styles --- */
.featured-courses, .categories {
    padding: 80px 0;
}

.course-grid, .all-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.course-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.course-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content .category {
    display: inline-block;
    align-self: flex-start;
    background-color: #e7f0ff;
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-content h3 {
    font-size: 1.15rem;
    margin: 10px 0;
    flex-grow: 1; /* Makes titles take available space to align elements below */
}

.card-content .instructor {
    font-size: 0.9rem;
    color: var(--light-text);
    margin: 5px 0;
}

.rating {
    margin: 10px 0;
    color: var(--secondary-color);
    font-weight: 600;
}

.price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    gap: 10px;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-text);
    line-height: 1;
}

.original-price {
    font-size: 1rem;
    color: var(--light-text);
    text-decoration: line-through;
    margin-left: 5px;
}

.purchase-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* --- Categories Section --- */
.categories { background-color: var(--light-gray); }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-item {
    background: var(--white);
    padding: 30px;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-item:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Instructor CTA --- */
.instructor-cta {
    background: linear-gradient(rgba(0, 74, 173, 0.9), rgba(0, 74, 173, 0.9)), url('https://placehold.co/1920x500/cccccc/cccccc') no-repeat center center/cover;
    padding: 80px 0;
    color: var(--white);
    text-align: center;
}
.instructor-cta .cta-content {
    max-width: 700px;
    margin: 0 auto;
}
.instructor-cta h2 { color: var(--white); }
.instructor-cta p { font-size: 1.1rem; margin-bottom: 30px; }

/* --- Footer --- */
footer {
    background-color: var(--dark-text);
    color: var(--light-gray);
    padding: 60px 0 20px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--light-gray); text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: var(--secondary-color); }
.footer-bottom {
    text-align: center;
    border-top: 1px solid #495057;
    padding-top: 20px;
    font-size: 0.9rem;
    color: var(--light-text);
}

/* --- Courses Page Specific --- */
.page-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.page-header h1 { font-size: 3rem; margin: 0; }
.page-header p { opacity: 0.9; margin: 10px 0 0 0; }

.courses-page-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    padding: 60px 20px;
}

.filters h3 { margin-top: 0; }
.filter-group { margin-bottom: 30px; }
.filter-group h4 { margin-bottom: 15px; border-bottom: 2px solid var(--border-color); padding-bottom: 10px;}
.filter-list { list-style: none; padding: 0; margin: 0; }
.filter-list li { margin-bottom: 10px; }
.filter-list label { margin-left: 8px; cursor: pointer; }

/* --- Authentication Page Styles --- */
.auth-page {
    background-color: var(--light-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    min-height: 80vh;
}
.auth-container {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}
.auth-container h2 { text-align: center; margin-top: 0; margin-bottom: 30px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: var(--font-family);
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn.full-width { width: 100%; padding: 15px; font-size: 1.1rem; }
.auth-switch { text-align: center; margin-top: 20px; }
.error-message { color: #dc3545; font-size: 0.9rem; min-height: 1.2em; margin-bottom: 15px; text-align: center; }
.form-success-message {
    color: #28a745;
    text-align: center;
    font-weight: 600;
    margin-top: 15px;
}

/* --- Purchase Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    margin: auto;
    padding: 30px 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
}

.modal-close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.modal-close-btn:hover,
.modal-close-btn:focus {
    color: var(--dark-text);
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.modal-contact-info { margin-top: 25px; }
.contact-line { font-size: 1.1rem; margin-bottom: 15px; }
.contact-line a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}
.contact-line a:hover { color: #25D366; }

.whatsapp-icon {
    width: 24px;
    height: 24px;
    background-color: #25D366;
    border-radius: 50%;
    padding: 4px;
    box-sizing: border-box;
}

/* --- Contact Page Specific --- */
.contact-page-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    padding-top: 80px;
    padding-bottom: 80px;
    align-items: flex-start;
}

.contact-info h3, .contact-form-container h3 {
    margin-top: 0;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--light-text);
    margin-bottom: 30px;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    margin-bottom: 25px;
}

.info-list li strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-text);
}

.info-list li span, .info-list li a {
    color: var(--light-text);
    font-size: 1rem;
    text-decoration: none;
}
.info-list li a:hover {
    color: var(--primary-color);
}

/* --- Mobile Navigation & Hamburger --- */
.hamburger { display: none; font-size: 2rem; background: none; border: none; cursor: pointer; color: var(--primary-color); }
.nav-links.active { display: flex; flex-direction: column; position: absolute; top: 75px; right: 0; background: var(--white); width: 100%; box-shadow: 0 4px 10px rgba(0,0,0,0.1); padding: 20px; gap: 20px; text-align: center; }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .nav-links { display: none; }
    .nav-auth { display: none; }
    .nav-links.active .nav-auth { display: flex; flex-direction: column; gap: 15px; align-items: center; }
    .hamburger { display: block; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .courses-page-layout { grid-template-columns: 1fr; }
    .contact-page-layout { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    h2 { font-size: 2rem; }
    .hero h1 { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
}
/* --- Dashboard Page Styles --- */
.dashboard-main {
    background-color: var(--light-gray);
    min-height: 80vh;
    padding: 40px 0;
}

.dashboard-main h1 {
    margin-bottom: 40px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    align-items: start;
}

/* Left Panel: Enrolled Courses */
.enrolled-courses-panel {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.enrolled-courses-panel h2 {
    font-size: 1.5rem;
    text-align: left;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

#enrolled-courses-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-summary-card {
    display: flex;
    gap: 15px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.course-summary-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 74, 173, 0.1);
}
.course-summary-card.active {
    border-color: var(--primary-color);
    background-color: #e7f0ff;
}

.course-summary-card img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.summary-content {
    width: 100%;
}
.summary-content h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}
.summary-content p {
    font-size: 0.8rem;
    color: var(--light-text);
    margin: 0;
}
.summary-content progress {
    width: 100%;
    margin-top: 8px;
}
.summary-content span {
    font-size: 0.8rem;
    color: var(--light-text);
}

/* Right Panel: Course Details */
#course-detail-view {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#course-detail-view .default-view {
    text-align: center;
    padding: 80px 20px;
    color: var(--light-text);
}

#course-detail-view h2 {
    text-align: left;
    margin: 0 0 20px 0;
    font-size: 2rem;
}

.progress-box, .resources-box, .curriculum-box {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.progress-box h4, .resources-box h4, .curriculum-box h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

#certificate-progress {
    width: 100%;
    margin-bottom: 10px;
}
#certificate-progress-text {
    font-weight: 600;
    margin-right: 20px;
}

#resources-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
#resources-list li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

.chapter {
    margin-bottom: 15px;
}
.chapter-header {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}
.lesson-item:last-child {
    border-bottom: none;
}
.lesson-item label {
    flex-grow: 1;
}

/* Certificate Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-overlay.hidden, .hidden { display: none !important; }

.certificate-preview {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    position: relative;
    max-width: 800px;
    width: 90%;
}
.modal-close-btn {
    position: absolute;
    top: 10px; right: 20px;
    font-size: 2rem;
    color: var(--light-text);
    cursor: pointer;
}

.cert-border {
    border: 10px solid var(--primary-color);
    padding: 40px;
    text-align: center;
    background: var(--white);
}

.cert-header .cert-logo {
    font-size: 1.5rem; font-weight: 700; color: var(--dark-text);
}
.cert-header .cert-logo span { color: var(--primary-color); }
.cert-header h1 { font-size: 2.5rem; color: var(--primary-color); margin: 10px 0; }

.cert-body p { font-size: 1.2rem; margin: 15px 0; }
.cert-body h2 { font-size: 2.2rem; margin: 10px 0; }
.cert-body h3 { font-size: 1.5rem; margin: 10px 0; font-weight: 600; }

.cert-footer {
    display: flex;
    justify-content: space-around;
    margin-top: 60px;
}
.cert-footer hr { border-top: 2px solid var(--dark-text); }
.cert-footer span { font-size: 0.9rem; color: var(--light-text); }

/* Responsive Dashboard */
@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}
/* --- Dashboard Page Styles --- */
.dashboard-main {
    background-color: var(--light-gray);
    min-height: 80vh;
    padding: 40px 0;
}

.dashboard-main h1 {
    margin-bottom: 40px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    align-items: start;
}

/* Left Panel: Enrolled Courses */
.enrolled-courses-panel {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.enrolled-courses-panel h2 {
    font-size: 1.5rem;
    text-align: left;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

#enrolled-courses-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-summary-card {
    display: flex;
    gap: 15px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.course-summary-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 74, 173, 0.1);
}
.course-summary-card.active {
    border-color: var(--primary-color);
    background-color: #e7f0ff;
}

.course-summary-card img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.summary-content {
    width: 100%;
}
.summary-content h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}
.summary-content p {
    font-size: 0.8rem;
    color: var(--light-text);
    margin: 0;
}
.summary-content progress {
    width: 100%;
    margin-top: 8px;
}
.summary-content span {
    font-size: 0.8rem;
    color: var(--light-text);
}

/* Right Panel: Course Details */
#course-detail-view {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#course-detail-view .default-view {
    text-align: center;
    padding: 80px 20px;
    color: var(--light-text);
}

#course-detail-view h2 {
    text-align: left;
    margin: 0 0 20px 0;
    font-size: 2rem;
}

.progress-box, .resources-box, .curriculum-box {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.progress-box h4, .resources-box h4, .curriculum-box h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

#certificate-progress {
    width: 100%;
    margin-bottom: 10px;
}
#certificate-progress-text {
    font-weight: 600;
    margin-right: 20px;
}

#resources-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
#resources-list li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

.chapter {
    margin-bottom: 15px;
}
.chapter-header {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}
.lesson-item:last-child {
    border-bottom: none;
}
.lesson-item label {
    flex-grow: 1;
}

/* Certificate Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-overlay.hidden, .hidden { display: none !important; }

.certificate-preview {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    position: relative;
    max-width: 800px;
    width: 90%;
}
.modal-close-btn {
    position: absolute;
    top: 10px; right: 20px;
    font-size: 2rem;
    color: var(--light-text);
    cursor: pointer;
}

.cert-border {
    border: 10px solid var(--primary-color);
    padding: 40px;
    text-align: center;
    background: var(--white);
}

.cert-header .cert-logo {
    font-size: 1.5rem; font-weight: 700; color: var(--dark-text);
}
.cert-header .cert-logo span { color: var(--primary-color); }
.cert-header h1 { font-size: 2.5rem; color: var(--primary-color); margin: 10px 0; }

.cert-body p { font-size: 1.2rem; margin: 15px 0; }
.cert-body h2 { font-size: 2.2rem; margin: 10px 0; }
.cert-body h3 { font-size: 1.5rem; margin: 10px 0; font-weight: 600; }

.cert-footer {
    display: flex;
    justify-content: space-around;
    margin-top: 60px;
}
.cert-footer hr { border-top: 2px solid var(--dark-text); }
.cert-footer span { font-size: 0.9rem; color: var(--light-text); }

/* Responsive Dashboard */
@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

.hero-section {
  position: relative;
  width: 100%;
  height: 100vh; /* Full screen height */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1; /* Push video to background */
}

.hero-content {
  z-index: 1;
  padding: 20px;
  max-width: 800px;
  margin: auto;
  background: rgba(0, 0, 0, 0.5); /* Optional: darken background for readability */
  border-radius: 10px;
}
