/* ======================================================
   GLOBAL BASE
====================================================== */
body {
    background-color: #f5f7fb;
    font-family: Arial, sans-serif;
    margin: 0;
}

p {
    clear: both;
    text-align: justify;
    margin-right: 60px;
}

/* Page layout */
.page-wrapper {
    display: grid;
    grid-template-columns: 15% minmax(0, 1fr) 15%;
    gap: 25px;
    padding: 25px;
}


/* ======================================================
   CARD
====================================================== */
.card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px 24px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ======================================================
   TITLES
====================================================== */
.event-title {
    color: #002395;
    font-size: 26px;
    font-weight: bold;
    text-align: center;
    margin: 20px 0 5px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.tourn-result-date {
    text-align: center;
    font-size: 16px;
    margin-bottom: 20px;
    color: #555;
}

.current-time {
    font-size: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.card-title {
    color: #002395;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
	
}

.card.left-panel {
   box-sizing: border-box;
}


/* ======================================================
   LEFT PANEL
====================================================== */
.left-panel {
    display: flex;
    flex-direction: column;
    align-items: center;   /* allow full width */
}

.left-title {
    color: #002395;
    font-size: 24px;
    font-weight: bold;
    text-align: right;
    margin-top: 20px;
    margin-right: 20px;
	text-align: center;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
	
}

.info-row:last-child {
    border-bottom: none;
}

.squad-note {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 12px;
    background: #eef2ff;
    border-left: 4px solid #002395;
    border-radius: 6px;
    font-size: 14px;
    color: #002395;
}

.left-panel .info-row span {
    flex: 0 0 auto;
}

.left-panel .info-row strong {
    flex: 1 1 auto;
    text-align: right;
}

.left-panel .card,
.left-panel .info-row,
.left-panel .squad-card-modern {
    width: 90%;
}



/* ======================================================
   SQUAD LIST (MODERN)
====================================================== */
.squad-card-modern {
    margin-top: 20px;
    background: #fff;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.squad-container.open .squad-content-modern {
	
    display: block;
}

.squad-header-modern {
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #002395;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.squad-arrow {
    transition: transform 0.25s ease;
}

.squad-content-modern {
    display: none;
    padding: 10px 18px 18px 18px;
}

.squad-table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.squad-table-modern th {
    text-align: left;
    padding: 8px 0;
    border-bottom: 2px solid #ddd;
    background: #eef2ff;
}

.squad-table-modern td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.squad-table-modern tr:nth-child(even) td {
    background: #fafafa;
}

/* ======================================================
   CENTER PANEL – EVENT BLOCKS
====================================================== */
.center-panel {}

.tournament-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.event-block {
    width: 30%;
    margin-bottom: 40px;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px 24px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.event-block:hover {
    transform: translateY(-3px);
}

.event-block.expanded {
    width: 100% !important;
}

/* Division toggle */
.table-title {
    color: #002395;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-top: 20px;
    margin-bottom: 10px;
}

.toggle-arrow {
    margin-right: 10px;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Division container */
.division-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.6s ease 0.2s;
}

.division-container.open {
    max-height: 2000px;
    opacity: 1;
}

.division-container.open .toggle-arrow {
    transform: rotate(90deg);
}

/* ======================================================
   CENTER TABLE
====================================================== */
.table-center {
    display: block;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.center-table {
    border-collapse: collapse;
    min-width: max-content;
    table-layout: fixed;
}

.center-table th,
.center-table td {
    padding: 6px 6px;
    text-align: center;
    background-color: #f2f2f2;
    border-bottom: 1px solid #e0e0e0;
}

/* Medal rows */
.center-table tr.gold td { background-color: #FCDD62 !important; font-weight: bold; }
.center-table tr.silver td { background-color: #C0C0C0 !important; }
.center-table tr.bronze td { background-color: #c79b56 !important; }

/* Sticky columns */
.center-table th:nth-child(1),
.center-table td:nth-child(1) {
    width: 25px;
    position: sticky;
    left: 0;
    z-index: 5;
    background: #fff;
}

.center-table th:nth-child(2),
.center-table td:nth-child(2) {
    width: 90px;
    position: sticky;
    left: 25px;
    z-index: 5;
    background: #fff;
}

.center-table th:nth-child(3),
.center-table td:nth-child(3) {
    width: 60px;
    position: sticky;
    left: 115px;
    z-index: 5;
    background: #fff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

/* ======================================================
   RIGHT PANEL
====================================================== */
.right-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.right-title {
    color: #002395;
    font-size: 24px;
    font-weight: bold;
    margin-top: 20px;
    margin-left: 5px;
}

.right-title-bbq {
    color: #002395;
    font-size: 20px;
    font-weight: bold;
    margin-top: 40px;
}

.right-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.right-table th,
.right-table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

/* ======================================================
   RESPONSIVE
====================================================== */
/* ======================================================
   1. DESKTOP (LARGE SCREENS ONLY)
   Real desktops/laptops ≥1500px
====================================================== */
@media screen and (min-width: 1500px) {

    .event-block {
        transition: width 0.35s ease;
    }

    .event-block.expanded.games-16 {
        width: 80%;
        max-width: 1510px;
        margin: 0 auto;
    }

    .event-block.expanded.games-8 {
        width: 55%;
        max-width: 1025px;
        margin: 0 auto;
    }
}



/* ======================================================
   2. MOBILE PORTRAIT (PHONES)
   ≤900px tall orientation-agnostic
====================================================== */
@media screen and (max-width: 900px) {

    .page-wrapper {
        display: block !important;
        padding: 15px;
    }

    .event-block {
        width: 100% !important;
        margin-bottom: 25px;
    }

    .left-panel {
        text-align: right;
    }

    .center-table {
        table-layout: auto !important;
        width: max-content !important;
        font-size: 11px;
    }
}



/* ======================================================
   3. MOBILE LANDSCAPE (PHONES ONLY)
   ≤1100px AND landscape
====================================================== */
@media screen and (max-width: 1100px) and (orientation: landscape) {

    .page-wrapper {
        display: block !important;
        padding: 15px;
    }
	
	
	.left-panel,
    .center-panel,
    .right-panel {
        width: 90% !important;
        max-width: none !important;
        margin: 0 0 20px 20px;
        align-items: stretch !important;
    }

    .event-block {
        width: 100% !important;
        margin-bottom: 25px;
    }
}



/* ======================================================
   4. TABLETS (PORTRAIT + LANDSCAPE)
   768px → 1499px
   ALL tablets, including iPad Pro 12.9"
====================================================== */

@media screen and (min-width: 768px) and (max-width: 1499px) {

    .page-wrapper {
        display: block !important;
        padding: 20px;
    }

    /* Left + Right panels: centered, half-width */
    .left-panel,
    .right-panel {
        width: 50% !important;
        max-width: 600px;        /* prevents them from becoming too wide */
        margin: 0 auto 25px auto; /* auto-centers horizontally */
        align-items: stretch !important;
    }

    /* Center panel: wider, centered */
    .center-panel {
        width: 90% !important;
        max-width: 900px;         /* keeps it readable */
        margin: 0 auto 25px auto; /* auto-centers */
        align-items: stretch !important;
    }

    .event-block {
        width: 100% !important;
        margin-bottom: 30px;
    }
	
	.left-panel,
	.center-panel,
	.right-panel {
		margin-bottom: 30px;
	}
	.page-wrapper,
	.left-panel,
	.center-panel,
	.right-panel,
	.event-block {
		transition: all 0.25s ease;
	}

}
