:root {
    --baby-blue: #68bbe3;
    --blue-grotto: #0e86d4;
    --blue-main: #055c9d;
    --navy-blue: #003060;
}

/* Base Layout */
html,
body {
    min-height: 100%;
    background-color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
    /* Prevents horizontal scroll on the whole page */
}

body {
    background: linear-gradient(rgba(0, 48, 96, 0.8), rgba(0, 48, 96, 0.9)), url('../images/img-2.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: #fff;
    padding-top: 80px;
}

/* STICKY NAVBAR */
.navbar-custom {
    background-color: rgba(0, 48, 96, 0.95);
    border-bottom: 2px solid var(--blue-main);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-weight: bold;
    color: var(--baby-blue) !important;
    font-size: 1.5rem;
}

/* SCHEDULE CARDS */
.week-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(104, 187, 227, 0.3);
    border-radius: 10px;
    margin-bottom: 2rem;
    padding: 15px;
    margin-top: 10px !important;
}

.week-date {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #fff;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

/* Section Colors & Headers */
.section-title,
.section-header {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.text-treasures {
    color: #bcaaa4;
}

.text-ministry {
    color: #ffa726;
}

.text-living {
    color: #ef5350;
}

/* -------------------------------------------------------------------------- */
/* ---------------- GENERAL TABLE (Shared Baseline) ------------------------- */
/* -------------------------------------------------------------------------- */
.table {
    color: #ddd;
    margin-bottom: 0;
    width: 100% !important;
    border-collapse: collapse;
}

.table td {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
    padding: 0.75rem 0.4rem;
    white-space: normal !important;
    overflow-wrap: break-word !important;
}

/* -------------------------------------------------------------------------- */
/* ---------------- MIDWEEK SPECIFIC (The "Pink Fix") ----------------------- */
/* -------------------------------------------------------------------------- */
/* These rules ONLY trigger on the midweek page tables */
.week-card>.table-responsive>.table {
    table-layout: fixed !important;
}

.week-card>.table-responsive>.table td:first-child {
    width: 50% !important;
    text-align: left !important;
    color: rgba(255, 255, 255, 0.9);
}

.week-card>.table-responsive>.table td:last-child {
    width: 50% !important;
    text-align: left !important;
    font-weight: 600;
    color: var(--baby-blue);

}

/* -------------------------------------------------------------------------- */
/* ---------------- WEEKEND SPECIFIC FIXES --------------------------------- */
/* -------------------------------------------------------------------------- */
/* This ensures the labels (Presidencia, etc) don't get squashed to 50% */
.week-card .table.borderless td:first-child {
    width: 140px !important;
    /* Keep the labels small */
    color: #68bbe3;
    opacity: 1;
}

.week-card .table.borderless td:last-child {
    width: auto !important;
    text-align: left !important;
    color: #fff;
}

/* -------------------------------------------------------------------------- */
/* --------------- HORIZONTAL ROOMS SCROLLER (STUDENT PARTS) ---------------- */
/* -------------------------------------------------------------------------- */

.rooms-scroller {
    display: flex !important;
    overflow-x: auto !important;
    gap: 15px !important;
    padding: 15px 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.sala-card {
    flex: 0 0 100% !important;
    /* One card per screen on mobile usually */
    min-width: 0 !important;
    /* Critical for Chrome shrink */
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(104, 187, 227, 0.2);
    border-top: 4px solid var(--baby-blue);
    border-radius: 12px;
    padding: 15px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Specific Column Balance for Sala Cards */
.sala-card td:first-child {
    width: 40% !important;
    text-align: left;
}

.sala-card td:last-child {
    width: 60% !important;
    text-align: left;
    font-weight: bold;
    color: var(--baby-blue);
}

/* Custom Scrollbar Styling */
.rooms-scroller::-webkit-scrollbar {
    height: 6px;
}

.rooms-scroller::-webkit-scrollbar-thumb {
    background: var(--blue-grotto);
    border-radius: 10px;
}

/* -------------------------------------------------------------------------- */
/* -------------------------- MOBILE RESPONSIVE ----------------------------- */
/* -------------------------------------------------------------------------- */

@media (max-width: 576px) {
    main.container {
        padding-top: 10px !important;
    }

    .week-card {
        padding: 10px !important;
    }

    /* Peek effect: shows part of the next card */
    .sala-card {
        flex: 0 0 88% !important;
    }

    .section-title {
        font-size: 1.1rem !important;
    }

    /* Allow more space for student name on tiny screens */
    .week-card>.table-responsive>.table td:first-child {
        width: 55% !important;
    }

    .week-card>.table-responsive>.table td:last-child {
        width: 45% !important;
    }
}

/* Footer / Last Update Styles */
main[role="main"] {
    margin-top: 0px !important;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Floating Search Bar Styles   */
#floating-search-bar .input-group {
    background: #2c2c2c;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #444;
}

#member-search-input {
    background: #1a1a1a;
    border: none;
    color: white;
}

#member-search-input:focus {
    background: #1a1a1a;
    color: white;
    box-shadow: none;
}

/* Pulse animation for the "ACTUALIZADO" badge */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}