/* /lp/anxiety/assets/css/styles.css */

/* --- CSS Variables for Theme Colors --- */
:root {
    --primary-color: #3b82f6; /* Light Blue - for buttons, links, accents */
    --secondary-color: #94a3b8; /* Lighter grey for subtle elements */
    --success-color: #22c55e; /* Green for success messages */
    --danger-color: #ef4444; /* Red for error messages */
    --warning-color: #f59e0b; /* Orange/Yellow for warnings */
    --info-color: #0ea5e9; /* Cyan/Info blue */

    --dark-background: #1a202c; /* Very Dark Blue - main background */
    --card-background: #2d3748; /* Slightly lighter dark blue for cards/containers */
    --text-color-light: #e2e8f0; /* Light text on dark background */
    --text-color-primary: #ffffff; /* Pure white for headings/important text */
    --border-color-dark: #4a5568; /* Darker border for elements */
    --shadow-color-dark: rgba(0, 0, 0, 0.4); /* Darker shadows */

    --font-inter: 'Inter', sans-serif; /* Define Inter font family */

    /* New variables for CTA gradient */
    --gradient-blue-start: #3b82f6; /* Starting blue for CTA gradient */
    --gradient-blue-end: #0a56e0;   /* Ending blue for CTA gradient (slightly darker) */

    /* Course Player Mobile Sidebar Specific */
    --sidebar-width-mobile: 280px;
}

/* --- Global Box Sizing & Font Import --- */
*, *::before, *::after {
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Base Body & HTML Styles --- */
html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-inter);
    background-color: var(--dark-background);
    color: var(--text-color-light);
    line-height: 1.6;
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
    height: 100%; /* Important for mobile off-canvas sidebar */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color-primary);
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-color-primary);
}

/* --- Containers & Cards --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%; /* Fluid width */
}

.card {
    background-color: var(--card-background);
    border-radius: 12px; /* Rounded corners */
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 8px var(--shadow-color-dark);
    border: 1px solid var(--border-color-dark);
}

/* --- Form Elements --- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color-dark);
    border-radius: 8px; /* Rounded corners */
    background-color: var(--dark-background);
    color: var(--text-color-light);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); /* Primary color glow */
}

/* --- Buttons --- */
button, .button {
    display: inline-flex; /* Use flex for centering content */
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 8px; /* Rounded corners */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-align: center;
    color: var(--text-color-primary);
    background-color: var(--primary-color);
    box-shadow: 0 2px 5px var(--shadow-color-dark);
}

button:hover, .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow-color-dark);
    filter: brightness(1.1); /* Slightly brighter on hover */
}

button:active, .button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px var(--shadow-color-dark) inset;
}

/* Specific button colors */
.btn-primary {
    background-color: var(--primary-color);
}
.btn-success {
    background-color: var(--success-color);
}
.btn-danger {
    background-color: var(--danger-color);
}
.btn-secondary {
    background-color: var(--secondary-color);
}

/* --- Messages (Success, Error, Info) --- */
.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}
.message.success {
    background-color: rgba(34, 197, 94, 0.2); /* Green with transparency */
    color: var(--success-color);
    border: 1px solid var(--success-color);
}
.message.error {
    background-color: rgba(239, 68, 68, 0.2); /* Red with transparency */
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}
.message.info {
    background-color: rgba(14, 165, 233, 0.2); /* Cyan with transparency */
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px var(--shadow-color-dark);
    max-width: 90%;
    width: 500px;
    position: relative;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close-button:hover {
    color: var(--text-color-primary);
}

.modal-title {
    text-align: center;
    color: var(--text-color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* --- Video Player Styles --- */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px; /* Max width for video to prevent it from being too large */
    margin: 2rem auto;
    background-color: #000; /* Black background for video area */
    border-radius: 12px;
    overflow: hidden; /* Ensure video corners are rounded */
    box-shadow: 0 4px 10px var(--shadow-color-dark);
}

.video-player {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px; /* Ensure video itself has rounded corners */
}

/* Fallback message for HLS.js */
.video-fallback {
    color: var(--danger-color);
    text-align: center;
    padding: 1rem;
}

/* --- CTA Button Specific Styles (lp.php) --- */
#ctaButton {
    display: none; /* Initially hidden */
    position: relative; /* For gradient background-position animation */
    margin: 1.5rem auto; /* Centered below video */
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    border-radius: 50px; /* Pill shape */
    background-image: linear-gradient(to right, var(--gradient-blue-start), var(--gradient-blue-end));
    background-size: 200% 100%; /* For gradient animation */
    animation: zoomInOut 2s infinite alternate, gradientMove 4s linear infinite;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3); /* Subtle text shadow */
    box-shadow: 0 4px 15px rgba(0,0,0,0.6); /* Deeper shadow for prominence */
}

#ctaButton.show {
    display: flex; /* Use flex to keep content centered */
}

/* CTA Button Animations */
@keyframes zoomInOut {
    0% { transform: scale(1); }
    100% { transform: scale(1.02); }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}


/* --- Course Player Specific Styles (course_player.php) --- */

.course-header {
    background-color: var(--card-background);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 1rem; /* Space between items */
    border-bottom: 1px solid var(--border-color-dark);
    box-shadow: 0 2px 5px var(--shadow-color-dark);
}

.course-header .site-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color-primary);
    flex-grow: 1; /* Allows title to take available space */
    text-align: center; /* Center title on mobile initially */
}

.course-header .user-info {
    font-size: 0.95rem;
    color: var(--secondary-color);
    white-space: nowrap; /* Prevent wrapping of user email */
}

.course-header .header-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.course-layout {
    display: flex;
    min-height: calc(100vh - 70px); /* Adjust based on header height */
    overflow: hidden; /* Crucial for sidebar behavior */
}

.course-sidebar {
    width: 300px; /* Fixed width for desktop */
    flex-shrink: 0;
    background-color: var(--card-background);
    padding: 1.5rem;
    border-right: 1px solid var(--border-color-dark);
    box-shadow: 2px 0 5px var(--shadow-color-dark);
    position: sticky; /* Keep sidebar in view */
    top: 0; /* Align to the top of the viewport */
    height: 100vh; /* Make it take full viewport height */
    overflow-y: auto; /* Enable scrolling for video list */
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease; /* For mobile off-canvas */
    z-index: 999; /* Below modal overlay, above main content */
}

.course-sidebar h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-color-primary);
    font-size: 1.5rem;
    text-align: center;
}

.video-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.video-list-item {
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.video-list-item a {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: var(--text-color-light);
    background-color: rgba(0,0,0,0.1); /* Subtle background for list items */
    border: 1px solid var(--border-color-dark);
    border-radius: 8px;
    position: relative;
}

.video-list-item a:hover {
    background-color: rgba(0,0,0,0.2);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px var(--shadow-color-dark);
}

.video-list-item.active a {
    background-color: var(--primary-color); /* Highlight active video */
    color: var(--text-color-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    border-color: var(--primary-color);
}

.video-list-item .video-title {
    flex-grow: 1;
    margin-right: 0.5rem;
}

.video-list-item .video-progress {
    font-size: 0.85rem;
    color: var(--secondary-color);
    white-space: nowrap;
}

.video-list-item.active .video-progress {
    color: var(--text-color-primary); /* Progress text is white on active */
}

.video-list-item .completed-icon {
    margin-left: 0.5rem;
    color: var(--success-color);
    font-size: 1.2rem;
}

.course-content {
    flex-grow: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center video and content */
}

.course-video-section {
    width: 100%;
    max-width: 900px; /* Adjust max width for course videos */
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--shadow-color-dark);
    margin-bottom: 1.5rem;
}

.course-video-title {
    font-size: 2rem;
    color: var(--text-color-primary);
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.course-video-description {
    font-size: 1rem;
    color: var(--text-color-light);
    text-align: center;
    margin-bottom: 2rem;
    max-width: 700px;
}

.menu-toggle-button {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color-primary);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.sidebar-overlay {
    display: none; /* Hidden on desktop */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 998; /* Below sidebar, above main content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}


/* --- Responsive Design (Mobile-First approach) --- */

/* Mobile-specific styles for Course Player */
@media (max-width: 991px) {
    .course-layout {
        flex-direction: column; /* Stack video and content on mobile */
    }

    .course-sidebar {
        position: fixed; /* Fixed position for off-canvas */
        top: 0;
        left: 0;
        height: 100%;
        width: var(--sidebar-width-mobile); /* Defined width */
        transform: translateX(-100%); /* Start off-canvas to the left */
        opacity: 0;
        visibility: hidden;
        box-shadow: none; /* Remove shadow when hidden */
        /* transition property is already defined above */
    }

    .course-sidebar.open {
        transform: translateX(0); /* Slide into view */
        opacity: 1;
        visibility: visible;
        box-shadow: 2px 0 10px var(--shadow-color-dark); /* Add shadow when open */
    }

    .menu-toggle-button {
        display: block; /* Show menu button on mobile */
    }

    .course-header {
        flex-direction: column; /* Stack header elements */
        align-items: flex-start; /* Align items to the start */
        padding: 1rem;
        gap: 0.5rem; /* Reduce gap */
    }

    .course-header .site-title {
        text-align: left; /* Align title left on mobile */
        width: 100%; /* Take full width */
        font-size: 1.2rem; /* Adjust font size */
    }

    .course-header .user-info {
        width: 100%; /* Take full width */
        font-size: 0.85rem;
    }

    .course-header .header-buttons {
        width: 100%; /* Buttons take full width */
        justify-content: stretch; /* Stretch buttons */
        flex-direction: column; /* Stack buttons */
    }

    .course-header .header-buttons button {
        width: 100%; /* Make buttons full width */
    }

    .course-content {
        padding: 1rem; /* Adjust padding for mobile */
    }

    .course-video-title {
        font-size: 1.5rem; /* Adjust font size for mobile */
    }

    .course-video-description {
        font-size: 0.9rem; /* Adjust font size for mobile */
    }
}

/* Adjustments for smaller mobile screens */
@media (max-width: 576px) {
    .modal-content {
        padding: 1.5rem;
    }
    .modal-title {
        font-size: 1.5rem;
    }
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"] {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    button, .button {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    #ctaButton {
        font-size: 1rem;
        padding: 1rem 2rem;
    }
    .video-list-item a {
        padding: 0.8rem;
    }
    .video-list-item .video-progress {
        font-size: 0.75rem;
    }
}

