/* Arbeitsschutz Page Styles */

.arbeitsschutz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.arbeitsschutz-header {
    background: linear-gradient(135deg, #00A0D2 0%, #0078A0 100%);
    color: white;
    padding: 35px 30px;
    border-radius: 8px;
    margin-bottom: 35px;
    box-shadow: 0 4px 12px rgba(0, 160, 210, 0.25);
    position: relative;
    overflow: hidden;
}

.arbeitsschutz-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.arbeitsschutz-header h1 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.arbeitsschutz-header p {
    margin: 12px 0 0 0;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-size: 1.05em;
}

/* Accordion Styles */
.accordion-section {
    background: #f8f9fa;
    border-left: 4px solid #00A0D2;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.accordion-section:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.accordion-section.active {
    box-shadow: 0 4px 12px rgba(0, 160, 210, 0.2);
}

.accordion-header {
    background: #f8f9fa;
    padding: 22px 25px;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.accordion-header::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #00A0D2;
    transition: width 0.3s ease;
}

.accordion-header:hover {
    background: #e9ecef;
    padding-left: 28px;
}

.accordion-header:hover::after {
    width: 6px;
}

.accordion-header:focus {
    outline: 2px solid #00A0D2;
    outline-offset: -2px;
}

.accordion-section.active .accordion-header {
    background: #e7f3f8;
}

.accordion-header h2 {
    color: #00A0D2;
    margin: 0;
    font-size: 1.6em;
    font-weight: 600;
    flex: 1;
}

.accordion-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 15px;
    flex-shrink: 0;
}

.accordion-icon::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #00A0D2;
    transition: transform 0.3s ease;
}

.accordion-icon.icon-expanded::before {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 0 25px 28px 25px;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.accordion-section.active .accordion-content {
    display: block;
}

.section {
    background: transparent;
    border-left: none;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.section h2 {
    color: #00A0D2;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.6em;
    font-weight: 600;
}

.section h3 {
    color: #0078A0;
    margin-top: 28px;
    margin-bottom: 12px;
    font-size: 1.3em;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0f0f5;
    display: inline-block;
    width: 100%;
}

.section p {
    line-height: 1.7;
    margin-bottom: 12px;
    color: #333;
}

.section ul {
    margin: 15px 0;
    padding-left: 0;
    list-style: none;
}

.section li {
    margin-bottom: 12px;
    line-height: 1.7;
    color: #333;
    padding-left: 28px;
    position: relative;
}

.section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00A0D2;
    font-weight: bold;
    font-size: 1.1em;
    top: 0;
}

.highlight-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 22px;
    margin: 22px 0;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.highlight-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.25);
}

.highlight-box strong {
    color: #856404;
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.highlight-box ul {
    margin-top: 10px;
}

.contact-info {
    background: linear-gradient(135deg, #e7f3f8 0%, #d1e7f0 100%);
    border-left: 4px solid #00A0D2;
    padding: 22px;
    margin: 22px 0;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 160, 210, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-info:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 10px rgba(0, 160, 210, 0.15);
}

.contact-info strong {
    color: #0078A0;
}

.contact-info a {
    color: #0078A0;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.contact-info a:hover {
    color: #005a7a;
    border-bottom-color: #005a7a;
    text-decoration: none;
}

.contact-info a:focus {
    outline: 2px solid #00A0D2;
    outline-offset: 2px;
    border-radius: 2px;
}

.contact-info-follow-up {
    margin-top: 10px;
}

.contact-info p:first-child + .contact-info-follow-up {
    margin-top: 15px;
}

.thank-you-message {
    margin-top: 20px;
    font-style: italic;
    color: #0078A0;
}

.emergency-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #dc3545;
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #fff 0%, #ffe6e6 100%);
    border: 4px solid #dc3545;
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
    position: relative;
    animation: pulse 2s ease-in-out infinite;
    letter-spacing: 2px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
    }
}

.emergency-number::before {
    content: '🚨';
    display: block;
    font-size: 0.6em;
    margin-bottom: 8px;
    opacity: 0.9;
}

/* Responsive Design - Mobile */
@media screen and (max-width: 768px) {
    /* Base font size for mobile */
    html {
        font-size: 16px !important;
    }
    
    body {
        font-size: 16px !important;
    }
    
    /* Prevent text size adjustment on iOS */
    * {
        -webkit-text-size-adjust: 100% !important;
        -moz-text-size-adjust: 100% !important;
        -ms-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }
    
    .arbeitsschutz-container {
        padding: 16px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important;
    }
    
    .arbeitsschutz-header {
        padding: 24px 18px !important;
        margin-bottom: 24px !important;
        border-radius: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .arbeitsschutz-header h1 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
        margin-bottom: 8px !important;
    }
    
    .arbeitsschutz-header p {
        font-size: 0.95rem !important;
        margin-top: 10px !important;
        line-height: 1.5 !important;
    }
    
    /* Accordion Mobile Styles */
    .accordion-section {
        margin-bottom: 16px !important;
        border-radius: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .accordion-header {
        padding: 20px 18px !important;
        min-height: 56px !important; /* Better touch target for mobile */
        -webkit-tap-highlight-color: rgba(0, 160, 210, 0.2) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .accordion-header:active {
        background: #d1e7f0 !important;
        transform: scale(0.98) !important;
    }
    
    .accordion-header:hover {
        padding-left: 20px !important;
        background: #e9ecef !important;
    }
    
    /* Disable hover effects on touch devices */
    @media (hover: none) {
        .accordion-header:hover {
            background: #f8f9fa !important;
            padding-left: 18px !important;
        }
        
        .highlight-box:hover {
            transform: none !important;
        }
        
        .contact-info:hover {
            transform: none !important;
        }
    }
    
    .accordion-header h2 {
        font-size: 1.3rem !important;
        line-height: 1.4 !important;
        padding-right: 12px !important;
        font-weight: 600 !important;
    }
    
    .accordion-icon {
        width: 22px !important;
        height: 22px !important;
        margin-left: 12px !important;
        flex-shrink: 0 !important;
    }
    
    .accordion-content {
        padding: 0 18px 20px 18px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Section Content Mobile */
    .section {
        padding: 0 !important;
        font-size: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .section h3 {
        font-size: 1.2rem !important;
        margin-top: 22px !important;
        margin-bottom: 10px !important;
        padding-bottom: 6px !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
    }
    
    .section p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 12px !important;
    }
    
    .section ul {
        margin: 14px 0 !important;
    }
    
    .section li {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 10px !important;
        padding-left: 28px !important;
    }
    
    .section li::before {
        font-size: 1.1em !important;
        left: 4px !important;
        top: -1px !important;
    }
    
    /* Highlight Boxes Mobile */
    .highlight-box {
        padding: 20px !important;
        margin: 20px 0 !important;
        border-radius: 8px !important;
        font-size: 0.95rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .highlight-box strong {
        font-size: 1.05rem !important;
        margin-bottom: 10px !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
    }
    
    .highlight-box p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    .highlight-box ul {
        margin-top: 10px !important;
    }
    
    .highlight-box li {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    /* Contact Info Mobile */
    .contact-info {
        padding: 20px !important;
        margin: 20px 0 !important;
        border-radius: 8px !important;
        font-size: 0.95rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .contact-info p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    .contact-info ul {
        margin: 12px 0 !important;
    }
    
    .contact-info li {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
        line-height: 1.6 !important;
    }
    
    /* Emergency Number Mobile */
    .emergency-number {
        font-size: 2.2rem !important;
        padding: 22px 18px !important;
        margin: 22px 0 !important;
        border-radius: 10px !important;
        letter-spacing: 2px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .emergency-number::before {
        font-size: 0.5em !important;
        margin-bottom: 8px !important;
    }
    
    /* Thank You Message Mobile */
    .thank-you-message {
        font-size: 0.95rem !important;
        margin-top: 20px !important;
        text-align: center !important;
        line-height: 1.6 !important;
    }
    
    /* Links Mobile */
    .contact-info a {
        word-break: break-word !important;
        display: inline-block !important;
        padding: 4px 0 !important;
        min-height: 44px !important; /* Better touch target */
        line-height: 1.6 !important;
        font-size: 0.95rem !important;
    }
    
    /* Better spacing for mobile lists */
    .contact-info ul li {
        padding-left: 0 !important;
    }
    
    .contact-info ul li::before {
        display: none !important;
    }
    
    /* Improve readability on mobile */
    .section strong {
        font-weight: 600 !important;
        font-size: 1rem !important;
    }
    
    .contact-info strong {
        font-size: 1rem !important;
        font-weight: 600 !important;
    }
    
    .contact-info-follow-up {
        font-size: 0.95rem !important;
        margin-top: 12px !important;
    }
    
    /* Hide "Fakultät für Informatik und Mathematik ©" on mobile */
    /* Hide the second list item (contains Fakultät text when not logged in) */
    div.header div.login ul li:nth-child(2) {
        display: none !important;
    }
    
    /* For logged-in users: hide all br tags (which removes Fakultät text line) */
    div.header div.login ul li br {
        display: none !important;
    }
    
    /* JavaScript will also hide li with only Fakultät text */
    div.header div.login ul li.hide-fakultat {
        display: none !important;
    }
    
    /* Ensure login/logout links remain visible */
    div.header div.login ul li:first-child {
        display: list-item !important;
    }
    
    div.header div.login ul li a {
        display: inline-block !important;
    }
    
    /* For logged-in users: show the second li (with username) but br tags are hidden */
    div.header div.login ul li:nth-child(2):has(br) {
        display: list-item !important;
    }
}

/* Extra Small Devices */
@media screen and (max-width: 480px) {
    html {
        font-size: 15px !important;
    }
    
    body {
        font-size: 15px !important;
    }
    
    .arbeitsschutz-container {
        padding: 14px !important;
    }
    
    .arbeitsschutz-header {
        padding: 22px 16px !important;
    }
    
    .arbeitsschutz-header h1 {
        font-size: 1.7rem !important;
        font-weight: 600 !important;
    }
    
    .arbeitsschutz-header p {
        font-size: 0.9rem !important;
    }
    
    .accordion-header {
        padding: 18px 16px !important;
        min-height: 52px !important;
    }
    
    .accordion-header h2 {
        font-size: 1.25rem !important;
        font-weight: 600 !important;
    }
    
    .accordion-content {
        padding: 0 16px 18px 16px !important;
    }
    
    .section h3 {
        font-size: 1.15rem !important;
        margin-top: 20px !important;
        font-weight: 600 !important;
    }
    
    .section p,
    .section li {
        font-size: 0.9rem !important;
    }
    
    .highlight-box,
    .contact-info {
        padding: 18px !important;
        margin: 18px 0 !important;
    }
    
    .highlight-box strong,
    .contact-info strong {
        font-size: 1rem !important;
    }
    
    .highlight-box p,
    .contact-info p {
        font-size: 0.9rem !important;
    }
    
    .emergency-number {
        font-size: 2rem !important;
        padding: 20px 16px !important;
        letter-spacing: 2px !important;
    }
    
    .accordion-icon {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Mobile Landscape Orientation */
@media screen and (max-width: 768px) and (orientation: landscape) {
    html {
        font-size: 19px !important;
    }
    
    body {
        font-size: 19px !important;
    }
    
    .arbeitsschutz-header {
        padding: 26px 22px !important;
    }
    
    .arbeitsschutz-header h1 {
        font-size: 2.2rem !important;
        font-weight: 600 !important;
    }
    
    .accordion-header {
        padding: 24px 22px !important;
        min-height: 64px !important;
    }
    
    .accordion-header h2 {
        font-size: 1.55rem !important;
        font-weight: 600 !important;
    }
    
    .section h3 {
        font-size: 1.4rem !important;
        font-weight: 600 !important;
        margin-top: 24px !important;
    }
    
    .accordion-content {
        padding: 0 22px 26px 22px !important;
    }
    
    .emergency-number {
        font-size: 3.2rem !important;
        padding: 28px 22px !important;
    }
}

/* Tablet Portrait */
@media (min-width: 481px) and (max-width: 768px) {
    .arbeitsschutz-container {
        padding: 16px;
    }
    
    .arbeitsschutz-header {
        padding: 28px 24px;
    }
    
    .accordion-header {
        padding: 20px 20px;
    }
    
    .accordion-content {
        padding: 0 20px 24px 20px;
    }
}

