/* Material Class Table Styles */
.material-class-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.material-class-table tr {
    transition: background-color 0.2s ease;
}

.material-class-table tr:hover {
    background-color: #f8f9fa;
}

.material-class-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.material-class-table tr:last-child td {
    border-bottom: none;
}

/* Class Header Styles */
.class-header {
    width: 30%;
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    font-weight: 600;
    color: #2c3e50;
    border-right: 1px solid #e9ecef;
    vertical-align: top;
    position: relative;
}

.class-header::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #e9ecef, transparent);
}

.class-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.class-link:hover {
    color: #1a73e8;
}

.class-link strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1.4;
    color: #1a73e8;
    margin-bottom: 0.5rem;
}

.class-link:hover strong {
    text-decoration: underline;
}

/* Class Content Styles */
.class-content {
    width: 70%;
    background-color: #ffffff;
    padding-left: 1.5rem;
}

/* Material List Styles */
.material-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.material-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
    border-radius: 4px;
}

.material-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1a73e8;
    font-weight: bold;
}

/* Section Title Styles */
.procedures-table h2 {
    color: #2c3e50;
    font-size: 1.75rem;
    margin: 2rem 0 1.5rem;
    text-align: center;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.procedures-table h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #1a73e8, #4285f4);
    border-radius: 2px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .material-class-table {
        display: block;
        border-radius: 8px;
        margin: 1rem 0;
        box-shadow: none;
        border: 1px solid #e9ecef;
    }

    .material-class-table tbody {
        display: block;
    }

    .material-class-table tr {
        display: block;
        margin-bottom: 1rem;
        background: #ffffff;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .material-class-table tr:last-child {
        margin-bottom: 0;
    }

    .material-class-table td {
        display: block;
        width: 100% !important;
        padding: 1rem;
        border: none;
    }

    .class-header {
        background: #f8f9fa;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 0.75rem;
    }

    .class-header::after {
        display: none;
    }

    .class-link {
        padding: 0.5rem;
        margin: -0.5rem;
        border-radius: 4px;
    }

    .class-link:hover {
        background-color: rgba(26, 115, 232, 0.05);
    }

    .class-link strong {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .class-content {
        padding-left: 1rem;
        padding-top: 0.75rem;
    }

    .material-list {
        gap: 0.25rem;
    }

    .material-list li {
        white-space: normal;
        font-size: 0.9rem;
        padding: 0.35rem 0 0.35rem 1.25rem;
    }

    .procedures-table h2 {
        font-size: 1.5rem;
        margin: 1.5rem 0 1rem;
    }

    /* Add spacing between sections */
    .procedures-table {
        padding: 0 0.5rem;
    }
}

/* Print Styles */
@media print {
    .material-class-table {
        box-shadow: none;
        border: 1px solid #ddd;
        margin: 1rem 0;
    }

    .class-header {
        background: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .class-header::after {
        display: none;
    }

    .class-link {
        color: #000 !important;
        text-decoration: none !important;
    }

    .class-link strong {
        color: #000 !important;
    }

    .material-list li::before {
        color: #000;
    }
}

/* Material Header Styles */
.material-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333333;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.back-button:hover {
    background-color: rgba(51, 51, 51, 0.1);
}

.back-button svg {
    width: 24px;
    height: 24px;
}

.material-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.material-title {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.all-classes-link {
    color: #007AFF;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
    background-color: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.all-classes-link:hover {
    background-color: rgba(0, 122, 255, 0.15);
    border-color: rgba(0, 122, 255, 0.3);
}

@media (max-width: 768px) {
    .back-button {
        padding: 6px;
    }
    .back-button svg {
        width: 20px;
        height: 20px;
    }
    .material-title {
        font-size: 1.25rem;
    }
    .material-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .material-icon {
        margin-right: 0.5rem;
    }
    
    .all-classes-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}
