/* ===== Legal Documents & User Guide Accordion ===== */

/* Legal card hover effect */
.legal-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.legal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Accordion button reset — h2/text inside button must NOT look like a link */
.legal-card > button:first-child h2,
.legal-card > button:first-child h3,
.guide-section > button:first-child h2,
.guide-section > button:first-child h3,
.legal-detail-accordion .glass-card > button:first-child h2,
.legal-detail-accordion .glass-card > button:first-child h3 {
    color: inherit;
    cursor: default;
    text-decoration: none;
    font-weight: inherit;
}
.legal-card > button:first-child:hover h2,
.legal-card > button:first-child:hover h3,
.guide-section > button:first-child:hover h2,
.guide-section > button:first-child:hover h3,
.legal-detail-accordion .glass-card > button:first-child:hover h2,
.legal-detail-accordion .glass-card > button:first-child:hover h3 {
    color: inherit;
}

/* Accordion button states */
.legal-card > button:first-child,
.guide-section > button:first-child {
    position: relative;
}

.legal-card > button:first-child::after,
.guide-section > button:first-child::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #6366f1;
    transition: width 0.3s ease;
}

.legal-card > button:first-child[aria-expanded="true"]::after,
.guide-section > button:first-child[aria-expanded="true"]::after {
    width: 60%;
}

/* Detail page accordion */
.legal-detail-accordion .glass-card > button:first-child {
    position: relative;
}

.legal-detail-accordion .glass-card > button:first-child::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

.legal-detail-accordion .glass-card > button:first-child[aria-expanded="true"]::after {
    display: none;
}

/* Print styles for legal documents */
@media print {
    .legal-detail-accordion .glass-card > button:first-child {
        display: none !important;
    }
    .legal-detail-accordion .glass-card > div:last-child {
        display: block !important;
    }
    .no-print {
        display: none !important;
    }
}

/* Search input focus */
#legalSearch:focus,
#guideSearch:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s;
}
.back-link:hover {
    color: #4f46e5;
}