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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    line-height: 1.6;
}

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

.main-content {
    flex: 1;
    padding: 40px 60px;
    background: #ffffff;
    overflow-y: auto;
}

.sidebar {
    width: 350px;
    background-color: #ffffff;
    padding: 30px 20px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h2 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.menu {
    list-style: none;
}

.menu li {
    margin-bottom: 8px;
}

/* Sub-menu styles */
.menu > li.has-submenu > a {
    position: relative;
}

/* Add arrow indicator for items with sub-menus */
.menu > li.has-submenu > a::after {
    content: '▶';
    position: absolute;
    right: 15px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.menu > li.has-submenu.expanded > a::after {
    transform: rotate(90deg);
}

/* Hide sub-menus by default */
.menu > li > ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    list-style: none;
    margin-left: 0;
}

/* Show sub-menus when expanded */
.menu > li.has-submenu.expanded > ul {
    max-height: 500px;
}

/* Sub-menu item styling */
.menu > li > ul > li {
    margin-bottom: 4px;
}

.menu > li > ul > li > a {
    font-size: 13px;
    padding: 8px 15px 8px 40px;
    color: #555;
}

.menu > li > ul > li > a:hover {
    background-color: #f5f5f5;
    padding-left: 45px;
}

/* Active sub-menu item - make it stand out! */
.menu > li > ul > li > a.active {
    background-color: #81c784;
    color: white;
    font-weight: 600;
    border-left: 4px solid #2e7d32;
    padding-left: 36px;
}

.menu > li > ul > li > a.active:hover {
    background-color: #66bb6a;
    padding-left: 36px;
}

.menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.menu a:hover {
    background-color: #f0f0f0;
    padding-left: 25px;
}

.menu a.active {
    background-color: #43a047;
    color: white;
    font-weight: 500;
}

.section h1 {
    color: #1b5e20;
    font-size: 32px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #43a047;
}

.section h2 {
    color: #2e7d32;
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.section h3 {
    color: #388e3c;
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.section p {
    color: #333;
    margin-bottom: 15px;
    text-align: justify;
}

.section ul, .section ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.section li {
    margin-bottom: 8px;
    color: #333;
}

.info-box {
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid #81c784;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.process-step {
    background-color: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #43a047;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.process-step h3 {
    color: #1b5e20;
    margin-top: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
}

table th {
    background-color: #43a047;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 500;
}

table td {
    padding: 12px;
    border: 1px solid #ddd;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.note {
    background-color: #fff9c4;
    border-left: 4px solid #fbc02d;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.warning {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.diagram-container {
    text-align: left;
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow-x: auto;
}

.diagram-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

.diagram-container h4 {
    color: #1b5e20;
}

/* Responsive Image Styling */
.image-placeholder {
    margin: 30px 0;
    text-align: center;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.image-placeholder img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-placeholder p {
    margin: 0;
    text-align: center;
}

/* General img styling for any images not in containers */
.section img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2e7d32;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.nav-button:hover {
    background-color: #1b5e20;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        transform: translateY(100%); /* Hidden below screen */
        transition: transform 0.4s ease;
        z-index: 999;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    }
    
    .sidebar.active {
        transform: translateY(0); /* Slide up to screen */
    }
    
    .main-content {
        padding: 40px 20px 100px 20px;
        width: 100%;
    }
    
    .container {
        flex-direction: column;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-button {
        width: 100%;
    }
    
    /* Tablet image adjustments */
    .image-placeholder img,
    .diagram-container img {
        max-width: 100%;
        height: auto;
    }
    
    /* Ensure tables are scrollable on tablets */
    .section table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .sidebar {
        height: 100vh;
    }
    
    .main-content {
        padding: 30px 15px 90px 15px;
    }
    
    .section h1 {
        font-size: 24px;
    }
    
    .section h2 {
        font-size: 20px;
    }
    
    .nav-button {
        font-size: 13px;
        padding: 10px 15px;
    }
    
    /* Mobile image adjustments */
    .image-placeholder {
        padding: 10px;
        margin: 20px 0;
    }
    
    .image-placeholder img,
    .diagram-container img,
    .section img {
        max-width: 100%;
        height: auto;
        border-radius: 4px;
    }
    
    /* Reduce table font size on mobile */
    table {
        font-size: 12px;
    }
    
    table th, table td {
        padding: 8px 6px;
    }
}


.flowchart {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    overflow-x: auto;
}

.flow-box {
    background-color: white;
    border: 2px solid #2196F3;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px auto;
    max-width: 600px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.flow-decision {
    background-color: white;
    border: 2px solid #ff9800;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px auto;
    max-width: 600px;
    position: relative;
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.flow-start-end {
    background-color: #4CAF50;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    margin: 15px auto;
    max-width: 200px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.flow-arrow {
    text-align: center;
    font-size: 24px;
    color: #2196F3;
    margin: 5px 0;
}

.flow-label {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin: 5px 0;
    font-weight: bold;
}

.parallel-boxes {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.parallel-boxes .flow-box {
    flex: 1;
    min-width: 280px;
}
