/* Responsive override layer for the football website. */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

.app-header {
    max-width: none;
}

.header-logo {
    min-width: 0;
}

.logo {
    min-width: 0;
}

.logo .logoPic img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logoName {
    min-width: 0;
}

.logoTxt {
    margin: 0;
    line-height: 1.05;
    white-space: nowrap;
}

.hero-wrapper {
    min-height: 420px;
}

#hero-carousel,
#hero-carousel > div {
    min-width: 0;
}

.slide-overlay {
    background:
        linear-gradient(90deg, rgba(4, 8, 13, 0.92), rgba(4, 8, 13, 0.62) 42%, rgba(4, 8, 13, 0.16) 68%, rgba(4, 8, 13, 0.64)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08) 58%);
    align-items: flex-start !important;
    justify-content: center !important;
}

.slide-overlay > .mt-1 {
    width: 100%;
    min-width: 0;
    margin-top: 0 !important;
    max-width: min(720px, 68%);
}

.slide-overlay > .mt-1 > .flex {
    align-items: flex-start !important;
    gap: clamp(10px, 2.4vw, 18px) !important;
}

#hero-carousel > div > img {
    object-position: top right !important;
}

#hero-carousel-wrapper .homebg,
#hero-carousel-wrapper .awaybg {
    display: none;
}

.slideHome,
.slideAway {
    min-width: 0;
    overflow: hidden;
    width: min(100%, 640px) !important;
    max-width: 100%;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.58) 72%, rgba(0, 0, 0, 0.18));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
    transform: none;
}

#hero-carousel-wrapper .slideTeam {
    min-width: 0;
    overflow-wrap: anywhere;
    letter-spacing: 0;
}

#hero-carousel-wrapper .homebg,
#hero-carousel-wrapper .awaybg {
    pointer-events: none;
}

.slideScore {
    width: min(100%, 640px) !important;
    align-items: flex-start !important;
}

.slideScore > div {
    width: min(46%, 330px) !important;
    margin-left: clamp(54px, 8vw, 132px);
    transform: none !important;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(0, 255, 0, 0.2), rgba(0, 0, 0, 0.62) 62%),
        rgba(8, 16, 12, 0.9) !important;
    border: 1px solid rgba(0, 255, 0, 0.42) !important;
    border-bottom-width: 1px !important;
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.36),
        0 0 26px rgba(0, 255, 0, 0.16) !important;
}

.slideScore > div > div {
    transform: none !important;
    color: #eaffea !important;
    text-shadow: 0 0 18px rgba(0, 255, 0, 0.24);
}

.slideScore > div > div span {
    color: inherit !important;
}

.video {
    border: 1px solid rgba(71, 85, 105, 0.72) !important;
    background:
        linear-gradient(180deg, rgba(27, 34, 42, 0.96), rgba(10, 14, 18, 0.98));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.video-placeholder img {
    object-position: center;
}

.video-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.34)),
        linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 36%, rgba(0, 0, 0, 0.18));
}

.vHeader,
.info {
    min-width: 0;
}

.vHeader {
    display: grid !important;
    grid-template-columns: minmax(8.4em, 1fr) 8.6em minmax(8.4em, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 44px;
    background: rgba(9, 13, 18, 0.92) !important;
    color: rgba(255, 255, 255, 0.74);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vHeader .date,
.vHeader .time,
.vHeader .league {
    min-width: 0;
    width: auto !important;
    white-space: nowrap;
}

.vHeader .league {
    justify-self: center;
    width: 8.6em !important;
    height: 26px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vHeader .date {
    justify-self: start;
}

.vHeader .time {
    justify-self: end;
}

.league .leagueLogo {
    width: 22px;
    height: 22px;
    max-width: none;
    object-fit: contain;
    flex: 0 0 auto;
    padding: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
}

.info {
    gap: 4px;
    background:
        linear-gradient(180deg, rgba(16, 22, 28, 0.98), rgba(8, 12, 16, 0.98)) !important;
    color: rgba(255, 255, 255, 0.72);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.teamLogo {
    flex: 0 0 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.teamLogo .tLogo,
.teamLogo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
}

.info .team {
    flex: 1 1 7em;
    min-width: 0;
    width: auto;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
    letter-spacing: 0;
}

.info .score {
    flex: 0 0 34px;
    width: 34px;
    padding: 3px 4px;
    letter-spacing: 0;
    line-height: 1.1;
    color: var(--neon-green) !important;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.7)) !important;
    border: 1px solid rgba(0, 255, 0, 0.32);
    box-shadow: 0 0 18px rgba(0, 255, 0, 0.08);
}

.filter-bar,
.filter-btn,
.filter-item {
    min-width: 0;
}

.filter-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-content {
    max-width: min(100vw, 1120px);
}

@media (max-width: 767px) {
    .hero-wrapper {
        height: 65vh;
        min-height: 420px;
        margin-top: 18%;
    }

    #hero-carousel > div > img {
        object-position: top right !important;
    }

    .slide-overlay {
        justify-content: flex-end !important;
        padding: 18px 16px 46px !important;
        background:
            linear-gradient(90deg, rgba(3, 7, 12, 0.88), rgba(3, 7, 12, 0.44) 58%, rgba(3, 7, 12, 0.54)),
            linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.06) 64%);
    }

    .slide-overlay > .mt-1 {
        max-width: 100%;
    }

    .slideHome,
    .slideAway {
        padding: 8px 10px;
        width: 92% !important;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42));
    }

    .slideHome {
        align-self: flex-start;
    }

    .slideAway {
        align-self: flex-end;
    }

    .slideHome img,
    .slideAway img {
        width: 42px !important;
        height: 42px !important;
    }

    #hero-carousel-wrapper .slideTeam {
        font-size: 26px !important;
    }

    .slideScore {
        width: 100% !important;
        align-items: center !important;
    }

    .slideScore > div {
        width: min(58%, 220px) !important;
        margin-left: 0;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .main-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .vHeader {
        font-size: 12px;
        padding: 4px 8px;
    }

    .vHeader .date,
    .vHeader .time {
        width: 32%;
    }

    .vHeader .league {
        width: 36%;
    }

    .info .team {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0 !important;
    }

    .app-header {
        width: min(100%, 1180px);
        left: 50%;
        transform: translateX(-50%);
        padding: 12px 22px;
        border-radius: 0 0 18px 18px;
    }

    .header-logo {
        width: 100%;
        justify-content: space-between;
    }

    .app-header nav.md\:flex {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 10px;
        min-width: 0;
    }

    .nav-top-btn {
        color: rgba(255, 255, 255, 0.68);
        border-bottom: 0;
        white-space: nowrap;
        width: 46px;
        height: 46px;
        padding: 6px;
        font-size: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .nav-top-btn::before {
        content: "";
        width: 32px;
        height: 32px;
        display: block;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        opacity: 0.78;
        filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
        transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
    }

    .nav-top-btn[data-cat="Main"]::before {
        background-image: url("img/logo.png");
    }

    .nav-top-btn[data-cat="PL"]::before {
        background-image: url("img/btn-PL.png");
    }

    .nav-top-btn[data-cat="SA"]::before {
        background-image: url("img/btn-SA.png");
    }

    .nav-top-btn[data-cat="PD"]::before {
        background-image: url("img/btn-PD.png");
    }

    .nav-top-btn[data-cat="BL1"]::before {
        background-image: url("img/btn-BL1.png");
    }

    .nav-top-btn[data-cat="CL"]::before {
        background-image: url("img/btn-CL.png");
    }

    .nav-top-btn:hover,
    .nav-top-btn.tab-active {
        color: var(--neon-green);
        background: rgba(0, 255, 0, 0.08);
        border-color: rgba(0, 255, 0, 0.34);
    }

    .nav-top-btn:hover::before,
    .nav-top-btn.tab-active::before {
        opacity: 1;
        transform: translateY(-1px);
        filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.28));
    }

    nav.app-navbar {
        display: none !important;
    }

    .hero-wrapper {
        width: min(calc(100% - 48px), 1180px);
        height: clamp(360px, 45vw, 440px) !important;
        min-height: 0;
        margin: 92px auto 26px;
        border-radius: 18px;
    }

    #hero-carousel-wrapper .slideTeam {
        font-size: clamp(34px, 5vw, 52px) !important;
        line-height: 1;
    }

    #hero-carousel-wrapper .slideHome,
    #hero-carousel-wrapper .slideAway,
    #hero-carousel-wrapper .slideScore {
        width: min(100%, 640px) !important;
    }

    .slideHome img,
    .slideAway img {
        width: 64px !important;
        height: 64px !important;
    }

    .slideScore > div {
        width: min(46%, 330px) !important;
    }

    .main-container {
        width: min(calc(100% - 48px), 1180px);
        max-width: 1180px;
        padding: 0 0 44px;
    }

    .pageTitle {
        margin: 18px 0 20px !important;
        padding: 10px 4px !important;
    }

    #app {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 22px !important;
    }

    .video {
        border-radius: 14px;
    }

    .vHeader {
        padding: 8px 10px;
        font-size: 13px;
    }

    .vHeader .date,
    .vHeader .time {
        width: 30%;
    }

    .vHeader .league {
        width: 40%;
    }

    .info {
        padding: 8px;
    }

    .info .team {
        font-size: 15px;
    }

    .filter-bar {
        padding: 0;
        border-bottom: 0;
    }

    .filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filter-dropdown-menu.open {
        max-height: min(520px, 62vh);
    }

    #advanced-filters {
        gap: 12px;
    }

    #advanced-filters .advanced-filters {
        width: 50% !important;
    }
}

@media (min-width: 768px) and (orientation: landscape) {
    .hero-wrapper {
        height: clamp(300px, 42vh, 360px) !important;
        margin-top: 86px;
    }

    .slide-overlay {
        padding-top: 34px !important;
        padding-bottom: 34px !important;
    }
}

@media (min-width: 1024px) {
    .app-header {
        width: min(calc(100% - 64px), 1180px);
    }

    .hero-wrapper {
        width: min(calc(100% - 64px), 1180px);
        height: clamp(340px, 36vw, 420px) !important;
    }

    #hero-carousel > div > img {
        object-position: top right !important;
    }

    .main-container {
        width: min(calc(100% - 64px), 1180px);
    }

    #app {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 24px !important;
    }

    .vHeader {
        font-size: 12px;
    }

    .vHeader .date,
    .vHeader .time {
        width: 27%;
    }

    .vHeader .league {
        width: 46%;
    }

    .teamLogo {
        flex-basis: 36px;
        width: 36px;
    }

    .teamLogo .tLogo,
    .teamLogo img {
        width: 32px;
        height: 32px;
    }

    .info .team {
        font-size: 14px;
    }

    .info .score {
        flex-basis: 34px;
        width: 34px;
        font-size: 22px;
    }

    .filter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .modal-content {
        width: min(86vw, 1120px);
    }
}

@media (min-width: 1280px) {
    .app-header,
    .hero-wrapper,
    .main-container {
        width: min(calc(100% - 96px), 1200px);
        max-width: 1200px;
    }

    .hero-wrapper {
        height: 400px !important;
    }

    #app {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1536px) {
    .app-header,
    .hero-wrapper,
    .main-container {
        max-width: 1240px;
    }
}
