/* ==========================================
   MITMACHEN
========================================== */

.join-header{
    width:100%;
    margin:0;
    padding:54px 0 44px;
    background:var(--background);
}

.join-header-inner{
    width:min(1500px,92%);
    margin:0 auto;
}

.join-kicker{
    margin:0 0 10px;
    display:flex;
    align-items:center;
    gap:9px;
    color:#aebbc8;
    font-size:12px;
    font-weight:700;
    line-height:1.4;
    letter-spacing:0;
    text-transform:uppercase;
}

.join-kicker i{
    color:#25d366;
    font-size:16px;
}

.join-header h1{
    max-width:900px;
    margin:0;
    font-size:58px;
    line-height:1;
    letter-spacing:0;
}

.join-intro{
    max-width:830px;
    margin:13px 0 0;
    color:#aebbc8;
    font-size:17px;
    line-height:1.65;
}

/* ==========================================
   EINSATZHINWEISE-LINK
========================================== */

.join-guidance{
    width:min(1600px,92%);
    margin:0 auto 46px;
    padding:24px 26px;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:20px;
    border-top:1px solid rgba(0,157,255,.34);
    border-bottom:1px solid rgba(215,25,32,.3);
    background:rgba(255,255,255,.018);
}

.join-guidance-icon{
    width:48px;
    height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--blue);
    font-size:22px;
}

.join-guidance-copy{
    min-width:0;
}

.join-guidance-copy p{
    margin:0 0 4px;
    color:var(--blue);
    font-size:11px;
    font-weight:700;
    line-height:1.3;
    text-transform:uppercase;
}

.join-guidance-copy h2{
    margin:0 0 5px;
    font-size:31px;
    line-height:1.05;
    letter-spacing:0;
}

.join-guidance-copy span{
    display:block;
    max-width:760px;
    color:#aebbc8;
    font-size:14px;
    line-height:1.6;
}

.join-guidance-button{
    min-height:46px;
    padding:9px 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    border:1px solid rgba(0,157,255,.48);
    border-radius:6px;
    background:rgba(0,157,255,.09);
    color:#dcefff;
    font-size:13px;
    font-weight:700;
    line-height:1.3;
    text-decoration:none;
    transition:background .25s ease,border-color .25s ease,color .25s ease,transform .25s ease;
}

.join-guidance-button i{
    color:var(--blue);
    transition:color .25s ease,transform .25s ease;
}

.join-guidance-button:hover,
.join-guidance-button:focus-visible{
    border-color:var(--red);
    outline:2px solid rgba(215,25,32,.72);
    outline-offset:-2px;
    background:rgba(215,25,32,.09);
    color:#ffffff;
    transform:translateY(-2px);
}

.join-guidance-button:hover i,
.join-guidance-button:focus-visible i{
    color:#ffffff;
    transform:translateX(3px);
}

/* ==========================================
   LAYOUT
========================================== */

.join-wrapper{
    width:min(1600px,92%);
    margin:0 auto 82px;
    display:grid;
    grid-template-columns:minmax(320px,420px) minmax(0,1fr);
    gap:46px;
    align-items:start;
}

/* ==========================================
   REGELBILD
========================================== */

.rules-image{
    position:sticky;
    top:112px;
}

.rules-image img{
    width:100%;
    height:auto;
    border:2px solid rgba(0,157,255,.6);
    border-radius:8px;
    cursor:pointer;
    box-shadow:0 20px 42px rgba(0,0,0,.32);
    transition:border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.rules-image img:hover,
.rules-image img:focus-visible{
    border-color:var(--red);
    outline:2px solid rgba(215,25,32,.8);
    outline-offset:-2px;
    box-shadow:0 24px 54px rgba(215,25,32,.18);
    transform:translateY(-3px);
}

.rules-image small{
    margin-top:13px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    color:#95a5b9;
}

/* ==========================================
   HINWEIS
========================================== */

.notice{
    margin-bottom:26px;
    padding:21px 22px;
    border:1px solid rgba(0,157,255,.4);
    border-left:3px solid var(--blue);
    border-radius:8px;
    background:rgba(0,157,255,.045);
}

.notice h3{
    margin-bottom:11px;
    display:flex;
    align-items:center;
    gap:9px;
}

.notice h3 i{
    color:var(--blue);
}

.notice p{
    color:#cbd4df;
    line-height:1.7;
}

.notice p + p{
    margin-top:10px;
}

/* ==========================================
   GRUPPEN
========================================== */

.groups h2{
    margin:0 0 24px;
    display:flex;
    align-items:center;
    gap:12px;
    font-size:42px;
    line-height:1;
    letter-spacing:0;
}

.groups h2 i{
    color:#25d366;
    font-size:34px;
}

.group-card{
    min-height:122px;
    margin-bottom:16px;
    padding:22px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:24px;
    border:2px solid rgba(37,211,102,.58);
    border-radius:8px;
    background:#111822;
    transition:border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.group-card:hover,
.group-card:focus-within{
    border-color:var(--red);
    outline:2px solid rgba(215,25,32,.82);
    outline-offset:-2px;
    box-shadow:
        0 0 0 2px rgba(215,25,32,.16),
        0 22px 48px rgba(215,25,32,.16);
    transform:translateY(-3px);
}

.group-info{
    min-width:0;
}

.group-info h3{
    margin:0 0 8px;
    font-size:26px;
    line-height:1.2;
    letter-spacing:0;
}

.group-info p{
    color:#aeb9c6;
    font-size:15px;
    line-height:1.6;
}

/* ==========================================
   BUTTONS
========================================== */

.join-button,
#joinWhatsapp{
    min-height:44px;
    padding:8px 14px;
    display:inline-flex;
    align-items:center;
    justify-content:flex-start;
    gap:10px;
    border:1px solid rgba(37,211,102,.38);
    border-radius:6px;
    background:rgba(37,211,102,.08);
    color:#e5ffed;
    font-size:13px;
    font-weight:700;
    line-height:1.3;
    cursor:pointer;
    touch-action:manipulation;
    transition:background .25s ease, border-color .25s ease, color .25s ease;
}

.join-button{
    width:210px;
}

.join-button .fa-whatsapp,
#joinWhatsapp .fa-whatsapp{
    color:#25d366;
}

.join-button .fa-arrow-right,
#joinWhatsapp .fa-arrow-right{
    margin-left:auto;
    transition:transform .25s ease;
}

.join-button:hover,
.join-button:focus-visible,
#joinWhatsapp:not(:disabled):hover,
#joinWhatsapp:not(:disabled):focus-visible{
    border-color:var(--red);
    outline:2px solid rgba(215,25,32,.72);
    outline-offset:-2px;
    background:rgba(215,25,32,.09);
    color:#ffffff;
}

.join-button:hover .fa-arrow-right,
.join-button:focus-visible .fa-arrow-right,
#joinWhatsapp:not(:disabled):hover .fa-arrow-right,
#joinWhatsapp:not(:disabled):focus-visible .fa-arrow-right{
    transform:translateX(3px);
}

/* ==========================================
   MODAL
========================================== */

.modal{
    position:fixed;
    inset:0;
    z-index:9999;
    padding:20px;
    display:flex;
    justify-content:center;
    align-items:center;
    visibility:hidden;
    opacity:0;
    background:rgba(0,0,0,.84);
    transition:opacity .25s ease, visibility .25s ease;
}

.modal.show{
    visibility:visible;
    opacity:1;
}

.modal-box{
    position:relative;
    width:min(850px,100%);
    max-height:90vh;
    max-height:90dvh;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    border:2px solid rgba(37,211,102,.5);
    border-radius:8px;
    background:#111822;
    box-shadow:0 28px 80px rgba(0,0,0,.55);
    animation:popup .3s ease;
}

.modal-box h2{
    margin:0;
    padding:22px 72px 22px 26px;
    display:flex;
    align-items:center;
    gap:11px;
    border-bottom:1px solid rgba(255,255,255,.07);
    background:#0b111a;
}

.modal-box h2 i{
    color:#25d366;
}

.close{
    position:absolute;
    top:11px;
    right:13px;
    z-index:2;
    width:44px;
    height:44px;
    border:1px solid transparent;
    border-radius:6px;
    background:transparent;
    color:#ffffff;
    font-size:32px;
    line-height:1;
    cursor:pointer;
    transition:background .25s ease, border-color .25s ease;
}

.close:hover,
.close:focus-visible{
    border-color:rgba(215,25,32,.7);
    outline:none;
    background:rgba(215,25,32,.12);
}

.rules{
    overflow:auto;
    padding:27px;
}

.rules h3{
    margin:26px 0 10px;
}

.rules h3:first-child{
    margin-top:0;
}

.rules p,
.rules li{
    color:#cbd4df;
    line-height:1.7;
}

.rules p + p{
    margin-top:12px;
}

.rules ol{
    padding-left:22px;
}

.rules li{
    margin-bottom:15px;
}

.rules label{
    margin-top:12px;
    padding:12px 14px;
    display:flex;
    align-items:flex-start;
    gap:10px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:6px;
    background:rgba(255,255,255,.025);
    line-height:1.5;
    cursor:pointer;
}

.rules input{
    margin-top:3px;
    flex:0 0 auto;
    accent-color:#25d366;
}

#joinWhatsapp{
    width:100%;
    min-height:48px;
    margin-top:20px;
}

#joinWhatsapp:disabled{
    border-color:rgba(255,255,255,.1);
    background:rgba(255,255,255,.045);
    color:#77818d;
    cursor:not-allowed;
}

#joinWhatsapp:disabled .fa-whatsapp{
    color:#77818d;
}

/* ==========================================
   SUCCESS
========================================== */

.success-box{
    position:fixed;
    inset:0;
    z-index:11000;
    display:flex;
    justify-content:center;
    align-items:center;
    visibility:hidden;
    opacity:0;
    background:rgba(0,0,0,.88);
    transition:opacity .25s ease, visibility .25s ease;
}

.success-box.show{
    visibility:visible;
    opacity:1;
}

.success-content{
    width:min(420px,92%);
    padding:42px 34px;
    border:2px solid rgba(37,211,102,.58);
    border-radius:8px;
    background:#111822;
    text-align:center;
}

.success-content i{
    color:#25d366;
    font-size:62px;
}

.success-content h2{
    margin-top:18px;
}

.success-content p{
    margin-top:12px;
    color:#c6cfdb;
    line-height:1.6;
}

/* ==========================================
   LIGHTBOX
========================================== */

.lightbox{
    position:fixed;
    inset:0;
    z-index:12000;
    display:block;
    visibility:hidden;
    opacity:0;
    background:rgba(0,0,0,.94);
    transition:opacity .25s ease, visibility .25s ease;
}

.lightbox.show{
    visibility:visible;
    opacity:1;
}

.lightbox-toolbar{
    position:absolute;
    top:18px;
    left:50%;
    z-index:3;
    padding:5px;
    display:flex;
    align-items:center;
    gap:5px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:8px;
    background:rgba(6,10,16,.88);
    box-shadow:0 12px 30px rgba(0,0,0,.38);
    transform:translateX(-50%);
}

.lightbox-toolbar button,
#closeLightbox{
    width:44px;
    height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid transparent;
    border-radius:6px;
    background:transparent;
    color:#ffffff;
    font-size:16px;
    cursor:pointer;
    touch-action:manipulation;
    transition:background .2s ease,border-color .2s ease,color .2s ease;
}

.lightbox-toolbar button:hover,
.lightbox-toolbar button:focus-visible,
#closeLightbox:hover,
#closeLightbox:focus-visible{
    border-color:var(--red);
    outline:none;
    background:rgba(215,25,32,.15);
}

.lightbox-toolbar button:disabled{
    border-color:transparent;
    background:transparent;
    color:#66717e;
    cursor:not-allowed;
}

#zoomLevel{
    width:62px;
    color:#dce5ef;
    font-size:13px;
    font-weight:700;
    line-height:1;
    text-align:center;
}

.lightbox-viewport{
    position:absolute;
    inset:0;
    overflow:auto;
    padding:82px 18px 20px;
    overscroll-behavior:contain;
    scrollbar-color:var(--blue) rgba(255,255,255,.05);
    touch-action:none;
}

.lightbox-stage{
    width:max-content;
    min-width:100%;
    height:max-content;
    min-height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}

.lightbox-stage img{
    width:var(--zoom-width,auto);
    height:var(--zoom-height,min(1492px,calc(100dvh - 112px)));
    max-width:none;
    max-height:none;
    flex:0 0 auto;
    object-fit:contain;
    user-select:none;
    -webkit-user-drag:none;
    cursor:zoom-in;
}

.lightbox.is-zoomed .lightbox-stage img{
    cursor:grab;
}

.lightbox.is-dragging .lightbox-stage img{
    cursor:grabbing;
}

#closeLightbox{
    position:absolute;
    top:18px;
    right:18px;
    z-index:3;
    width:48px;
    height:48px;
    border:1px solid rgba(255,255,255,.18);
    background:rgba(6,10,16,.88);
    font-size:20px;
    box-shadow:0 12px 30px rgba(0,0,0,.38);
}

/* ==========================================
   ANIMATION
========================================== */

@keyframes popup{
    from{
        transform:translateY(22px);
        opacity:0;
    }

    to{
        transform:translateY(0);
        opacity:1;
    }
}

/* ==========================================
   RESPONSIVE
========================================== */

@media(max-width:1100px){
    .join-wrapper{
        grid-template-columns:minmax(300px,360px) minmax(0,1fr);
        gap:34px;
    }

    .group-card{
        grid-template-columns:1fr;
        gap:18px;
    }

    .join-button{
        width:100%;
    }
}

@media(max-width:900px){
    .join-guidance{
        width:min(92%,720px);
        grid-template-columns:auto minmax(0,1fr);
    }

    .join-guidance-button{
        grid-column:2;
        width:max-content;
    }

    .join-wrapper{
        width:min(92%,720px);
        grid-template-columns:1fr;
        gap:34px;
    }

    .rules-image{
        position:relative;
        top:auto;
        width:min(100%,480px);
        margin:0 auto;
    }
}

@media(max-width:600px){
    .join-header{
        padding:38px 0 32px;
    }

    .join-header-inner,
    .join-guidance,
    .join-wrapper{
        width:calc(100% - 24px);
    }

    .join-header h1{
        font-size:42px;
    }

    .join-intro{
        font-size:15px;
        line-height:1.6;
    }

    .join-guidance{
        padding:22px 20px;
        grid-template-columns:1fr;
    }

    .join-guidance-icon{
        width:auto;
        height:auto;
        justify-content:flex-start;
    }

    .join-guidance-button{
        grid-column:1;
        width:100%;
    }

    .join-wrapper{
        margin-bottom:60px;
    }

    .groups h2{
        font-size:34px;
    }

    .group-card{
        min-height:0;
        padding:20px;
    }

    .group-info h3{
        font-size:24px;
    }

    .modal{
        padding:8px;
    }

    .modal-box{
        max-height:94vh;
        max-height:94dvh;
    }

    .modal-box h2{
        padding:19px 62px 19px 18px;
        font-size:27px;
    }

    .rules{
        padding:19px;
    }

    .rules p,
    .rules li{
        line-height:1.6;
    }

    .success-content{
        width:calc(100% - 24px);
        padding:32px 22px;
    }

    .lightbox-viewport{
        padding:76px 12px 14px;
    }
}

@media(max-width:420px){
    .join-header h1{
        font-size:36px;
    }

    .groups h2{
        font-size:30px;
    }

    .group-info h3{
        font-size:22px;
    }

    .lightbox-toolbar{
        top:12px;
        left:12px;
        transform:none;
    }

    .lightbox-toolbar button{
        width:40px;
        height:40px;
    }

    #zoomLevel{
        width:50px;
        font-size:12px;
    }

    #closeLightbox{
        top:12px;
        right:12px;
        width:44px;
        height:44px;
    }
}

@media(hover:none){
    .rules-image img:hover,
    .group-card:hover{
        transform:none;
    }

    .join-guidance-button:hover{
        transform:none;
    }
}
