/* General Page Styling */
body {
    background-color: rgba(30, 30, 30, 0.9);
    color: white;
    font-family: "Arial", sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Full height */
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

/* Page Title */
.page-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: white;
}

/* Menu Grid */
.escola {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 80%;
    max-width: 900px;
}

/* Menu Items */
.escola-item {
    width: 30%;
    min-width: 200px;
    text-align: center;
    background-color: rgba(30, 30, 30, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Menu Buttons */
.escola-btn {
    display: block;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    text-wrap: initial;
    background-color: rgba(9, 22, 49, 0.9);
    color: white;
    border: solid 2px white;
    border-radius: 5px;
    text-decoration: none;
    transition: 0.3s;
}

.escola-button:hover {
    background-color: rgba(7, 32, 2, 0.9);
}

/* Campus Name */
.escola-name {
    margin-top: 10px;
    font-size: 10px;
    font-weight: bold;
    color: white;
}

/* Schedule Container */
.container {
    width: 100vw;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100%;
    height: 100%;
    display: grid;
    flex-direction: column;
}

/* Header Styling */
h2 {
    text-align: left;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
    width: 100%;
}

/* Section Headers */
h3 {
    text-align: left;
    font-size: 10px;
    font-weight: bold;
    padding: 10px;
    margin: 0;
}

h2.red {
    color: #fff;
}

h2.blue {
    color: #fff;
}

.logo {
    flex: 0 0 10%;
    width: 17%;
}

/* Side-by-side layout */
.schedule-container {
    width: 100%;
    justify-content: space-between;
    align-items: flex-start;
}

/* Schedule Table Box */
.schedule-box {
    min-height: 100%; /* Forces boxes to have the same height */
    background-color: rgba(30, 30, 30, 0.9);
    padding: 15px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.schedule-box::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-image: url(../static/piaget_branco.png);
    background-repeat: no-repeat;
    opacity: 0.05;
    background-position: center;
    background-size: 45%;
}

/* Make sure empty tables still occupy space */
.schedule-box:empty {
    visibility: hidden; /* Keeps structure but hides content */
}

/* Schedule Box Ongoing */
.ongoing {
    background-color: #330000;
}

/* Schedule Box Upcoming */
.upcoming {
    background-color: #003344;
}

/* Table Styling */
.table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

/* Fix Header Row */
.table thead tr {
    background-color: rgba(50, 50, 50, 0.8);
    font-size: 10px;
}

/* Fix Row Sizing */
.table tbody tr {
    background-color: rgba(20, 20, 20, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 8px;
}

/* Table Header */
th {
    padding: 0.2rem !important;
    height: 1.5rem !important;
    text-transform: uppercase;
    font-weight: bolder;
    color: white;
    vertical-align: inherit !important;
}

/* Table Data */
td {
    padding: 0.2rem !important;
    height: 1.5rem !important;
    vertical-align: inherit !important;
}

/* Alternating row colors */
tbody tr:nth-child(odd) {
    background-color: rgba(40, 40, 40, 0.9);
}

tbody tr:nth-child(even) {
    background-color: rgba(20, 20, 20, 0.9);
}

/* Prevent empty tables from collapsing */
.schedule-box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Prevent one table from stretching more than the other */
.table-container {
    flex-grow: 1;
}