* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #009688;
    --primary-dark: #00796b;
    --primary-light: #b2dfdb;
    --accent-color: #00bcd4;
    --text-color: #333;
    --text-light: #757575;
    --background-color: #f5f5f5;
    --card-color: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
    --sidebar-width: 280px;
    --header-height: 70px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--background-color);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Logo */
.logo {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: var(--header-height);
}

.logo-img {
    width: auto;
    height: 40px;
    object-fit: contain;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px;
}

.sidebar-nav ul {
    list-style: none;
}

.menu-item {
    position: relative;
    margin-bottom: 4px;
    border-radius: 25px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.menu-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    background-color: transparent;
}

.menu-item:hover:not(.active) {
    background-color: var(--primary-light);
}

.menu-item:hover:not(.active) > a {
    color: var(--primary-dark);
}

.menu-item.active {
    background-color: var(--primary-color);
}

.menu-item.active > a {
    color: white;
}

.submenu-toggle {
    font-size: 14px;
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-item.open > a .submenu-toggle {
    transform: rotate(45deg);
}

/* Submenu */
.submenu {
    display: none;
    padding: 8px 0 8px 20px;
    margin: 0;
    background-color: #fafafa;
}

.submenu .menu-item {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 4px;
}

.submenu .menu-item a {
    padding: 10px 15px;
    font-size: 13px;
    color: var(--text-light);
}

.submenu .menu-item.active > a {
    color: white;
}

/* Nested Submenu */
.submenu .submenu {
    padding-left: 20px;
    background-color: #f0f0f0;
}

.submenu .submenu .menu-item a {
    font-size: 12px;
}


/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0 50px; /* Increased horizontal padding */
    transition: margin-left 0.3s ease;
}

/* Header */
.dashboard-header {
    position: sticky;
    top: 0;
    background-color: var(--card-color);
    padding: 0 50px; /* Match main content padding */
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    z-index: 100;
}

.left-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.mobile-toggle:hover {
    color: var(--primary-color);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--background-color);
    border-radius: 25px;
    padding: 10px 20px;
    width: 350px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.1);
}

.search-bar i {
    color: var(--text-light);
    margin-right: 12px;
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    color: var(--text-color);
}

.search-bar input::placeholder {
    color: var(--text-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========== CONTENT AREA ========== */
.dashboard-content {
    padding: 40px 0; /* Remove horizontal padding to align with main-content */
    max-width: 1400px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 60px;
    padding-top: 30px; /* Offset for sticky header */
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin: 32px 0 16px;
    line-height: 1.3;
}

.section-sub-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin: 24px 0 12px;
    line-height: 1.3;
}

.content-section p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
}

.content-section strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.sub-content {
    padding-left: 25px;
    border-left: 3px solid var(--primary-light);
    margin: 20px 0;
}

.sub-sub-content {
    padding-left: 25px;
    border-left: 3px solid var(--border-color);
    margin: 20px 0 20px 25px;
}


/* ========== MEDIA CONTAINER ========== */
.media-container {
    display: grid;
    gap: 24px;
    margin: 20px 0;
}

.media-container:not(.single-item) {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for multiple items */
}

.media-container.single-item {
    grid-template-columns: 1fr; /* 1 column for single items */
    justify-items: center; /* Center the single item */
}

.media-container.single-item > * {
    max-width: 80%; /* Reduced size for single items */
    width: 100%;
}

.image-wrapper {

    overflow: hidden;
    transition: var(--transition);
    position: relative;
    aspect-ratio: 16 / 10;
}

.image-wrapper:hover {
    transform: translateY(-4px);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
}

.image-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}

.img-large {
    width: 100%;
    display: block;
    margin: 20px auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}


/* ========== VIDEO PLAYER ========== */
.video-wrapper {
    position: relative;
    padding-bottom: 45%;
    height: auto;
    overflow: hidden;
    border-radius: var(--border-radius);
    width: 100%;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* ========== SCROLL TO TOP BUTTON ========== */
.scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

.scroll-to-top-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* ========== OVERLAY ========== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 992px) {
    .mobile-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
    }

    .main-content {
        margin-left: 0;
        padding: 0 20px; /* Adjust padding for mobile */
    }

    .dashboard-header {
        padding: 0 20px;
    }

    .search-bar {
        width: 250px;
    }
    .media-container.single-item > * {
        max-width: 100%; /* Full width on smaller screens */
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .search-bar {
        width: 100%;
        max-width: 200px;
    }

    .media-container:not(.single-item) {
        grid-template-columns: 1fr; /* Single column for smaller screens */
    }

    .section-title {
        font-size: 26px;
    }

    .section-subtitle {
        font-size: 20px;
    }

    .section-sub-subtitle {
        font-size: 18px;
    }

    .main-content {
        padding: 0 15px;
    }

    .content-section {
        margin-bottom: 40px;
        padding-top: 60px;
    }
    .img-large {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .dashboard-header {
        padding: 0 15px;
    }

    .search-bar {
        max-width: 150px;
        padding: 8px 15px;
    }

    .search-bar input {
        font-size: 13px;
    }

    .scroll-to-top-btn {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }

    .header-actions {
        gap: 8px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }
}

.feature-list {
    list-style: none;
    margin-left: 20px;
    margin-bottom: 20px;
}
