/* --- COLOR PALETTE ---
Primary Base: #1A3E38 (Dark Emerald/Teal) - Unique!
Accent Color: #FF8C42 (Bold Orange/Gold) - High Contrast!
Secondary Dark: #2c3e50 (Dark Blue/Gray)
Light Background: #f7f9fa 
*/

/* --- GLOBAL RESETS AND TYPOGRAPHY --- */
body {
    font-family: 'Poppins', sans-serif; 
    margin: 0;
    padding: 0;
    background-color: #f7f9fa;
    color: #333;
    line-height: 1.6;
    font-size: 16px; 
    
    /* CRITICAL FIX: Padding to clear the single fixed header (~60px) */
    padding-top: 65px; 
}
h1, h2, h3, h4, p, ul, ol {
    margin: 0;
    padding: 0;
}
.container {
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 15px; 
}
header .container { padding: 12px 15px; } 

/* --- HEADER & MAIN NAVIGATION (FIXED POSITION) --- */
header {
    background-color: #fff;
    border-bottom: 3px solid #f0f0f0; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); 
    
    /* Ensures header is fixed to the top and stays above all content */
    position: fixed; 
    top: 0; 
    left: 0;
    width: 100%; 
    z-index: 9999; 
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #1A3E38; 
    font-size: 1.8em; 
    font-weight: 900; 
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

header nav {
    display: flex;
    align-items: center;
    gap: 25px; 
}

/* Default navigation links */
header nav a {
    color: #555;
    text-decoration: none;
    padding: 8px 12px;
    font-weight: 500;
    font-size: 1em;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
}
header nav a:hover {
    color: #FF8C42; 
    background-color: #f7f9fa;
}

/* Styling for Login/Register buttons within the main nav */

.btn-login-nav {
    color: #1c1d1f;
    border: 1px solid #ccc;
    font-weight: 600;
    padding: 8px 15px; 
}
.btn-login-nav:hover {
    background-color: #1A3E38; 
    color: white;
    border-color: #1A3E38; 
}

.btn-register-nav-main {
    background-color: #FF8C42; 
    color: white !important;
    border: 1px solid #FF8C42;
    padding: 8px 15px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.4); 
}
.btn-register-nav-main:hover {
    background-color: #e07530;
    border-color: #e07530;
}


/* --- 1. UNIQUE HERO CAROUSEL SECTION STYLING --- */
.hero-carousel-section {
    background-color: #1A3E38; 
    color: white;
    padding: 0; 
    position: relative;
    overflow: hidden;
    height: 600px; 
    z-index: 10; 
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    padding: 160px 0; 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; 
    transition: opacity 1s ease-in-out; 
}

.hero-slide.active {
    opacity: 1; 
    z-index: 10;
}

.hero-content {
    max-width: 600px; 
}

.hero-slide h2 {
    font-size: 3.6em; 
    margin-bottom: 20px;
    font-weight: 900; 
    line-height: 1.1;
    letter-spacing: -1.8px; 
}

.hero-slide p {
    font-size: 1.3em; 
    margin-bottom: 40px; 
    font-weight: 300; 
    line-height: 1.5;
    color: #c9e0d8; 
}

.hero-actions {
    display: flex;
    gap: 20px;
    align-items: center; 
}

/* Primary Button (Start Exploring) */
.btn-primary {
    padding: 18px 35px;
    font-size: 1.1em;
    background-color: #FF8C42; 
    border: 2px solid #FF8C42;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none; /* Added for consistency */
    border-radius: 4px; /* Added for consistency */
    color: white; /* Added for consistency */
}
.btn-primary:hover {
    background-color: #e07530;
    border-color: #e07530;
}

/* Secondary Button (Become an Instructor) */
.btn-secondary {
    padding: 16px 25px; 
    font-weight: 700;
    font-size: 1em;
    color: white;
    border: 2px solid #5a7d77; 
    background-color: transparent;
    text-decoration: none; /* Added for consistency */
    border-radius: 4px; /* Added for consistency */
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1); 
    border-color: #fff;
}


/* Carousel Dots Styling */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 20;
}
.dot {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: #5a7d77; 
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.6s ease;
}
.dot.active {
    background-color: #FF8C42; 
}


/* --- 2. VALUE PROPOSITION/FEATURES SECTION --- */
.features-section {
    padding: 80px 0; 
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.features-section h3 {
    font-size: 2.2em;
    margin-bottom: 60px;
    font-weight: 700;
    color: #1A3E38; 
}

.feature-grid {
    display: flex;
    gap: 40px;
    justify-content: center;
    padding: 0 40px;
}

.feature-card {
    max-width: 30%;
    padding: 25px;
    text-align: center;
    border-radius: 8px;
    transition: background-color 0.3s;
}
.feature-card:hover {
    background-color: #f0f0f0; 
}

.feature-card .icon {
    font-size: 3.5em;
    margin-bottom: 15px;
    color: #FF8C42; 
}

.feature-card h4 {
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 700;
    color: #1A3E38;
}

/* --- 3. COURSE CATALOG SECTION --- */
main {
    padding: 80px 0;
    background-color: #f7f9fa; 
}

.section-title {
    font-size: 2.2em;
    margin-bottom: 40px;
    font-weight: 700;
    color: #1c1d1f;
    text-align: left;
    border-left: 4px solid #FF8C42; 
    padding-left: 15px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.course-card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: white;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card-image {
    height: 140px;
    background-color: #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9em;
}

.card-body {
    padding: 15px;
}

.course-title {
    font-size: 1.1em;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 5px;
    color: #1A3E38;
}

.instructor {
    font-size: 0.85em;
    font-weight: 400;
    color: #6a6f73;
    margin-bottom: 10px;
}

.description {
    display: none; 
}

.btn-view {
    display: block;
    background-color: #2c3e50; 
    color: white;
    padding: 10px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    text-align: center; /* Added for consistency */
}
.btn-view:hover {
    background-color: #1A3E38;
}

.no-courses {
    text-align: center;
    padding: 50px;
    color: #6a6f73;
    border: 1px dashed #ccc;
    border-radius: 5px;
    margin: 50px auto;
    max-width: 600px;
}

/* --- 4. REGISTRATION SECTION STYLING (Call to Action) --- */
.register-section {
    padding: 80px 0;
    background-color: #fff; 
    border-top: 1px solid #eee;
}

.registration-form-box {
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    border: 1px solid #ddd;
    text-align: center;
}
.registration-form-box h3 {
    color: #1A3E38;
}

.btn-register {
    display: inline-block; 
    text-decoration: none;
    background-color: #FF8C42; 
    color: white;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 1.2em;
    font-weight: 700;
    border: none;
}
.btn-register:hover {
    background-color: #e07530;
}


/* --- FOOTER STYLING --- */
footer {
    padding: 30px 0;
    background-color: #2c3e50; 
    color: #ccc;
    font-size: 0.9em;
    text-align: center;
}

/* --- REGISTRATION ROLE SELECTION MODAL --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7); 
    padding-top: 50px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; 
    padding: 30px;
    border: none;
    border-radius: 8px;
    width: 80%; 
    max-width: 700px;
    position: relative;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h2 {
    color: #1A3E38;
    margin-bottom: 5px;
    font-weight: 700;
}

.modal-content p {
    color: #555;
    margin-bottom: 30px;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-btn:hover,
.close-btn:focus {
    color: #1A3E38;
    text-decoration: none;
    cursor: pointer;
}

.role-options {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.role-card {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 30px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    flex: 1;
    transition: all 0.3s;
    background: #fff;
    text-align: center;
}

.role-card:hover {
    border-color: #FF8C42; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.role-card .icon {
    font-size: 3em;
    color: #1A3E38;
    display: block;
    margin-bottom: 15px;
}

.role-card h3 {
    font-size: 1.4em;
    font-weight: 700;
    color: #1A3E38;
    margin-bottom: 5px;
}

.role-card p {
    font-size: 0.9em;
    color: #6a6f73;
    margin: 0;
}


/* --- FORM PAGE SPECIFIC STYLES (Login/Register Pages) --- */
.form-page {
    /* Padding-top is handled by the body global style */
}

.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 40px; /* Reduced to look better with the fixed header */
    padding-bottom: 80px;
    min-height: calc(100vh - 65px); /* Ensure form is centered with the fixed header */
}

.form-box {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.form-box h2 {
    color: #1A3E38;
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; 
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #FF8C42; 
    outline: none;
}

.btn-full-width {
    width: 100%;
    margin-top: 10px;
}

.form-footer-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95em;
}

.form-footer-link a {
    color: #FF8C42;
    text-decoration: none;
    font-weight: 600;
}

/* Success and Error Messages */
.message-box {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 600;
}

.success {
    background-color: #e6f7e6; 
    color: #28a745; 
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da; 
    color: #dc3545; 
    border: 1px solid #f5c6cb;
}