/* =====================================================
   FHL HOME OVERLAY
===================================================== */

.fhl-home-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.fhl-home-overlay.is-open {
    display: flex;
}

/* =====================================================
   BACKDROP
===================================================== */

.fhl-home-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.70);
}

/* =====================================================
   CONTAINER
===================================================== */

.fhl-home-overlay-container {
    position: relative;
    width: min(1500px, calc(100% - 60px));
    max-height: calc(100vh - 40px);

    background: #0f0f0f;

    border-radius: 18px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .30);

    overflow: hidden;

    display: flex;
    flex-direction: column;

    z-index: 1;
}

/* =====================================================
   CLOSE
===================================================== */

.fhl-home-overlay-close {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

/* =====================================================
   HEADER
===================================================== */

.fhl-home-overlay-header {
    padding: 28px 36px;
    border-bottom: 1px solid #dfe3e8;
}

/* =====================================================
   BODY
===================================================== */

.fhl-home-overlay-body {
    flex: 1;
    padding: 36px;
    overflow-y: auto;
}

/* =====================================================
   FOOTER
===================================================== */

.fhl-home-overlay-footer {
    padding: 24px 36px;
    border-top: 1px solid #dfe3e8;
}

/* =====================================================
   OVERLAY WORKSPACE
===================================================== */

.fhl-overlay-workspace {
    width: 100%;
}

.fhl-overlay-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
}

.fhl-overlay-sidebar {
    flex: 0 0 280px;
    width: 280px;
}

.fhl-overlay-content {
    flex: 1;
    min-width: 0;
}


/* =====================================================
   COMPETITION THEME
===================================================== */

.fhl-home-competition-container {
    background: #070707;
    border: 1px solid rgba(212, 175, 55, .7);
}

.fhl-home-competition-container .fhl-home-overlay-header,
.fhl-home-competition-container .fhl-home-overlay-footer {
    display: none;
}

.fhl-home-competition-container .fhl-home-overlay-body {
    padding: 0;
    background: #070707;
}

/* =====================================================
   COMPETITION WORKSPACE CONTENT
===================================================== */

.fh-league-page {
    width: 100%;
}


/* =====================================================
   LEAGUE LOGO
===================================================== */

.fh-league-logo {
    display: none;
}

.fh-league-main {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 560px;
}

.fh-league-brand {
    position: relative;
    flex: 0 0 34%;
    min-height: 560px;
    background: #070707;
    overflow: hidden;
    padding: 0;
}

.fh-league-brand img {
    display: block;
    width: calc(100% - 42px);
    height: 100%;
    max-width: none;
    margin-left: 42px;
    object-fit: cover;
    object-position: center top;
}

.fh-league-brand::before,
.fh-league-brand::after {
    position: absolute;
    left: 10px;
    z-index: 1;
    color: rgba(255,255,255,.78);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.fh-league-brand::before {
    content: "US CATANZARO  ·  1929 – OGGI";
    top: 22px;
}

.fh-league-brand::after {
    content: "STORIA   PASSIONE   TATTICA   MANAGERIALE";
    bottom: 22px;
}

.fh-league-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 28px 28px 18px;
    background:
        radial-gradient(ellipse at 80% 0%, rgba(120, 24, 24, .45), transparent 55%),
        linear-gradient(180deg, #1a0c10 0%, #0c0c0c 42%, #070707 100%);
}

.fh-league-formula {
    flex: 1;
    padding: 0;
    background: transparent;
}

.fh-league-formula::before {
    content: "FANTASY HISTORY LEGENDS";
    display: block;
    margin-bottom: 8px;
    color: #e6c56a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .34em;
}

.fh-league-formula h2 {
    margin: 0 0 18px;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 4px solid #c1121f;
    color: #f6ead0;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 700;
    line-height: .95;
    width: max-content;
    max-width: 100%;
}

.fh-league-formula p {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 10px;
    padding: 14px 16px;
    background: #f7f7f7;
    border-radius: 10px;
    color: #3a3a3a;
    font-size: 15px;
    line-height: 1.45;
}

.fh-league-formula p::before {
    content: "";
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    background: center / contain no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c1121f'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm0 2c-4 0-8 2-8 5v1h16v-1c0-3-4-5-8-5Z'/%3E%3C/svg%3E");
}

.fh-league-formula p:nth-of-type(2)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c1121f'%3E%3Cpath d='M8 11a3 3 0 1 0-3-3 3 3 0 0 0 3 3Zm8 0a3 3 0 1 0-3-3 3 3 0 0 0 3 3ZM8 13c-2.7 0-6 1.3-6 4v1h8v-1c0-1.2.5-2.2 1.3-3.1A9 9 0 0 0 8 13Zm8 0a9 9 0 0 0-3.3.9c.8.9 1.3 1.9 1.3 3.1v1h8v-1c0-2.7-3.3-4-6-4Z'/%3E%3C/svg%3E");
}

.fh-league-formula p:nth-of-type(3)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c1121f'%3E%3Cpath d='M7 4h10v2a5 5 0 0 1-4 4.9V14h3v2H8v-2h3v-3.1A5 5 0 0 1 7 6V4Zm-2 1H3v2a3 3 0 0 0 2 2.8V5Zm14 0v4.8A3 3 0 0 0 21 7V5h-2Z'/%3E%3C/svg%3E");
}

.fh-league-formula p:nth-of-type(4)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c1121f'%3E%3Cpath d='M4 19h3v-7H4v7Zm6 0h3V5h-3v14Zm6 0h3v-4h-3v4Z'/%3E%3C/svg%3E");
}

.fh-league-navigation {
    margin: 0;
    padding: 16px 22px 20px;
    background: #070707;
    border-top: 1px solid rgba(212, 175, 55, .35);
}

.fh-league-navigation h3 {
    margin: 0 0 14px;
    color: #f6ead0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .28em;
    text-align: center;
    text-transform: uppercase;
}

.fh-league-navigation-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.fh-league-navigation-card {
    flex: 1;
    max-width: 160px;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border-radius: 8px;
    box-shadow: none;
    cursor: pointer;
}

.fh-league-navigation-card img {
    display: block;
    width: 100%;
    height: 92px;
    object-fit: cover;
}

.fh-league-navigation-card span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 7px 10px;
    background: #fff;
    color: #111;
    font-size: 13px;
    font-weight: 700;
}

.fh-league-navigation-card span::after {
    content: "›";
    font-size: 16px;
    line-height: 1;
}

.fh-league-navigation-card:first-child span {
    background: #c1121f;
    color: #fff;
}



/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {
    .fh-league-main {
        flex-direction: column;
        gap: 0;
        min-height: 0;
    }

    .fh-league-brand {
        flex: none;
        width: 100%;
        min-height: 280px;
        height: 280px;
    }

    .fh-league-content {
        padding: 22px 16px 12px;
    }

    .fh-league-navigation-grid {
        flex-wrap: wrap;
    }

    .fh-league-navigation-card {
        flex: 0 0 calc(50% - 8px);
        max-width: none;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .fh-league-brand {
        min-height: 180px;
        height: 180px;
    }

    .fh-league-navigation-card {
        flex: 0 0 100%;
    }

    .fh-prize-cards {
        grid-template-columns: 1fr;
    }
}

.fhl-home-competition-container .fh-league-page h2 {
    color: #f6ead0;
}

.fhl-home-competition-container .fh-league-page h3 {
    color: #f6ead0;
}

.fhl-home-competition-container .fh-league-formula p {
    color: #3a3a3a;
}

.fhl-home-competition-container .fh-league-navigation-card span {
    color: #111;
}

.fhl-home-competition-container .fh-league-navigation-card:first-child span {
    color: #fff;
}

/* =====================================================
   PRIME
===================================================== */

.fhl-home-competition-container:has([data-view="prime"]:not([hidden])),
.fhl-home-competition-container:has([data-view="elite"]:not([hidden])),
.fhl-home-competition-container:has([data-view="dynasty"]:not([hidden])),
.fhl-home-competition-container:has([data-view="rising"]:not([hidden])),
.fhl-home-competition-container:has([data-view="crows"]:not([hidden])) {
    width: min(1120px, calc(100% - 48px));
    background: #f6f3ee;
    border-color: rgba(176, 142, 62, .55);
}

.fhl-home-competition-container:has([data-view="prime"]:not([hidden])) .fhl-home-overlay-body,
.fhl-home-competition-container:has([data-view="elite"]:not([hidden])) .fhl-home-overlay-body,
.fhl-home-competition-container:has([data-view="dynasty"]:not([hidden])) .fhl-home-overlay-body,
.fhl-home-competition-container:has([data-view="rising"]:not([hidden])) .fhl-home-overlay-body,
.fhl-home-competition-container:has([data-view="crows"]:not([hidden])) .fhl-home-overlay-body {
    background: #f6f3ee;
}

.fhl-home-competition-container:has([data-view="prime"]:not([hidden])) .fhl-home-overlay-close,
.fhl-home-competition-container:has([data-view="elite"]:not([hidden])) .fhl-home-overlay-close,
.fhl-home-competition-container:has([data-view="dynasty"]:not([hidden])) .fhl-home-overlay-close,
.fhl-home-competition-container:has([data-view="rising"]:not([hidden])) .fhl-home-overlay-close,
.fhl-home-competition-container:has([data-view="crows"]:not([hidden])) .fhl-home-overlay-close {
    color: #1a1a1a;
}

.fh-league-sheet .fh-league-main {
    min-height: 0;
    background: #f6f3ee;
}

.fh-league-sheet .fh-league-brand {
    flex: 0 0 auto;
    width: auto;
    min-height: 0;
    background: #070605;
}

.fh-league-sheet .fh-league-brand img {
    width: auto;
    height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: center center;
}

.fh-league-sheet .fh-league-brand::before,
.fh-league-sheet .fh-league-brand::after {
    content: none;
}

.fh-league-sheet .fh-league-content {
    padding: 18px 32px 16px 28px;
    background:
        url("../img/prime-eagle.png") no-repeat right 10px top 8px,
        #f6f3ee;
    background-size: 220px auto, auto;
}

.fh-league-sheet .fh-prime-kicker {
    margin: 0 0 2px;
    color: #2b2b2b;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.fhl-home-competition-container .fh-league-sheet h2 {
    margin: 0;
    color: #111;
    font-size: clamp(48px, 5vw, 64px);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: .9;
    text-transform: uppercase;
}

.fhl-home-competition-container .fh-league-sheet h2::after {
    content: none;
}

.fh-league-sheet .fh-prime-rule {
    display: block;
    width: 168px;
    height: 5px;
    margin: 8px 0 10px;
    background: linear-gradient(90deg, #c1121f 0 38%, #161616 38% 100%);
}

.fh-league-sheet .fh-prime-subtitle {
    margin: 0 0 10px;
    color: #b0893e;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 2.2px;
    text-transform: uppercase;
}

.fh-league-sheet .fh-prime-intro {
    max-width: 640px;
    margin: 0 0 12px;
    color: #3d3d3d;
    font-size: 14.5px;
    line-height: 1.45;
}

.fh-league-sheet .fh-prime-points {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fh-league-sheet .fh-prime-points article {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 14px;
    background: #f3eee6;
    border-radius: 14px;
}

.fh-league-sheet .fh-prime-icon {
    display: flex;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: #f8f1e4;
    border-radius: 10px;
}

.fh-league-sheet .fh-prime-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #c1121f;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fhl-home-competition-container .fh-league-sheet h3 {
    margin: 1px 0 4px;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.fh-league-sheet .fh-prime-points p {
    margin: 0;
    color: #3f3f3f;
    font-size: 13.5px;
    line-height: 1.4;
}

.fh-league-sheet--rising .fh-prime-rule {
    background: linear-gradient(90deg, #3a6408 0 38%, #161616 38% 100%);
}

.fh-league-sheet--rising .fh-prime-subtitle {
    color: #3a6408;
}

.fh-league-sheet--rising .fh-prime-icon svg {
    stroke: #2f6b3a;
}

.fh-league-sheet--crows .fh-prime-rule {
    background: linear-gradient(90deg, #1c3a9a 0 38%, #161616 38% 100%);
}

.fh-league-sheet--crows .fh-prime-subtitle {
    color: #1c3a9a;
}

.fh-league-sheet--crows .fh-prime-icon {
    background: #e7eef8;
}

.fh-league-sheet--crows .fh-prime-icon svg {
    stroke: #1c3a9a;
}

.fh-league-page--qualification .fh-league-content {
    padding: 22px 22px 14px;
    background:
        linear-gradient(90deg, #070707 0%, #070707 36%, rgba(7, 7, 7, .25) 72%, rgba(7, 7, 7, 0) 100%),
        url("../img/qualification-stadium.jpg") right top / 48% auto no-repeat,
        #070707;
}

.fh-league-page--qualification .fh-qual-kicker {
    margin: 0 0 6px;
    color: #e6c36a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .28em;
    text-transform: uppercase;
}

.fhl-home-competition-container .fh-league-page--qualification h2 {
    margin: 0;
    color: #e6c36a;
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1;
}

.fh-league-page--qualification .fh-qual-subtitle {
    margin: 8px 0 16px;
    color: #e6c36a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.fh-league-page--qualification .fh-qual-panel {
    display: flex;
    flex-direction: column;
    padding: 6px 4px;
    background: #fff;
    border-radius: 16px;
}

.fh-league-page--qualification .fh-qual-panel article {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: transparent;
}

.fh-league-page--qualification .fh-qual-icon {
    display: flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 1px;
}

.fh-league-page--qualification .fh-qual-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #c1121f;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fhl-home-competition-container .fh-league-page--qualification h3 {
    margin: 0 0 3px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .2px;
    text-transform: uppercase;
}

.fh-league-page--qualification .fh-qual-panel p {
    margin: 0;
    color: #3a3a3a;
    font-size: 13.5px;
    line-height: 1.4;
}

.fhl-home-competition-container .fh-league-page--qualification .fh-league-navigation-card:first-child span,
.fhl-home-competition-container .fh-league-sheet .fh-league-navigation-card:first-child span {
    background: #fff;
    color: #111;
}

.fh-league-page--qualification .fh-league-navigation-card span::after,
.fh-league-sheet .fh-league-navigation-card span::after {
    color: #c1121f;
}

.fh-league-page--qualification a.fh-league-navigation-card,
.fh-league-sheet a.fh-league-navigation-card {
    text-decoration: none;
    color: inherit;
}

.fhl-home-competition-container .fh-league-sheet .fh-league-navigation h3 {
    color: #f6ead0;
}

.fh-prize-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 18px 18px;
    background:
        radial-gradient(ellipse at 8% 50%, rgba(180, 36, 16, .55), transparent 42%),
        radial-gradient(ellipse at 92% 80%, rgba(140, 24, 10, .45), transparent 36%),
        linear-gradient(90deg, #120706 0%, #2a0d0c 46%, #160808 100%);
    border-top: 1px solid rgba(212, 175, 55, .35);
}

.fh-prize-intro {
    display: flex;
    flex: 0 0 250px;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.fh-prize-gift {
    display: flex;
    flex: 0 0 54px;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
}

.fh-prize-gift svg {
    width: 52px;
    height: 52px;
    fill: none;
    stroke: #e6c36a;
    stroke-width: 2.4;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.fh-prize-kicker,
.fh-prize-name,
.fh-prize-tag {
    margin: 0;
    color: #e6c36a;
}

.fh-prize-kicker {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.fh-prize-name {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: .95;
    text-transform: uppercase;
}

.fh-prize-tag {
    margin-top: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.fh-prize-rule {
    display: block;
    width: 118px;
    height: 4px;
    margin-top: 8px;
    background: linear-gradient(90deg, #c1121f 0 46%, #e6c36a 46% 100%);
}

.fh-prize-cards {
    display: flex;
    flex: 1;
    gap: 10px;
    min-width: 0;
}

.fh-prize-card {
    position: relative;
    flex: 1;
    min-width: 0;
}

.fh-prize-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.fh-prize-scopri {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 3px 10px;
    border: 1px solid #e6c36a;
    border-radius: 3px;
    background: #0c0c0c;
    color: #e6c36a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.fh-prize-scopri:hover {
    background: #e6c36a;
    color: #1a1a1a;
}

@media (max-width: 768px) {
    .fh-prize-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .fh-prize-intro {
        flex-basis: auto;
    }

    .fh-prize-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .fh-league-sheet .fh-league-brand {
        height: 200px;
        min-height: 200px;
    }

    .fh-league-sheet .fh-league-content {
        padding: 22px 16px 20px;
        background-size: 160px auto, auto;
    }

    .fh-league-formula h2,
    .fh-league-sheet h2 {
        font-size: clamp(28px, 7vw, 40px);
    }
}





/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 768px) {

    .fhl-home-overlay-container {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 12px;
    }

    .fhl-home-competition-container .fhl-home-overlay-body {
        padding: 0;
    }

    .fhl-overlay-layout {
        flex-direction: column;
    }

    .fhl-overlay-sidebar {
        width: 100%;
        flex: none;
    }

}