* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.main-layout {
    margin-bottom: 1rem !important;
}
.main-layout p {
    font-size: 0.95rem;
}

/* BASE — Mobile */
h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-violet);
    text-align: center;
    margin: 1rem 0;
    position: relative;
    z-index: 1;
}

.subtitle {
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-golden);
    text-align: center;
    margin: 1rem 0 0.6rem;
    position: relative;
    padding-bottom: 0.4rem;
    z-index: 1;
}

.wrapper {
    width: 95%;
    margin: 0 auto 1.5rem;
    max-width: 55rem;
    position: relative;
    z-index: 1;
}

.cols {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

/* Mobile: 1 column */
.col {
    width: 100%;
    margin: 0;
    cursor: pointer;
    flex: 0 1 auto;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.col:nth-child(1) {
    animation-delay: 0.02s;
}
.col:nth-child(2) {
    animation-delay: 0.04s;
}
.col:nth-child(3) {
    animation-delay: 0.06s;
}
.col:nth-child(4) {
    animation-delay: 0.08s;
}
.col:nth-child(5) {
    animation-delay: 0.1s;
}
.col:nth-child(6) {
    animation-delay: 0.12s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.front,
.back {
    background-size: cover;
    box-shadow: 0 8px 20px 0 rgba(251, 146, 60, 0.4);
    border-radius: 15px;
    background-position: center;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    backface-visibility: hidden;
    text-align: center;
    min-height: 150px;
    height: 150px;
    color: #fff;
    font-size: 0.95rem;
    border: 2px solid var(--text-golden);
}

.back {
    background: #1c0a76 !important;
    box-shadow:
        0 8px 20px 0 rgba(251, 146, 60, 0.5),
        inset 0 0 40px rgba(251, 191, 36, 0.2);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: rotateY(180deg);
    transform-style: preserve-3d;
}

.front:after {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    content: "";
    display: block;
    opacity: 0.4;
    background: linear-gradient(
        135deg,
        rgba(10, 17, 40, 0.8) 0%,
        rgba(30, 58, 138, 0.7) 100%
    );
    backface-visibility: hidden;
    border-radius: 15px;
}

.container:hover .front,
.container:hover .back {
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.inner {
    transform: translateY(-50%) translateZ(60px) scale(0.94);
    top: 50%;
    position: absolute;
    left: 0;
    width: 100%;
    padding: 0.8rem;
    box-sizing: border-box;
    outline: 1px solid transparent;
    perspective: inherit;
    z-index: 2;
}

.container .front {
    transform: rotateY(0deg);
    transform-style: preserve-3d;
}
.container:hover .back {
    transform: rotateY(0deg);
    transform-style: preserve-3d;
}
.container:hover .front {
    transform: rotateY(-180deg);
    transform-style: preserve-3d;
}

.front .inner p {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    position: relative;
    color: var(--text-golden);
    font-weight: 600;
}

.front .inner p:after {
    content: "";
    width: 2.5rem;
    height: 2px;
    position: absolute;
    display: block;
    left: 0;
    right: 0;
    margin: 0 auto;
    bottom: -0.3rem;
}

.front .inner span {
    color: var(--text-orange);
    font-family: var(--font-text);
    font-weight: 400;
    text-shadow: 0 0 10px rgba(251, 146, 60, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.back .inner p {
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--text-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.col:hover .front,
.col:hover .back {
    box-shadow:
        0 12px 30px 0 rgba(251, 146, 60, 0.6),
        0 0 40px rgba(251, 191, 36, 0.4);
}

.wrapper .row {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
    justify-content: center;
}

.col:nth-last-child(1):nth-child(odd),
.col:nth-last-child(2):nth-child(odd):nth-last-child(2n + 2) {
    margin-left: auto;
    margin-right: auto;
}

br {
    display: none;
}

/* 2 colums — min-width: 32rem */
@media (min-width: 32rem) {
    .col {
        width: calc(50% - 1rem);
    }
    h1 {
        font-size: 1.5rem;
    }
    h2 {
        font-size: 1.1rem;
    }
}

/* 3 columns — min-width: 48rem */
@media (min-width: 48rem) {
    .col {
        width: calc(33.333% - 1rem);
    }
    h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.3rem;
    }
}
