body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;

    
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 300px;
    background-color: #f4f4f4;
    background: linear-gradient(rgba(238, 241, 247, 0.90), rgba(238, 241, 247, 0.85)), 
    url('../img/header.png') no-repeat right center;
    background-size: cover;
    padding: 15px;
    padding-top: 90px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
    font-size: 14px;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-color: #0a041c;
    border-radius: 5px;
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo-and-name {
    display: flex;
    align-items: center; 
    gap: 10px;
    margin-bottom: 10px; 
}

.site-description {
    font-size: 12px;
    color: #bbb;
    text-align: center;
}


.logo {
    width: 50px;
    height: 50px;
    border-radius: 10%;
    margin-right: 5px;
}

.site-name {
    font-size: 15px;
    font-weight: bold;
    color: #ffffff; 
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    padding: 10px;
    cursor: pointer;

    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}

.sidebar li.active {
    background-color: #08001c;
    font-weight: bold;
    border-radius: 10px;
    color: aliceblue;
}

.menu-icon {
    margin-right: 10px;
    font-size: 14px;
}


.content {
    flex: 1;
    padding: 3em 5em;
    margin-top: 90px;
    padding-top: 10px;
}

.mobile-menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f4f4f4;
    border-top: 1px solid #edebeb;
    text-align: center;
    padding: 10px 0;
    z-index: 1000;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.mobile-menu button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.mobile-menu button:hover {
    background-color: #0056b3;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: #c25b01;
}

.home li {
    margin: 10px;
    text-decoration: underline;
    color:#0056b3;
}

h1 {
    color: #393939;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.3;
}

h2 {
    color: #393939;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.3;
}

h3 {
    color: #393939;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 14px;
    line-height: 1.3;
}

h4 {
    color: #393939;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

h5 {
    color: #393939;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

h6 {
    color: #393939;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.content p {
    text-indent: 3em;
    text-align: justify;
    font-size: 16px;
    margin: 5px;
    color: #474747;
}

.blocks {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.text {
    flex: 8;
}

.image {
    flex: 2;
    text-align: center;
}

.text2 {
    flex: 3;
}

.image2 {
    flex: 2;
    text-align: left;
}

.image img {
    max-width: 100%;
    height: auto;
}


.flex-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.column {
    flex: 1;
    max-width: 25%;
    padding: 20px;
    text-align: center;
}


.firstimg {
    display: block; 
    margin: auto; 
    width: 30%;
}

@media (max-width: 768px) {

    .firstimg {
        display: block; 
        margin: auto; 
        width: 100%;
    }

    .column {
        max-width: 100%;
        padding: 10px;
    }
    .flex-container {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .blocks {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .image {
        text-align: center;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    h4 {
        font-size: 16px;
    }

    h5 {
        font-size: 14px;
    }

    h6 {
        font-size: 13px;
    }

    .content p {
        text-indent: 3em;
        text-align: justify;
        font-size: 14px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        height: 100%;
        padding-top: 110px;
    }

    .content {
        padding: 1em;
        margin-top: 110px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-menu {
        display: flex;
        justify-content: space-around;
    }

    .mobile-menu {
        display: flex;
        justify-content: space-around;
        padding: 10px 0;
        background-color: #f4f4f4;
        border-top: 1px solid #edebeb;
    }

    .menu-item {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #616161;
        font-size: 12px;
    }

    .menu-item span {
        margin-top: 5px;
    }

    /* Mobile card styles */
    .home-cards {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }

    .home-card {
        padding: 20px;
        margin-bottom: 10px;
    }

    .card-title {
        font-size: 16px;
        padding-right: 50px;
    }

    .card-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
        right: 15px;
    }

}

/* Card-based layout for table of contents */
.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.home-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.home-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.home-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-card:hover::before {
    opacity: 1;
}

.home-card a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    display: block;
    position: relative;
    z-index: 1;
}

.home-card a:hover {
    color: #ffffff;
}

.card-number {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #ffffff;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #ffffff;
    padding-right: 60px;
}

.card-description {
    display: none;
}

/* Special styling for different card types - Blue theme */
.home-card.intro-card {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

.home-card.theory-card {
    background: linear-gradient(135deg, #5b6de8 0%, #667eea 100%);
}

.home-card.practice-card {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.home-card.assessment-card {
    background: linear-gradient(135deg, #4776e6 0%, #8e54e9 100%);
}

.home-card.conclusion-card {
    background: linear-gradient(135deg, #6dd5ed 0%, #2193b0 100%);
}

/* E-book Toolbar */
.ebook-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 70px;
    box-sizing: border-box;
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toolbar-button {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toolbar-button:hover {
    background: #34495e;
    transform: translateY(-2px);
}

.toolbar-button.active {
    background: #3498db;
}

.font-size-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.font-size-btn {
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.font-size-btn:hover {
    background: #d5dbdb;
    border-color: #95a5a6;
}

.font-family-selector {
    padding: 6px 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
    color: #2c3e50;
    font-size: 14px;
    cursor: pointer;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 8px 35px 8px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 20px;
    font-size: 14px;
    width: 200px;
    background: white;
    color: #2c3e50;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-button {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #7f8c8d;
}

.search-button:hover {
    color: #3498db;
}

.progress-bar-container {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transition: width 0.3s ease;
    width: 0%;
}

.navigation-buttons {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.nav-btn {
    background: rgba(44, 62, 80, 0.9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-btn:hover {
    background: rgba(52, 73, 94, 0.9);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.notes-panel {
    position: fixed;
    right: -350px;
    top: 70px;
    width: 350px;
    height: calc(100vh - 70px);
    background: white;
    border-left: 1px solid #e0e0e0;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.notes-panel.open {
    right: 0;
}

.notes-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    position: sticky;
    top: 0;
}

.notes-content {
    padding: 20px;
}

.highlight {
    background: rgba(255, 235, 59, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

.highlight:hover {
    background: rgba(255, 235, 59, 0.5);
}

/* Search highlights and notifications */
.search-highlight {
    background: #ffeb3b;
    color: #333;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.success {
    background: #27ae60;
}

.notification.error {
    background: #e74c3c;
}

.notification.info {
    background: #3498db;
}

/* Notes panel content styling */
.note-item, .highlight-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
}

.note-item p, .highlight-item p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.4;
}

.note-item small, .highlight-item small {
    color: #6c757d;
    font-size: 12px;
}

.note-item button, .highlight-item button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.note-item button:hover, .highlight-item button:hover {
    background: #c82333;
}

.notes-content h4 {
    color: #495057;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.notes-content h4:first-child {
    margin-top: 0;
}

/* Responsive adjustments for notes panel */
@media (max-width: 768px) {
    .notes-panel {
        width: 100%;
        right: -100%;
    }
    
    .notes-panel.open {
        right: 0;
    }
    
    .note-item, .highlight-item {
        padding: 12px;
    }
    
    .note-item button, .highlight-item button {
        position: static;
        margin-top: 10px;
        width: 100%;
    }
}

/* Mobile responsive toolbar */
@media (max-width: 768px) {
    .ebook-toolbar {
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 10px;
        height: auto;
        min-height: 60px;
    }
    
    .toolbar-section {
        gap: 8px;
    }
    
    .search-input {
        width: 150px;
    }
    
    .font-family-selector {
        max-width: 120px;
    }
    
    .content {
        margin-top: 110px;
    }
    
    .sidebar {
        padding-top: 110px;
    }
    
    .navigation-buttons {
        bottom: 80px;
    }
}

/* Font customization support */
.content[style*="font-size"] {
    font-size: inherit !important;
}

.content[style*="font-family"] {
    font-family: inherit !important;
}

.home-card[style*="font-size"] {
    font-size: inherit !important;
}

.home-card[style*="font-family"] {
    font-family: inherit !important;
}

.card-title[style*="font-size"] {
    font-size: inherit !important;
}

.card-title[style*="font-family"] {
    font-family: inherit !important;
}

/* Ensure JavaScript font changes take precedence */
.content * {
    font-size: inherit;
    font-family: inherit;
}

.home-card * {
    font-size: inherit;
    font-family: inherit;
}

/* Exception for card numbers - keep their size fixed */
.card-number {
    font-size: 16px !important;
    font-family: inherit;
}

/* Continue Reading Button */
.continue-reading-container {
    text-align: center;
    margin: 20px 0 30px 0;
}

.continue-reading-btn {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.continue-reading-btn:hover {
    background: linear-gradient(135deg, #34495e, #2980b9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.continue-reading-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .continue-reading-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
}

/* Theory items styling */
.theory-item {
    background-color: #f8f9fa;
    border-left: 4px solid #4a90e2;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theory-item:hover {
    background-color: #f0f5fb;
    border-left-color: #3578d1;
}

.theory-item h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.theory-item p {
    margin-bottom: 0;
    color: #495057;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .theory-item {
        padding: 12px;
        margin: 8px 0;
    }
    
    .theory-item h4 {
        font-size: 16px;
    }
}

/* Program table styling */
.program-table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.table-row {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
}

.table-row:last-child {
    border-bottom: none;
}

.table-header {
    background-color: #4a90e2;
    color: white;
    font-weight: bold;
}

.table-header .table-cell {
    color: #08001c;
    font-weight: 600;
}

.table-cell {
    flex: 1;
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
    border-right: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    color: #495057;
    line-height: 1.5;
}

.table-cell:last-child {
    border-right: none;
}

.table-row:nth-child(even) .table-cell {
    background-color: #ffffff;
}

.table-row:hover .table-cell {
    background-color: #f0f5fb;
}

@media (max-width: 768px) {
    .table-row {
        flex-direction: column;
    }
    
    .table-cell {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .table-cell:last-child {
        border-bottom: none;
    }
    
    .table-header .table-cell {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .table-cell {
        padding: 10px 12px;
        font-size: 14px;
    }
}