﻿/* Global Settings */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Import Aptos font */
@font-face {
    font-family: 'Aptos';
    src: url('fonts/Aptos-Regular.woff2') format('woff2'), url('fonts/Aptos-Regular.woff') format('woff'), url('fonts/Aptos-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Base Styles & Desktop */
body {
    font-family: 'Aptos', sans-serif;
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    
}

.container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* Header General */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

/* Prevent the left header from shrinking (Logo and LifeLaunch) */
.header-left {
    flex-shrink: 0;
}

/* Center Header container grows to fill space, and centers its contents */
.header-center {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

/* Left Header Logo and Title */
.logo-title {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    position: relative;
}

.logo {
    width: 80px;
    height: auto;
}

/* Center Header Navigation (Desktop) */
nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 15px;
}

    .nav-links li {
        display: inline-block;
    }

    .nav-links a {
        text-decoration: none;
        color: #333;
        font-weight: bold;
        font-size: 20px;
        padding: 10px;
        transition: color 0.3s ease-in-out;
    }

        .nav-links a:hover {
            color: #007bff;
            text-decoration: underline;
        }

/* Hamburger Menu (Desktop hidden) And design for when not hidden */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    background: none;
    border: none;
    padding: 10px;
}

/* Header-Right (Desktop): vertical stack */
.header-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Makes Hello [Username]! top right align center with logout Button */
.user-hello-logout-top-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-decoration: none;
}

/* Makes Hello [Username]! top right align center and underline on hover */
.user-hello-top-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-decoration: none;
}

    .user-hello-top-right:hover {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
        text-decoration: underline;
    }

/* Register and Login Button on the right centered and aligned */
.user-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-decoration: none;
}

/* Global Button Styling */
.btn-primary {
    color: #000;
    background-color: #5bffe8;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

    .btn-primary:hover {
        background-color: #37adab;
    }

/* Button Styling (Delete... functions) */
.btn-danger {
    background-color: #dc3545;
    border: 1px solid #dc3545;
    color: #fff;
    padding: 0.375rem 0.75rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

    .btn-danger:hover {
        background-color: #c82333;
        border-color: #bd2130;
        text-decoration: none;
    }

/* Global General Table Style */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    background: #fff;
}

    /* TABLE HEADERS */
    .table thead {
        background: #4a4a4a;
        color: white;
        text-align: left;
    }

        .table thead th {
            padding: 10px;
            font-weight: bold;
        }

    /* Alternating Row Colors below Header */
    .table tbody tr:nth-child(odd) {
        background: #ffffff; /* White */
    }

    .table tbody tr:nth-child(even) {
        background: #f2f2f2; /* Light Grey */
    }

    /* Row Hover Effect */
    .table tbody tr:hover {
        background: rgba(0, 123, 255, 0.1);
    }

    /* Table Cells below Header */
    .table td,
    .table th {
        padding: 8px;
        border-bottom: 1px solid #ddd;
    }

        /* Article Management Edit Details Delete Links */
        .table td a {
            color: #007bff;
            text-decoration: none;
            font-weight: 600;
            margin-right: 10px;
        }

            .table td a:hover {
                text-decoration: underline;
                color: #0056b3;
            }


/* ------------------------------------------------------------------- */
/* Pages */
/* ------------------------------------------------------------------- */


/* Home (Index) Page */
/* Centering the hero and latest article and latest video sections */
#hero, #latest-article {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 20px auto;
    max-width: 800px;
}

    #hero h2, #hero p, #latest-article h3, #latest-article a {
        margin: 10px 0;
    }

    #latest-article .article-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: inherit;
    }

    #latest-article .article-image {
        max-width: 100%;
        height: auto;
        border-radius: 5px;
    }

        /* Higher Border radius when hovering */
        #latest-article .article-image:hover {
            max-width: 100%;
            height: auto;
            border-radius: 20px;
        }

    #latest-article .article-title {
        margin-top: 10px;
        font-weight: bold;
        text-decoration: none;
        color: #333;
    }

        #latest-article .article-title:hover {
            text-decoration: underline;
        }

#latest-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
}

.latest-item {
    max-width: 300px;
    flex: 1 1 280px;
}

.latest-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.latest-title {
    font-size: 1.1rem;
    margin: 0.5rem 0 0;
}


/* Categories Page */
/* Center the page title */
.page-title-center {
    text-align: center;
    margin-bottom: 20px;
}

/* Center the filter section using flexbox */
.categories-filter-form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

    .categories-filter-form .form-group {
        margin-right: 20px;
    }

        .categories-filter-form .form-group label {
            margin-bottom: 0;
            margin-right: 5px;
        }

        /* Remove extra margin from the last element */
        .categories-filter-form .form-group:last-child {
            margin-right: 0;
        }


/* Grid Layout for Articles in Category */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

    /* Style for individual article cards within the grid */
    .category-grid .card {
        width: 100%;
        max-width: 500px;
        transition: transform 0.2s, box-shadow 0.2s;
    }

        .category-grid .card:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

/* Center and style the category header */
.category-header {
    text-align: center;
    margin-top: 40px;
}

/* allow badges to sit over the card image */
.category-grid .card {
    position: relative;
}

    /* base badge style */
    .category-grid .card .badge {
        position: absolute;
        top: 8px;
        left: 8px;
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        line-height: 1;
    }

    /* Article badge */
    .category-grid .card .badge-article {
        background-color: #17a2b8;
        color: #fff;
    }

    /* Video badge */
    .category-grid .card .badge-video {
        background-color: #ffc107;
        color: #212529;
    }


/* Community Page */
/* Container & Title */
.communitypage-container {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.communitypage-title {
    text-align: center;
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 2rem;
}

/* Two-column flex layout */
.communitypage-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Left column: form */
.communitypage-formcard {
    flex: 0 0 auto;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 1.5rem;
}

.communitypage-form-title {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.communitypage-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.communitypage-form-group {
    display: flex;
    flex-direction: column;
}

.communitypage-form-label {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.communitypage-form-input,
.communitypage-form-select,
.communitypage-form-textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}

/* Right column: categories + questions */
.communitypage-aside {
    flex: 1;
}

/* Category section */
.communitypage-category-section {
    margin-bottom: 2.5rem;
}

.communitypage-category-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Grid of cards */
.communitypage-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

/* Card styling */
.communitypage-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

    .communitypage-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.communitypage-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.communitypage-card-title {
    margin: 0;
    font-size: 1.1rem;
}

.communitypage-card-text {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #333;
}

.communitypage-card-meta {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}


/* Question Details Page */
.qd-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.qd-title {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.qd-meta {
    text-align: center;
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.qd-content {
    margin-bottom: 2rem;
}

    .qd-content p {
        text-align: left;
        line-height: 1.5;
    }

.qd-divider {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 2rem 0;
}

.qd-comments-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.qd-comments-list {
    margin-bottom: 3rem;
}

.qd-comment {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 0;
}

.qd-comment-meta {
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qd-comment-delete button {
    background-color: #dc3545;
    border: 1px solid #dc3545;
    color: #fff;
    padding: 0.375rem 0.75rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

    .qd-comment-delete button:hover {
        background-color: #c82333;
        border-color: #bd2130;
        text-decoration: none;
    }

.qd-add-comment {
    max-width: 600px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

    .qd-add-comment h4 {
        margin-bottom: 1rem;
        text-align: left;
    }

    .qd-add-comment form > div {
        margin-bottom: 1rem;
    }

    .qd-add-comment textarea {
        width: 100%;
        padding: 0.5rem;
        border: 1px solid #ced4da;
        border-radius: 0.25rem;
        resize: vertical;
    }

    .qd-add-comment span {
        color: #dc3545;
        font-size: 0.85rem;
    }

    .qd-add-comment button {
        color: #000;
        background-color: #5bffe8;
        border: none;
        padding: 10px 20px;
        border-radius: 5px;
        font-size: 16px;
        cursor: pointer;
        transition: background-color 0.3s ease;
        text-decoration: none;
    }

        .qd-add-comment button:hover {
            background-color: #37adab;
        }


/* User Profile Page */
/* Profile Page Container */
.user-profile-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-height: 100vh;
    gap: 20px;
    padding: 20px;
}

/* Profile Main Content */
.user-profile-main {
    flex: 1;
    max-width: 800px;
    text-align: center;
    background-color: #f5f5f5;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Welcome Section */
.user-profile-welcome {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Questions Section */
.user-profile-questions {
    background: #ffffff;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Individual Question */
.user-question {
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.user-discussion-thread {
    background: #fafafa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Comment Section */
.user-comment {
    margin-bottom: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-left: 3px solid #007bff;
}

.user-discussion-thread form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Account Management Access Sidebar */
.user-profile-sidebar {
    width: 270px;
    background-color: #343a40;
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
}

    .user-profile-sidebar h1 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .user-profile-sidebar .referral-label {
        display: block;
        margin: 1rem 0 0.5rem;
        font-weight: 500;
    }

    .user-profile-sidebar .referral-input {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.9rem;
        border: 1px solid #ccc;
        border-radius: 4px;
        background-color: #f5f5f5;
        color: #333;
    }

    .user-profile-sidebar a {
        color: #000;
        background-color: #5bffe8;
        text-decoration: none;
        border-radius: 4px;
        display: block;
        padding: 10px;
    }

        .user-profile-sidebar a:hover {
            background-color: #37adab;
            border-radius: 5px;
        }

    .user-profile-sidebar .copy-btn {
        display: block;
        width: 100%;
        margin-top: 0.75rem;
        padding: 0.5rem;
        font-size: 0.9rem;
        text-align: center;
        background-color: #5bffe8;
        color: #000;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }

        .user-profile-sidebar .copy-btn:hover {
            background-color: #37adab;
        }

    /* Container for referral count */
    .user-profile-sidebar .referral-count {
        display: flex;
        align-items: center;
        margin-top: 1rem;
        padding: 0.5rem;
        background-color: #f0f4f8;
        border: 1px solid #d1e3f0;
        border-radius: 6px;
    }

    /* Label style */
    .user-profile-sidebar .referral-count-label {
        font-weight: 600;
        margin-right: 0.5rem;
        color: #000;
    }

    /* Value style */
    .user-profile-sidebar .referral-count-value {
        display: inline-block;
        min-width: 2rem;
        text-align: center;
        font-size: 1rem;
        font-weight: 700;
        color: #000;
        background-color: #5bffe8;
        border-radius: 4px;
        padding: 0.2rem 0.5rem;
    }



/* Premium Page */
/* Subscription options Premium page */
.subscription-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    text-align: center;
}

.subscription-card {
    flex: 1;
    max-width: 300px;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    .subscription-card h3 {
        margin-top: 0;
    }

    .subscription-card .price {
        font-weight: bold;
        margin-bottom: 10px;
    }

    .subscription-card .description {
        margin-bottom: 15px;
        font-size: 14px;
        color: #666
    }


/* Community Page */
.community-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Question Card */
.question-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: #fff;
}

    .question-card h3 {
        margin: 0 0 0.25rem;
    }

    .question-card .meta {
        font-size: 0.875rem;
        color: #666;
    }

    .question-card .comments {
        margin-top: 1rem;
        padding-top: 0.5rem;
        border-top: 1px solid #eee;
    }

/* Comment Block */
.comment {
    margin-bottom: 0.75rem;
}

.comment-meta {
    font-size: 0.8rem;
    color: #555;
    margin: 0 0 0.25rem;
}

/* inline delete button */
.inline-form {
    display: inline;
}

/* comment form */
.comment-form textarea {
    width: 100%;
    resize: vertical;
}

/* question actions (delete question) */
.question-actions {
    margin-top: 0.5rem;
}

/* Post Question */
.post-question-card {
    border: 1px dashed #aaa;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 2rem;
    background: #fafafa;
}


/* Article Details Page (Generated for each article) */
.article-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.article-title {
    display: block;
    margin-top: 5px;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

    .article-title:hover {
        text-decoration: underline;
    }

/* Image sizing and alignment */
.article-details-page-image {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Article content (text) alignment to left */
article {
    text-align: left;
    font-size: 18px;
    line-height: 1.6;
}


/* Video Details Page (Generated for each video) */
.video-details-page-image h1 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.video-details-page-image p {
    margin-bottom: 1rem;
}

.video-image {
    display: block;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.video-details-page-image article {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.video-embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

    .video-embed-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }



/* PREMIUM USER PAGES */


/* Chat LifeLaunch AI Container */
.chat-container {
    min-width: 400px;
    height: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .chat-container .chat-messages {
        flex: 1;
        padding: 0.5rem;
        background: #f5f7fa;
        overflow-y: auto;
    }

    .chat-container .chat-input-area {
        display: flex;
        border-top: 1px solid #e0e0e0;
        padding: 0.5rem;
        background: #fff;
    }

    .chat-container .chat-input-field {
        flex: 1;
        border: none;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    /* Chat Bubble Styling */
    .chat-container .chat-message {
        display: flex;
        margin-bottom: 0.75rem;
    }

        .chat-container .chat-message.user {
            justify-content: flex-end;
        }

        .chat-container .chat-message.bot {
            justify-content: flex-start;
        }

    .chat-container .bubble {
        max-width: 80%;
        padding: 0.75rem 1rem;
        border-radius: 1rem;
        line-height: 1.4;
    }

    .chat-container .chat-message.user .bubble {
        background: #b7ffe8;
        border-bottom-right-radius: 0;
    }

    .chat-container .chat-message.bot .bubble {
        background: #FFF;
        border-bottom-left-radius: 0;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

/* Chat widget overrides */
#chatbot-widget {
    position: fixed;
    bottom: 0 !important;
    right: 20px;
    width: 400px;
    font-family: sans-serif;
    z-index: 1000;
}

#chat-header {
    background: #3effe1;
    color: #000;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

#chatbot-widget.collapsed .chat-container {
    height: auto;
}

#chatbot-widget.collapsed #chat-body {
    display: none;
}

#chat-body {
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    max-height: 400px;
    overflow: hidden;
}

#chatbot-widget #messages {
    padding: 0.5rem;
}


/* ADMIN USER PAGES */


/* Article Form Page (Add Article) */
.card-articleform {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Header */
.header-articleform {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* From Grid */
.form-articleform {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 1rem;
    row-gap: 1rem;
    align-items: center;
}

    .form-articleform .full-width {
        grid-column: 1 / -1;
    }

/* Label */
.label-articleform {
    justify-self: end;
    margin: 0;
    font-weight: 500;
}

/* Control (input/select/textarea) */
.control-articleform {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}

    /* textarea tweak */
    .control-articleform[type="textarea"],
    .control-articleform[asp-for="ArticleContent"] {
        min-height: 200px;
        resize: vertical;
    }

/* Validation Messages */
.form-articleform .text-danger {
    grid-column: span 2;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Actions */
.actions-articleform {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 1rem;
}


/* Video Form Page (Add Video) */
.card-videoform {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Header */
.header-videoform {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Form Grid */
.form-videoform {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 1rem;
    row-gap: 1rem;
    align-items: center;
}

    .form-videoform .full-width {
        grid-column: 1 / -1;
    }

/* Label */
.label-videoform {
    justify-self: end;
    margin: 0;
    font-weight: 500;
}

/* Control (input/select/textarea) */
.control-videoform {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}

    /* textarea tweak */
    .control-videoform[type="textarea"],
    .control-videoform[asp-for="Description"] {
        min-height: 200px;
        resize: vertical;
    }

/* Validation Messages */
.form-videoform .text-danger {
    grid-column: span 2;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Actions */
.actions-videoform {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 1rem;
}


/* Video-Edit Page */
/* Video-Edit Container */
.videoedit-container {
    max-width: 480px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Form Grid */
.form-videoedit {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 1rem;
    row-gap: 1rem;
    align-items: center;
}

    /* full-width rows span both columns */
    .form-videoedit .full-width {
        grid-column: 1 / -1;
    }

/* Label */
.label-videoedit {
    justify-self: end;
    margin: 0;
    font-weight: 500;
}

/* Controls (input/select/textarea) */
.control-videoedit {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font: inherit;
    box-sizing: border-box;
}

    /* textarea tweak */
    .control-videoedit[type="textarea"],
    .form-videoedit textarea {
        min-height: 150px;
        resize: vertical;
    }

/* Validation Messages */
.form-videoedit .text-danger {
    grid-column: span 2;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Buttons Row */
.buttons-videoedit {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 1rem;
}


/* Video Details Page */
.videodetails-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 0 1rem;
}

/* Title */
.videodetails-title {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Card */
.videodetails-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 1.5rem;
}

/* Card Title */
.videodetails-card-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Image */
.videodetails-image-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.videodetails-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Details Grid (dl) */
.videodetails-dl {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 1rem;
    row-gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.videodetails-term {
    justify-self: end;
    font-weight: 500;
}

.videodetails-cell {
    margin: 0;
}

/* Preview */
.videodetails-preview {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.videodetails-preview-title {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #6c757d;
}

.videodetails-preview-text {
    margin: 0;
    color: #495057;
}

/* Buttons */
.videodetails-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin: 1.5rem 0;
}


/* Video Delete Page */
.videodelete-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.videodelete-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.videodelete-lead {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Card */
.videodelete-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.videodelete-card-title {
    font-weight: 600;
}

/* Image */
.videodelete-image-wrapper img.videodelete-image {
    max-width: 100%;
    height: auto;
}

/* Two-column details grid */
.videodelete-dl {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 1rem;
    row-gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.videodelete-term {
    justify-self: end;
    font-weight: 500;
}

.videodelete-data {
    margin: 0;
}

/* Preview */
.videodelete-preview {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.videodelete-preview-title {
    margin-bottom: 0.5rem;
}

.videodelete-preview-text {
    margin: 0;
}

/* Form & Buttons */
.videodelete-form {
    margin-top: 1rem;
}

.videodelete-buttons {
    display: inline-flex;
    gap: 1rem;
}


/* Article Database, Video Database and User Database */
/* Create New Article, Control Admin Priviledges Buttons */
.control-btn,
.create-btn {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s ease-in-out;
}

    .control-btn:hover,
    .create-btn:hover {
        background-color: #0056b3;
    }

/* Search and Filter Forms  */
form select {
    padding: 10px 14px !important;
    font-size: 16px !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    background-color: white !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Uniform Height */
form input,
form select,
form button {
    height: 40px !important;
    padding: 10px !important;
    font-size: 16px !important;
    border-radius: 5px !important;
}

/* Add dropdown arrow */
form select {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23333"><path d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px !important;
    padding-right: 30px !important;
}

/* Use flexbox for consistent layout */
.filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    /* Dropdowns aligning */
    .filter-form select {
        min-width: 180px;
    }

.sortable-header {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}

    .sortable-header:hover {
        text-decoration: none;
        color: inherit;
    }

/* Pagination Buttons bottom of page */
.custom-pagination {
    list-style: none;
    padding: 0;
    margin: 20px 0; /* Adjust vertical spacing as needed */
    display: flex;
    flex-direction: row;
    justify-content: center;
}

    .custom-pagination li {
        margin: 0 5px; /* Space between buttons */
    }

        .custom-pagination li a {
            display: block;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            text-decoration: none;
            color: #007bff;
            background-color: #fff;
        }

            .custom-pagination li a:hover {
                background-color: #f0f0f0;
            }

        .custom-pagination li.active a {
            background-color: #007bff;
            color: #fff;
            border-color: #007bff;
        }

        .custom-pagination li.disabled a {
            color: #ccc;
            pointer-events: none;
            cursor: default;
            background-color: #eee;
            border-color: #ddd;
        }


/* ARTICLE MANAGEMENT */


/* Article Database Page */
/* Edit, Details and Delete Article Page */
.articleedit-container {
    max-width: 480px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Form Grid */
.form-articleedit {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 1rem;
    row-gap: 1rem;
    align-items: center;
}

    /* make “full-width” rows span both columns */
    .form-articleedit .full-width {
        grid-column: 1 / -1;
    }

/* Label */
.label-articleedit {
    justify-self: end;
    margin: 0;
    font-weight: 500;
}

/* Controls */
.control-articleedit {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font: inherit;
}

    /* textarea tweak (rows already set in markup) */
    .control-articleedit[type="textarea"],
    .form-articleedit textarea {
        min-height: 150px;
        resize: vertical;
    }

/* Validation Messages */
.form-articleedit .text-danger {
    grid-column: span 2;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Buttons Row */
.buttons-articleedit {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 1rem;
}


/* Article Details Page */
.articledetails-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 0 1rem;
}

/* Title */
.articledetails-title {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Card */
.articledetails-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 1.5rem;
}

/* card title */
.articledetails-card-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Image */
.articledetails-image-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.articledetails-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Details Grid (dl) */
.articledetails-dl {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 1rem;
    row-gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.articledetails-term {
    justify-self: end;
    font-weight: 500;
}

.articledetails-cell {
    margin: 0;
}

/* Preview */
.articledetails-preview {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.articledetails-preview-title {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #6c757d;
}

.articledetails-preview-text {
    margin: 0;
    color: #495057;
}

/* Buttons */
.articledetails-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin: 1.5rem 0;
}

/* Article Delete Page */
.articledelete-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.articledelete-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.articledelete-lead {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Card */
.articledelete-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.articledelete-card-title {
    font-weight: 600;
}

/* Image */
.articledelete-image-wrapper img.articledelete-image {
    max-width: 100%;
    height: auto;
}

/* Two-column details grid */
.articledelete-dl {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 1rem;
    row-gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.articledelete-term {
    justify-self: end;
    font-weight: 500;
}

.articledelete-data {
    margin: 0;
}

/* Preview */
.articledelete-preview {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.articledelete-preview-title {
    margin-bottom: 0.5rem;
}

.articledelete-preview-text {
    margin: 0;
}

/* Form & Buttons */
.articledelete-form {
    margin-top: 1rem;
}

.articledelete-buttons {
    display: inline-flex;
    gap: 1rem;
}


/* USER MANAGEMENT */


/* User General Table Style */
.table-user-admin {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 16px;
    background: #fff;
}

    /* Table Headers */
    .table-user-admin thead {
        background: #4a4a4a;
        color: white;
        text-align: left;
    }

.tabl-user-admin thead th {
    padding: 10px;
    font-weight: bold;
}

/* Alternating Row Colors below Header */
.table-user-admin tbody tr:nth-child(odd) {
    background: #ffffff; /* White */
}

.table-user-admin tbody tr:nth-child(even) {
    background: #f2f2f2; /* Light Grey */
}

/* Row Hover Effect */
.table-user-admin tbody tr:hover {
    background: rgba(0, 123, 255, 0.1);
}

/* Table Cells below Header */
.table-user-admin td,
.table-user-admin th {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

/* User Management Edit Details Delete Links */
    .table-user-admin td a {
        color: #007bff;
        text-decoration: none;
        font-weight: 600;
        margin-right: 10px;
    }

        .table-user-admin td a:hover {
            text-decoration: underline;
            color: #0056b3;
        }



/* General Admin Buttons Styling */
.admin-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease-in-out;
    font-weight: 600;
}

/* Make User Admin Button */
.make-admin-btn {
    background-color: #28a745;
    color: white;
}

    .make-admin-btn:hover {
        background-color: #218838;
    }

/* Remove User Admin Button */
.remove-admin-btn {
    background-color: #dc3545;
    color: white;
}

    .remove-admin-btn:hover {
        background-color: #c82333;
    }

/* User Edit Page */
.edit-useradmin {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 1rem;
    row-gap: 1rem;
    align-items: center;
}

    .edit-useradmin h2 {
        text-align: center;
        margin-bottom: 1.5rem;
        font-weight: 600;
    }

    /* make the Save button full width */
    .edit-useradmin .btn-submit {
        display: block;
        width: 100%;
        padding: 0.75rem;
        margin-top: 1rem;
    }

    /* style the back link to sit nicely under the form */
    .edit-useradmin .back-link {
        display: block;
        text-align: center;
        margin-top: 1rem;
        color: #6c63ff;
        text-decoration: none;
    }

        .edit-useradmin .back-link:hover {
            text-decoration: underline;
        }

    /* make the label right-aligned in its cell */
    .edit-useradmin .form-label {
        justify-self: end;
        margin: 0;
    }

    /* full-width inputs, consistent height */
    .edit-useradmin .form-control {
        width: 100%;
        min-height: 2.5rem;
    }

    /* make the button span both columns */
    .edit-useradmin .btn-submit {
        grid-column: 1 / -1;
        margin-top: 0.5rem;
    }


/* User Details Page */
.details-useradmin {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

    /* grid layout matching Edit */
    .details-useradmin form {
        display: grid;
        grid-template-columns: 1fr 2fr;
        column-gap: 1rem;
        row-gap: 1rem;
        align-items: center;
    }

    /* heading spans both columns */
    .details-useradmin h2 {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 1.5rem;
        font-weight: 600;
    }

    /* right-align labels */
    .details-useradmin .details-label {
        justify-self: end;
        margin: 0;
        font-weight: 500;
    }

    .details-useradmin .details-text {
        margin: 0;
        padding: 0.375rem 0.75rem;
        min-height: 2.5rem;
        display: flex;
        align-items: center;
        background-color: #f8f9fa;
        border: 1px solid #ced4da;
        border-radius: 4px;
    }

    /* actions row spans both columns */
    .details-useradmin .details-actions {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        margin-top: 1rem;
    }

/* card wrapper */
.details-useradmin {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

    /* grid layout matching your Details page */
    .details-useradmin form {
        display: grid;
        grid-template-columns: 1fr 2fr;
        column-gap: 1rem;
        row-gap: 1rem;
        align-items: center;
    }

    /* heading spans full width */
    .details-useradmin h2 {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 1.5rem;
        font-weight: 600;
    }

    /* confirmation text spans full width */
    .details-useradmin .confirm-text {
        grid-column: 1 / -1;
        margin: 0 0 1rem;
        text-align: center;
    }

    /* right-aligned labels */
    .details-useradmin .details-label {
        justify-self: end;
        margin: 0;
        font-weight: 500;
    }

    /* “fake input” paragraphs, same height/padding as form-control */
    .details-useradmin .details-text {
        margin: 0;
        padding: 0.375rem 0.75rem;
        min-height: 2.5rem;
        display: flex;
        align-items: center;
        background-color: #f8f9fa;
        border: 1px solid #ced4da;
        border-radius: 4px;
    }

    /* actions row spans both columns */
    .details-useradmin .details-actions {
        grid-column: 1 / -1;
        display: flex;
        gap: 1rem;
        margin-top: 1.5rem;
    }


/*///////////////////////////////////////////////////////////////////////////////////*/

/* Mobile Styles (max-width: 1024px) */
@media (max-width: 1024px) {
    /* Show hamburger menu */
    .menu-toggle {
        display: block;
        position: absolute;
        right: 10px;
        top: 15px;
        z-index: 1100;
    }

    /* Hide default nav and header-right */
    nav,
    .header-right {
        display: none;
    }

    .nav-links {
        display: none;
    }

    /* Dropdown (when menu-open is active) */
    .menu-open {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: #f8f9fa;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        padding-top: 80px;
        padding-bottom: 20px;
    }
        /* Dropdown Navigation */
        .menu-open nav {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
        }

        .menu-open .nav-links {
            flex-direction: column;
            align-items: center;
            width: 100%;
        }

            .menu-open .nav-links li {
                display: block;
                text-align: center;
                width: 100%;
            }

            .menu-open .nav-links a {
                display: block;
                width: 100%;
                text-align: center;
                padding: 10px;
                border-bottom: 1px solid #ddd;
            }

        /* Mobile: User Controls (Register (or Hello [username]!), Login at Bottom in a Row */
        .menu-open .header-right,
        .menu-open .user-controls,
        .menu-open .user-hello-logout-top-right,
        .menu-open .user-hello-top-right {
            display: flex;
            flex-direction: row !important;
            justify-content: center;
            align-items: center;
            gap: 10px;
        }

    /* Mobile: Category Page */
    .category-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile: Community Page */
    .community-container {
        flex-direction: column;
    }

    /* Mobile: Profile Page */
    .user-profile-container {
        flex-direction: column;
        align-items: center;
    }

    .user-profile-sidebar {
        width: 100%;
        text-align: center;
        padding: 15px;
    }
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: left;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Footer */
footer {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    width: 100%;
    margin-top: auto;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

html, body {
    height: 100%;
}