:root {
    --card-bg: #181F2D;
    --gradient-color: #181F2D73;
}

body, html {
    overflow-x: hidden;
    scrollbar-gutter: stable;
    /* background-color: #161925 !important; */
}

section {
    width: 100vw;
    height: auto;
    font-family: 'Roboto', sans-serif;
}

.section-header {
    text-align: center;
    width: 45%;
    margin: 0 auto;
    margin-bottom: 64px;
}

.section-header h2{
    color: #FFF;
    font-size: 36px;
    line-height: 42px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.section-header p {
    color: #a2a2a2;
    font-size: 12px;
    font-weight: 400;
}

.hardware-showcase {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 7vw;
    margin-bottom: 120px;
}

.hard-categories {
    display: flex;
    gap: 40px;
    flex-direction: column;
    justify-content: center;
}

.hard-category {
    width: 450px;
    height: 100px;
    padding: 20px;
    background: var(--card-bg);
    border: solid 2px transparent;
    border-radius: 10px;
    display: flex;
    gap: 24px;
    text-align: left;
    align-items: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.hard-category.activecard {
    border: 2px solid #8aa6b8;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(138, 166, 184, 0.3);
}

.timer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #8aa6b8, #5d8499, #4a7085);
    transition: width linear;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 0 8px rgba(138, 166, 184, 0.4);
    overflow: hidden;
}

.timer-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.timer-bar.activecard::before {
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.timer-bar.activecard {
    animation: timerProgress 10s linear;
    box-shadow: 0 0 12px rgba(138, 166, 184, 0.6), 0 0 20px rgba(138, 166, 184, 0.3);
}

@keyframes timerProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

.hard-category:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(138, 166, 184, 0.3) !important;
    border: 2px solid #8aa6b8 !important;
}

.hard-category h4 {
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.hard-category p {
    font-size: 12px;
    line-height: 14px;
    font-weight: 300;
}

.hard-preview {
    height: 400px;
    width: 650px;
    border-radius: 10px;
    background: var(--gradient-color);
    overflow: hidden;
    position: relative;
}

.hard-default {
    height: 96%;
    margin: 2% auto;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.hard-default:hover{
    transform: scale(1.04) rotate(1deg);
}

.hard-preview .item {
    position: absolute;
    width: 100px;
    height: 100px;
    transition: all 0.5s ease-in-out, filter 0.8s ease-in-out, opacity 0.6s ease-in-out;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.7));
}

.hard-preview .item.activecard {
    filter: drop-shadow(0 0 15px rgba(138, 166, 184, 0.6)) brightness(1.2);
    z-index: 10;
    opacity: 1;
}

.hard-preview .item:not(.activecard) {
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8)) brightness(0.6);
    opacity: 0.7;
}

.info-section {
    position: absolute;
    top: 50%;
    transform: translate(4%, -50%);
    display: flex;
    align-items: center;
}

.light {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #293445;
    animation: lighteffect 2s infinite;
}

.info-section .bar {
    width: 50px;
    height: 2px;
    background: #8aa6b8;
}

.info-section .description {
    width: 250px;
    padding: 20px;
    background: var(--card-bg);
    border: 2px solid #8aa6b8;
    border-radius: 10px;
}

.info-section .description p {
    color:#ffffff;
    font-size: 12px;
    line-height: 14px;
    font-weight: 300;
}

p#s0 {
    font-weight: 800;
    line-height: 16px;
}

.schema-photo {
    width: 70%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#p1 {
    animation: cardCycle 15s infinite;
}

#p2 {
    animation: cardCycle 15s infinite;
    animation-delay: -12.86s;
}

#p3 {
    animation: cardCycle 15s infinite;
    animation-delay: -10.71s;
}

#p4 {
    animation: cardCycle 15s infinite;
    animation-delay: -8.57s;
}

#p5 {
    animation: cardCycle 15s infinite;
    animation-delay: -6.43s;
}

#p6 {
    animation: cardCycle 15s infinite;
    animation-delay: -4.29s;
}

#p7 {
    animation: cardCycle 15s infinite;
    animation-delay: -2.14s;
}

.hardware-characteristics {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 4vw;
    margin-bottom: 120px;
}

.hardware-characteristic {
    width: 250px;
    height: 250px;
    padding: 20px;
    text-align: center;
    background: var(--card-bg);
    color: #ffffff;
    font-size: 12px;
    border: 2px solid transparent;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border 0.3s ease-in-out;
    cursor: pointer;
    font-weight: 400;
    overflow: hidden;
}

.hardware-characteristic .title {
    font-size: 16px;
    font-weight: 600;
}

.hardware-characteristic img{
    width: 80%;
    margin: 0 auto;
}

#cc1:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(184, 166, 138, 0.3) !important;
    border: 2px solid #b8a68a !important;
}

#cc2:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(58, 120, 152, 0.3) !important;
    border: 2px solid #3a7898 !important;
}

#cc3:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(189, 112, 113, 0.3) !important;
    border: 2px solid #bd7071 !important;
}

#cc4:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(138, 184, 153, 0.3) !important;
    border: 2px solid #8ab899 !important;
}

.hardware-characteristic .illustration {
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
    max-width: 100%;
    height: auto;
}

.hardware-characteristic:hover .illustration {
    transform: scale(1.03);
    filter: brightness(1.1) contrast(1.05);
}

@keyframes cardCycle {
    0% {
        opacity: 0;
        top: calc(20px + 50%);
        left: calc(20px + 50%);
        z-index: 1;
        transform: translate(-50%, -50%);
    }
    
    14.3% {
        opacity: 25%;
        top: calc(20px + 50%);
        left: calc(20px + 50%);
        z-index: 1;
        transform: translate(-50%, -50%);
    }
    
    28.6% {
        top: calc(10px + 50%);
        left: calc(10px + 50%);
        opacity: 50%;
        z-index: 2;
        transform: translate(-50%, -50%);
    }
    
    42.9% {
        top: 50%;
        left: 50%;
        opacity: 1;
        z-index: 3;
        transform: translate(-50%, -50%);
    }
    
    57.1% {
        top: -50%;
        opacity: 0;
        z-index: 3;
        transform: translate(-50%, -150%);
    }
    
    85.7% {
        top: calc(30px + 50%);
        left: calc(30px + 50%);
        opacity: 0;
        z-index: 1;
        transform: translate(-50%, -50%);
    }
    
    100% {
        opacity: 0;
        top: calc(20px + 50%);
        left: calc(20px + 50%);
        z-index: 1;
        transform: translate(-50%, -50%);
    }
}

.os-challenges {
    width: 85%;
    color: #ffffff;
    margin: 0 auto 100px;
}

.ctf-challs {
    width: 100%;
}

.chall-header {
    font-size: 12px;
    font-weight: 300;
    color: #a2a2a2;
    margin-bottom: 30px;
}

.chall-header h3 {
    color: #ffffff;
    font-size: 24px;
    line-height: 30px;
    font-weight: 600;
}

.ctf-challs-list {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 2vw;
}

.ctf-chall {
    position: relative;
    overflow: hidden;
    width: 460px;
    padding: 20px;
    border-radius: 10px;
    background: var(--card-bg);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border 0.3s ease-in-out;
    cursor: pointer;
    border: 2px solid transparent;
}

.ctf-chall:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(138, 166, 184, 0.2) !important;
    border: 2px solid #8aa6b8 !important;
}

.ctf-chall-header {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    align-items: flex-start;
    margin-bottom: 3px;
    gap: 8px;
}

.ctf-chall-header .title {
    z-index: 3;
    margin: 0;
}

.ctf-chall-header .category {
    background: #31376c;
    font-size: 10px;
    height: 20px;
    line-height: 11px;
    padding: 5px 12px;
    border-radius: 50px;
    z-index: 3;
}

#ctfc2 {
    background: #316c48;
}

#ctfc3 {
    background: #6c3131;
}

#ctfc4 {
    background: #6c5a31;
}

.ctf-chall .description {
    width: 60%;
    font-size: 12px;
    color: #a2a2a2;
    font-weight: 400;
    margin-bottom: 36px;
    position: relative;
    z-index: 3;
}

.ctf-chall .difficulty, .ctf-chall .time {
    display: flex;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
}

.ctf-chall .difficulty {
    margin-bottom: 3px;
}

#ctfd1 {
    color: #4add7f;
}

#ctfd1 img {
    filter: invert(81%) sepia(36%) saturate(809%) hue-rotate(77deg) brightness(93%) contrast(85%);
}

#ctfd2 {
    color: #ddb14a;
}

#ctfd2 img {
    filter: invert(68%) sepia(49%) saturate(519%) hue-rotate(4deg) brightness(99%) contrast(83%);
}

#ctfd3 {
    color: #dd4a4a;
}

#ctfd3 img {
    filter: invert(31%) sepia(61%) saturate(986%) hue-rotate(320deg) brightness(113%) contrast(95%);
    z-index: 3;
}

.ctf-chall::before {
    content: '';
    position: absolute;
    width: 55%;
    height: 100%;
    top: 0;
    right: 0;
    background:linear-gradient(-90deg, var(--gradient-color), var(--card-bg));
    z-index: 2;
}

.ctf-chall::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    right: 0;
    background-image: url(../img/open-source/challenges/1.jpg);
    background-size: cover;
    background-position: center;
    z-index: 1;
    clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 100%);
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

.ctf-chall:hover::after {
    transform: scale(1.1) !important;
    filter: brightness(1.2) contrast(1.1) !important;
}

#ctfch2::after {
    background-image: url(../img/open-source/challenges/2.jpg);
}

#ctfch3::after {
    background-image: url(../img/open-source/challenges/3.jpg);
}

#ctfch4::after {
    background-image: url(../img/open-source/challenges/4.jpg);
}

.view-all-ctf {
    position: relative;
    width: fit-content;
    margin-top: 12px;
    display: flex;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 64px;
}

.view-all-ctf::before {
    content: '';
    width: 0%;
    height: 1px;
    background: #ffffff;
    border-radius: 1px;
    position: absolute;
    bottom: 0;
    left: 0;
    transition: all 0.6s ease-in-out;
}

.view-all-ctf:hover::before {
    width: 100%;
    transform: translateX(10px);
}

.view-all-ctf p {
    transition: all 0.5s;
}

.view-all-ctf:hover p {
    transform: translate(10px,0);
}

.view-all-ctf img {
    transition: all 0.8s;
}

.view-all-ctf:hover img{
    transform: translate(10px,0);
}

.escape-game-container {
    position: relative;
    width: 100%;
    max-width: 1300px;
    background: var(--card-bg);
    height: auto;
    padding: 20px 20px 32px 20px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 12px;
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border 0.3s ease-in-out;
    margin-bottom: 64px;
    cursor: pointer;
    border: 2px solid transparent;
}

.escape-game-container:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(221, 177, 74, 0.3) !important;
    border: 2px solid #ddb14a !important;
}

.escape-game-container::before {
    content: '';
    position: absolute;
    width: 55%;
    height: 100%;
    top: 0;
    right: 0;
    background:linear-gradient(-90deg, var(--gradient-color), var(--card-bg));
    z-index: 2;
}

.escape-game-container::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    right: 0;
    background-image: url(../img/open-source/challenges/escape-game.jpg);
    background-size: cover;
    background-position: center;
    z-index: 1;
    clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 100%);
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

.escape-game-container:hover::after {
    transform: scale(1.05) !important;
    filter: brightness(1.15) contrast(1.1) !important;
}

.escape-game-container .title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
    position: relative;
    z-index: 3;
}

.escape-game-container .subtitle {
    font-weight: 400;
    color: #a2a2a2;
    margin-bottom: 30px;
    position: relative;
    z-index: 3;
}

.escape-game-container .context-t {
    color: #ffffff;
    margin-bottom: 2px;
}

.escape-game-container .context {
    color: #a2a2a2;
    font-weight: 400;
    margin-bottom: 30px;
    width: 57%;
    position: relative;
    z-index: 3;
}

.escape-game-container .sectors-t {
    color: #ffffff;
}

.escape-game .sectors {
    margin-top: 8px;
    display: flex;
    gap: 12px;
}

.escape-game .sector {
    background: #6c6a31;
    height: 22px;
    line-height: 12px;
    padding: 4px 20px;
    border-radius: 50px;
    z-index: 3;
}

#se2 {
    background: #316c51;
}

#se3 {
    background: #6c3131;
}

#se4 {
    background: #31376c;
}

.escape-game .difficulty, .escape-game .time {
    display: flex;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
}

.escape-game .difficulty {
    color: #ddb14a;
    margin-top: 40px;
    margin-bottom: 3px;
}

.escape-game .difficulty img {
    filter: invert(68%) sepia(49%) saturate(519%) hue-rotate(4deg) brightness(99%) contrast(83%);
}

.escape-game .time {
    margin-bottom: 20px;
}

.escape-cta-btn {
    padding: 8px 24px;
    background: #242a37;
    border-radius: 20px;
    border: 1px solid #8aa6b8;
    transition: transform 0.2s ease-in-out,box-shadow 0.4s;
}

.escape-cta-btn:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 0 14px 2px #8aa6b873 !important;
}

.workshops-list {
    display: flex;
    gap: 3vw;
}

.workshop {
    width: 380px;
    overflow: hidden;
    border-radius: 10px;
    font-weight: 500;
    background: var(--card-bg);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border 0.3s ease-in-out;
    border: 2px solid transparent;
    cursor: pointer;
}

.workshop:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(243, 44, 85, 0.3) !important;
    transform: scale(1.03) !important;
    border: 2px solid #f32c55 !important;
}

.workshop .banner {
    height: 80px;
    opacity: 0.75;
    box-shadow: 0 5px 15px #bb284abb;
    transition: opacity 0.2s ease-in-out, box-shadow 0.3s;
}

.workshop:hover .banner{
    opacity: 1;
}

.workshop .title {
    font-size: 16px;
    margin: 20px;
    margin-bottom: 16px;
}

.workshop .description {
    font-size: 12px;
    font-weight: 400;
    color: #a2a2a2;
    margin: 0 20px 80px 20px;
    line-height: 18px;
}

.workshop .datas {
    display: flex;
    margin: 0 20px 20px 20px;
    gap: 20px;
}

.workshop div {
    display: flex;
    gap: 10px;
    font-size: 12px;
}

.time-bar {
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, #8aa6b8, #ddb14a);
    transition: width 0s;
    position: absolute;
    bottom: 0;
    left: 0;
}

.hardware-card.activecard .time-bar {
    animation: fillBar 10s linear forwards;
}

@keyframes fillBar {
    from { width: 0; }
    to { width: 100%; }
}

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


@media (max-width: 1250px) {
    .hardware-showcase {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .hard-categories {
        align-items: center;
    }
    
    .hard-category {
        max-width: 450px;
        width: 100%;
    }
    
    .hard-preview {
        width: 100%;
        max-width: 650px;
    }
}

@media (max-width: 1250px) {
    .hardware-characteristics {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2vw;
    }
    
    .hardware-characteristic {
        width: calc(50% - 2vw);
        min-width: 250px;
        max-width: 300px;
    }
}

@media (max-width: 1000px) {
    .escape-game-container::before {
        display: none;
    }
    
    .escape-game-container::after {
        width: 100%;
        height: 150px;
        top: 0;
        left: 0;
        clip-path: none;
        background-position: center;
    }
    
    .escape-game-container {
        padding-top: 170px;
    }
    
    .escape-game-container .context {
        width: 100%;
    }
}

@media (max-width: 750px) {
    .hardware-characteristics {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .hardware-characteristic {
        width: 100%;
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .section-header {
        width: 90%;
    }
    
    .section-header h2 {
        font-size: 28px;
        line-height: 34px;
    }
    

    .ctf-challs-list {
        flex-direction: column;
        align-items: center;
    }
    
    .ctf-chall {
        width: 100%;
        max-width: 460px;
    }
    
    .workshops-list {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .workshop {
        width: 100%;
        max-width: 380px;
    }
    
    .escape-game-container {
        margin: 0 20px 64px 20px;
    }
    
    .os-challenges {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 24px;
        line-height: 30px;
    }
    
    .hard-category {
        flex-direction: column;
        text-align: center;
        height: auto;
        padding: 20px;
    }
    
    .hard-category img {
        margin-bottom: 10px;
    }
    
    .escape-game .sectors {
        flex-wrap: wrap;
    }
    
    .escape-game-container {
        margin: 0 10px 64px 10px;
        padding: 170px 15px 20px 15px;
    }
}

::-webkit-scrollbar-track
{
	border-radius: 10px;
	background-color: #101828;
}

::-webkit-scrollbar
{
	width: 10px;
	background-color: #101828;
}

::-webkit-scrollbar-thumb
{
	border-radius: 10px;
	background-color: #555;
}
