/*
Theme Name: UniBasket Rozcestník
Theme URI: https://unibasket.cz
Author: UniBasket
Author URI: https://unibasket.cz
Description: Čistá split-screen šablona pro rozcestník (Derby / Liga).
Version: 1.0
Text Domain: unibasket-rozcestnik
*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #ffffff;
    background-color: #000;
    overflow: hidden;
    /* Zabrání scrollování, layout je 100vh */
}

/* Background image that covers the whole screen */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: url('https://derby.unibasket.cz/wp-content/uploads/2023/10/IMG_6243-scaled.jpg') center/cover no-repeat;
    /* Placeholder for now */
    z-index: 0;
}

/* Header for logos */
.top-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
    pointer-events: none;
    /* Allows clicking behind it */
}

.logo-left img {
    height: var(--left-logo-height, 60px) !important;
    max-height: 100%;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
    pointer-events: auto;
}

.logos-right {
    display: flex;
    gap: 20px;
    align-items: center;
    pointer-events: auto;
}

.logos-right img {
    height: var(--right-logo-height, 50px) !important;
    max-height: 100%;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
}

/* Split screen container */
.split-container {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* Both sides */
.split-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: white;
    position: relative;
    transition: flex 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    overflow: hidden;
}

/* Dark gradient overlay for sides */
.split-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Default dim */
    transition: background 0.4s ease;
    z-index: -1;
}

/* Left - Derby */
.split-derby {
    border-right: 2px solid rgba(255, 255, 255, 0.1);
}

/* Right - Liga */
.split-liga {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

/* Titles */
.split-title {
    font-size: var(--desktop-title-size, 7vw);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s ease;
}

.split-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: white;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

/* Hover effects */
.split-side:hover {
    flex: 1.2;
}

.split-side:hover::before {
    background: rgba(0, 0, 0, 0.1);
    /* Brighter on hover */
}

.split-side:hover .split-title {
    transform: scale(1.05);
}

.split-side:hover .split-title::after {
    transform: scaleX(1);
}

/* Next Game Box (středový prvek) */
.next-game-widget {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    padding: 24px 32px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 20;
    text-align: center;
    min-width: 320px;
    backdrop-filter: blur(10px);
}

.widget-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.widget-match {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-bottom: 4px;
}

.widget-details {
    font-size: 14px;
    color: #444;
}

/* Bottom Logo */
.logo-bottom-right {
    position: absolute;
    bottom: 30px;
    right: 40px;
    z-index: 10;
    pointer-events: auto;
}

.logo-bottom-right img {
    height: var(--bottom-logo-height, 80px) !important;
    max-height: 100%;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
}

/* =============================================
   RESPONSIVE — Tablet (≤ 1024px)
   ============================================= */
@media (max-width: 1024px) {
    .top-header {
        padding: 20px 25px;
    }

    .split-title {
        font-size: clamp(3rem, 8vw, 6rem);
    }

    /* Disable flex grow hover on touch — sidestep sticky hover states */
    .split-side:hover {
        flex: 1;
    }
}

/* =============================================
   RESPONSIVE — Mobile (≤ 768px)
   ============================================= */
@media (max-width: 768px) {

    /* Allow the page to scroll on very small phones */
    body {
        overflow-y: auto;
    }

    /* Stack the split vertically */
    .split-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    /* Each side takes up exactly half the viewport */
    .split-side {
        width: 100%;
        height: 50vh;
        flex: none !important;
        border-right: none !important;
        border-left: none !important;
    }

    /* Disable misleading hover flex-grow on touch screens */
    .split-side:hover {
        flex: none !important;
    }

    /* Header: stack logos vertically, compact padding */
    .top-header {
        padding: 16px 20px 12px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
    }

    .logo-left img {
        height: 44px !important;
    }

    .logos-right img {
        height: 36px !important;
    }

    /* Derby: push title below the absolute header (~80px) */
    .split-derby {
        border-bottom: 2px solid rgba(255, 255, 255, 0.15);
        padding-top: 80px;
        align-items: center;
        justify-content: center;
    }

    /* Liga: push title up so it doesn't clash with the widget */
    .split-liga {
        padding-bottom: 80px;
        align-items: center;
        justify-content: center;
    }

    /* Big titles scale nicely on mobile */
    .split-title {
        font-size: clamp(3.5rem, 18vw, 5rem);
    }

    /* Next game widget: snap it on the divider line between the two sides */
    .next-game-widget {
        position: absolute;
        bottom: 50vh;
        left: 50%;
        transform: translate(-50%, 50%);
        width: min(88vw, 340px);
        min-width: unset;
        padding: 14px 20px;
        border-radius: 10px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
        z-index: 30;
    }

    .widget-label {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .widget-match {
        font-size: 15px;
    }

    .widget-details {
        font-size: 13px;
    }

    /* Bottom logo: center at very bottom */
    .logo-bottom-right {
        bottom: 16px;
        right: 50%;
        transform: translateX(50%);
        text-align: center;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .logo-bottom-right img {
        height: 65px !important;
        max-width: 90%;
    }
}

/* =============================================
   RESPONSIVE — Very small phones (≤ 400px)
   ============================================= */
@media (max-width: 400px) {
    .split-title {
        font-size: clamp(2.8rem, 20vw, 4rem);
    }

    .top-header {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 12px 16px 10px;
    }

    .logo-left img {
        height: 36px !important;
    }

    .logos-right img {
        height: 28px !important;
    }

    /* Bit more top padding so Derby title isn't behind the taller header */
    .split-derby {
        padding-top: 110px;
    }

    .next-game-widget {
        width: 90vw;
        padding: 12px 15px;
    }
}