/* Variables globales */
:root {
    --primary-color: #016fa1;
    --secondary-color: #ffc64c;
    --light-blue: #a1d2dc;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --text-color: #333333;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --success-color: #4CAF50;
    --error-color: #f44336;
    --footer-height: 60px;
}

/* Import Open Sans font */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap');

/* Styles globaux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--text-color);
    min-height: 100vh;
}

body.primary-bg {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Header */
.header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.menu-icon {
    font-size: 28px;
    cursor: pointer;
    color: var(--white);
}

.back-button {
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    text-decoration: none;
}

.header-title {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
    gap: 10px;
}

.tenant-name {
    font-size: 1.2rem;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.auth-actions {
    display: flex;
    align-items: center;
}

.auth-link {
    color: var(--white);
    font-size: 22px;
    text-decoration: none;
}

.profile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray);
    overflow: hidden;
}

.profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Welcome section */
.welcome {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 20px 30px;
    margin-bottom: 20px;
}

.welcome p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.welcome h2 {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Menu grid sur la page d'accueil */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 20px;
    margin-bottom: 30px;
}

.menu-item {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.menu-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.menu-item-title {
    position: relative;
    z-index: 2;
    font-weight: bold;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    width: 100%;
    color:#e6e6e6;
}

/* Actualités */
.news-section {
    margin-top: 10px;
    padding: 0 20px;
    margin-bottom: 30px;
}

.news-section h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.news-item {
    background-color: var(--gray);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    height: 180px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.news-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: var(--white);
}

.news-item-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.news-text {
    font-size: 1.1rem;
    font-weight: bold;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.play-button i {
    color: var(--primary-color);
    font-size: 20px;
    margin-left: 3px; /* Pour centrer visuellement l'icône de lecture */
}

/* Documents */
.document-list {
    padding: 20px;
}

.document-card {
    background-color: var(--white);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.document-content {
    padding: 20px;
    display: flex;
    align-items: center;
}

.document-icon {
    background-color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.document-icon i {
    color: var(--white);
    font-size: 24px;
}

.document-info {
    flex-grow: 1;
}

.document-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.document-description {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.document-size {
    font-size: 0.8rem;
    color: #666;
}

/* Quiz */
.quiz-list {
    padding: 20px;
    padding-bottom: 80px;
}

.quiz-card {
    background-color: var(--white);
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.quiz-image {
    width: 100%;
    height: 150px;
    background-color: #ddd;
    overflow: hidden;
}

.quiz-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quiz-content {
    padding: 20px;
}

.quiz-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.quiz-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 10px;
}

.badge-new {
    background-color: #4CAF50;
    color: white;
}

.badge-popular {
    background-color: #FFC107;
    color: #333;
}

/* Vidéos */
.videos-container {
    padding: 20px;
    padding-bottom: 80px;
}

.video-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #ddd;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-content {
    padding: 15px;
}

.video-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.video-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Boutons d'action */
.action-button {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.watch-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

/* Bottom Navigation */
.bottom-nav {
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    height: var(--footer-height);
    z-index: 100;
    max-width: 500px;
    margin: 0 auto;
    right: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 5px 10px;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-item.active {
    font-weight: bold;
}

/* Drawer Menu */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.drawer-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: var(--white);
    z-index: 1000;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.drawer-menu.open {
    left: 0;
}

.drawer-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.drawer-profile {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.drawer-profile-pic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--light-blue);
    margin-right: 15px;
    overflow: hidden;
}

.drawer-profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-profile-info h3 {
    font-size: 1.2rem;
    margin: 0 0 5px 0;
}

.drawer-profile-info p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

.drawer-nav {
    padding: 15px 0;
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.drawer-nav-item:last-child {
    border-bottom: none;
}

.drawer-nav-item i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.drawer-nav-item.active {
    background-color: rgba(0, 119, 138, 0.1);
    font-weight: bold;
}

.drawer-nav-item:hover {
    background-color: rgba(0, 119, 138, 0.05);
}

.drawer-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 10px 20px;
}

.drawer-footer {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Media Queries */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
}

/* Styles pour les pages de contenu */
.section-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px;
    margin-bottom: 20px;
}

.section-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.section-header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Styles spécifiques pour les pages */
/* Videos */
.videos-container {
    padding: 10px 20px 80px;
}

.video-item {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #ddd;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-details {
    padding: 15px;
}

.video-details h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.video-details p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.video-player-container {
    padding: 0 0 80px;
    background-color: var(--white);
}

.video-player {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    overflow: hidden;
}

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

.video-info {
    padding: 20px;
}

.video-info h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.video-category {
    margin-bottom: 15px;
}

.category-tag {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--light-blue);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.related-videos {
    padding: 20px;
    background-color: var(--light-gray);
}

.related-videos h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.related-video-item {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.related-video-item .video-details {
    padding: 10px;
}

.related-video-item .video-details h3 {
    font-size: 0.9rem;
}

/* Facts */
.facts-container {
    padding: 10px 20px 80px;
}

.facts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.fact-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.fact-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.fact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fact-content {
    padding: 20px;
}

.fact-content h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.fact-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color);
}

/* Quizzes */
.quizzes-container {
    padding: 10px 20px 80px;
}

/* Quiz View Styles */
.quiz-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px 10px 0 0;
}

.quiz-header h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--white);
}

.quiz-description {
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
    color: var(--white);
}

.monthly-quiz {
    position: relative;
    margin-bottom: 30px;
}

.monthly-quiz a {
    text-decoration: none;
}

.monthly-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.monthly-badge span {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.monthly-quiz-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.monthly-quiz-card .quiz-info {
    padding: 20px;
}

.monthly-quiz-card .quiz-info h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.monthly-quiz-card .quiz-info p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #666;
    line-height: 1.4;
}

.monthly-quiz-card .quiz-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: #666;
}

.monthly-quiz-card .quiz-meta span {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.monthly-quiz-card .quiz-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.monthly-quiz-card .quiz-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
}

.monthly-quiz-card .quiz-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.monthly-quiz-card .quiz-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quiz-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.quiz-grid a {
    text-decoration: none;
}

.quiz-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    padding: 15px;
}

.quiz-card-content {
    margin-bottom: 15px;
}

.quiz-card-content h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.quiz-card-content p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.quiz-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.quiz-meta span {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
}

.quiz-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.quiz-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: center;
}

/* Documents */
.documents-container {
    padding: 10px 20px 80px;
}

.category-filter {
    display: flex;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.category-filter::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-btn {
    background-color: var(--light-gray);
    color: var(--text-color);
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    margin-right: 10px;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
}

.category-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: bold;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.document-item {
    background-color: var(--white);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
}

.document-icon {
    background-color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.document-icon i {
    color: var(--white);
    font-size: 24px;
}

.document-info {
    flex-grow: 1;
}

.document-info h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.document-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    line-height: 1.4;
}

.document-meta {
    display: flex;
    font-size: 0.8rem;
    color: #666;
}

.document-type {
    background-color: var(--light-blue);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 10px;
    font-weight: bold;
}

.document-size {
    color: #666;
}

.document-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn, .view-btn {
    background-color: var(--light-gray);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
}

.download-btn {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

/* Products */
.products-container {
    padding: 10px 20px 80px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.product-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    padding: 15px;
}

.product-details h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 1rem;
}

.product-category {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.product-btn {
    display: inline-block;
    padding: 6px 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 15px;
    font-size: 0.8rem;
    text-decoration: none;
    text-align: center;
}

.paginator {
    text-align: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 10px;
}

.pagination li {
    margin: 0 5px;
}

.pagination a {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--white);
    color: var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}

.pagination .active a {
    background-color: var(--primary-color);
    color: var(--white);
}

.paginator p {
    font-size: 0.8rem;
    color: #666;
}

/* Padding pour éviter que le contenu ne soit masqué par le menu du bas */
.spacer {
    height: 80px;
}

/* Section "Le saviez-vous?" */
.saviez-vous-section {
    margin: 20px 0 30px;
    padding: 0 20px;
}

/* Profile Picture and Initials */
.drawer-profile-pic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    background-color: #e1e1e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 24px;
}

.drawer-profile-pic.has-initials {
    background-color: var(--primary-color);
    color: white;
}

.profile-initials {
    font-weight: bold;
    font-size: 22px;
    text-transform: uppercase;
}

.saviez-vous-section h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: #333333;
}

/* Swiper Container */
.swiper-container {
    width: 100%;
    height: 300px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
}

.swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
}

.swiper-slide-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.card-image {
    height: 55%;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 15px;
    color: var(--text-color);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Quiz View Page */
.quiz-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px;
    margin-bottom: 20px;
}

.quiz-header h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.quiz-description {
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
    opacity: 0.9;
}

.quiz-timer {
    display: inline-block;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    font-size: 0.9rem;
    margin-top: 10px;
}

.quiz-container {
    padding: 0 20px 80px;
}

.question-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.question-header {
    margin-bottom: 15px;
}

.question-number {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--light-blue);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.question-image {
    width: 100%;
    max-height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
}

.question-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    background-color: var(--light-gray);
    border-radius: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.option:hover {
    background-color: var(--medium-gray);
}

.option input[type="radio"] {
    margin-right: 10px;
}

.option-label {
    font-size: 1rem;
    cursor: pointer;
}

.quiz-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.submit-quiz {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Quiz Results Page */
.results-container {
    padding: 0 20px 80px;
}

.results-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 0 10px 10px;
}

.results-header h1 {
    font-size: 1.5rem;
}

.score-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.score-percentage {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 15px;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
}

.score-percentage.good {
    background-color: #4CAF50;
}

.score-percentage.average {
    background-color: #FFC107;
}

.score-percentage.poor {
    background-color: #f44336;
}

.score-details {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.score-message {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.score-message.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
}

.score-message.average {
    background-color: rgba(255, 193, 7, 0.1);
    color: #b28704;
}

.score-message.poor {
    background-color: rgba(244, 67, 54, 0.1);
    color: #c62828;
}

.score-message i {
    margin-right: 10px;
    font-size: 1.5rem;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.explanations-container {
    margin-top: 30px;
}

.explanations-container h2 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.explanation-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.explanation-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.explanation-text {
    background-color: var(--light-gray);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.explanation-text h4, .correct-options h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.explanation-text p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.correct-options ul {
    list-style-type: none;
    padding-left: 0;
}

.correct-options li {
    font-size: 0.9rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
}

.correct-options li:before {
    content: "✓";
    color: var(--success-color);
    margin-right: 10px;
    font-weight: bold;
}

.correct-options li:last-child {
    border-bottom: none;
}

/* Actions bar for detail pages */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--white);
    border-bottom: 1px solid var(--medium-gray);
    position: sticky;
    top: 0;
    z-index: 100;
}

.actions-bar .back-button {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}

.actions-bar .back-button i {
    margin-right: 8px;
}

/* Flash messages */
.flash-messages {
    padding: 10px 20px;
}

.flash-message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.flash-message.success {
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--success-color);
    color: #2e7d32;
}

.flash-message.error {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 4px solid var(--error-color);
    color: #c62828;
}

.flash-message .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.flash-message .close-btn:hover {
    opacity: 1;
}