@charset "UTF-8";

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

/* =========================================
   Sidebar Navigation
   ========================================= */
.sidebar {
    width: 290px;
    /* Matched to style.css with border-box */
    background-color: #38b494;
    /* renosoku Green */
    color: white;
    padding: 20px;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.sidebar-title {
    font-size: 16px;
    /* Matched to style.css */
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Sidebar List Styles */
.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.sidebar ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Submenu Styles */
.sidebar ul ul {
    margin-top: 5px;
    margin-left: 10px;
    /* Indent submenus */
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    /* Tree line */
}

.sidebar ul ul li {
    position: relative;
    padding-left: 20px;
    /* Space for the connector */
    margin-bottom: 0;
}

/* Tree Connector (L-shape) */
.sidebar ul ul li::before {
    content: "";
    position: absolute;
    top: -10px;
    /* Start from above to connect to parent/sibling */
    left: 5px;
    width: 10px;
    height: calc(50% + 10px);
    /* Height to reach middle of current item */
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
}

.sidebar ul ul li a {
    font-size: 0.9em;
    padding: 5px 10px;
    color: rgba(255, 255, 255, 0.9);
    background: none !important;
    font-weight: normal;
    /* Normal for submenus */
}

.sidebar ul ul li a:hover {
    color: #fff;
    text-decoration: underline;
    background: none !important;
}

/* =========================================
   Main Content Area
   ========================================= */
.main-content {
    margin-left: 290px;
    /* Sidebar width + padding */
    padding: 0;
    max-width: 900px;
    flex: 1;
}

/* Mobile Header (Hidden by default) */
.mobile-header {
    display: none;
    background-color: #38b494;
    color: white;
    padding: 10px 20px;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    height: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-logo {
    font-weight: bold;
    font-size: 1.2em;
    margin-left: 15px;
}

/* Hamburger Menu Button */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    padding: 0;
    z-index: 1200;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* =========================================
   Section & Header Styles
   ========================================= */
section {
    scroll-margin-top: 0;
    margin-bottom: 0;
    border-bottom: none;
    /* Removed border to match main manual */
    padding: 10px 40px;
    /* Reduced vertical padding to match 40px total gap */
}

/* Global Indentation Rule from DESIGN_RULES.md */
section p {
    padding-left: 20px;
}

section ol,
section ul {
    padding-left: 40px;
    /* 20px indent + default padding */
}

/* Zebra Striping */
/* Zebra Striping - REMOVED */
/* section:nth-of-type(even) {
    background-color: #f8f9fa;
} */

h1 {
    font-size: 24px;
    background-color: #38b494;
    /* Solid Green */
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    margin-top: 0;
}

/* Setup Manual Specific Headers */
h2 {
    font-size: 20px;
    color: #2a8a70;
    background-color: #e8f5f0;
    border-left: 6px solid #34b090;
    padding: 12px 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* Remove top margin if H2 is the first element in a section (matches H1 behavior in main manual) */
section h2:first-child {
    margin-top: 0;
}

section h4 {
    padding-left: 20px;
}

h3 {
    font-size: 18px;
    color: #333;
    /* Removed decoration for setup manual sub-sections as requested */
    border: none;
    background: none;
    padding: 0;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

h4 {
    font-size: 16px;
    font-weight: bold;
    margin: 15px 0 10px;
    color: #2c3e50;
    /* Dark Slate */
}

/* =========================================
   Component Styles
   ========================================= */

/* Box Styles */
/* Instruction Box from DESIGN_RULES.md */
.instruction-box {
    background-color: #f5f5f5;
    color: #333;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 20px 0;
    /* Ensure indentation if it's inside a section */
    margin-left: 20px;
}

/* Note style */
.note {
    font-size: 0.9em;
    color: #e74c3c;
    /* Red */
    margin-top: 10px;
    padding-left: 20px;
}

/* Button Styles (Download) */
.btn-download {
    display: inline-block;
    padding: 10px 20px;
    background-color: #eee;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.btn-download:hover {
    background-color: #e0e0e0;
}

/* Image Placeholder Style */
.image-placeholder {
    background: #eee;
    border: 2px dashed #ccc;
    padding: 40px;
    text-align: center;
    color: #777;
    margin: 10px 0;
}

/* =========================================
   Utility Styles
   ========================================= */

/* Indentation Utility */
.indent-1 {
    margin-left: 20px;
}

.indent-2 {
    margin-left: 40px;
}

/* CSV Download Styles */
.csv-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.csv-item {
    margin-bottom: 10px;
}

.csv-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
}

.csv-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.csv-link i {
    font-size: 1.5em;
    margin-right: 15px;
    color: #555;
}

/* Specific Colors */
.csv-mfl {
    background-color: #ffebee;
    /* Light Red/Pink */
    border-left: 5px solid #ef5350;
}

.csv-mld {
    background-color: #e3f2fd;
    /* Light Blue */
    border-left: 5px solid #42a5f5;
}

.csv-meq {
    background-color: #e8f5e9;
    /* Light Green */
    border-left: 5px solid #66bb6a;
}

/* Mobile Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 900;
    display: none;
    /* Hidden by default */
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        /* Hide sidebar off-screen */
        width: 250px;
        top: 60px;
        /* Below mobile header */
        height: calc(100% - 60px);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    }

    .sidebar.active {
        transform: translateX(0);
        /* Show sidebar */
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 80px;
        /* Space for header */
        width: 100%;
    }

    .mobile-header {
        display: flex;
        /* Show mobile header */
    }

    .overlay.active {
        display: block;
    }
}