/* Calendario Page Stylesheet */
/* Styles for the class schedule calendar page */

/* ==========================================================================
   Base Styles and Layout
   ========================================================================== */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: white;
}

/* ==========================================================================
   Navigation Styles
   ========================================================================== */

.navbar {
    font-size: 16px;
    padding: 1% 10%;
    background-color: white;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.navbar.hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

.nav-link {
    font-weight: 400;
    transition: all 0.3s ease-in-out;
    position: relative;
}

.nav-link:hover {
    color: black !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -1px;
    left: 50%;
    background-color: orange;
    transition: all 0.3s ease-in-out;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-nav {
    gap: 6rem;
}

.btn-primary, .btn-outline-secondary {
    border-radius: 25px;
    padding: 5px 20px;
}

.container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-collapse {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn-primary, .btn-outline-secondary {
    padding: 5px 20px;
    transition: transform 0.2s ease-in-out, background-color 0.3s ease, color 0.3s ease;
    transform: skew(-25deg);
    border: 1px solid transparent;
    border-radius: 0;
}

.btn-primary {
    background-color: orange;
    color: black;
    border: 1px solid orange;
}

.btn-primary:hover {
    background-color: black;
    color: orange;
    border: 1px solid green;
    transform: skew(-12.5deg) scale(1.1);
}

.btn-outline-secondary:hover {
    transform: skew(-12.5deg) scale(1.1);
    background-color: black;
    color: white;
    border: none;
}

/* Navigation buttons */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #f97316;
    border: none;
    cursor: pointer;
    font-size: 4rem;
    z-index: 10;
    background: none;
    padding: 0;
    transition: transform 0.2s ease-in-out, color 0.3s;
}

.nav-button:hover {
    transform: translateY(-50%) scale(1.3);
    color: #ff6a00;
}

/* ==========================================================================
   Header and Title
   ========================================================================== */

h2 {
    text-align: center;
    margin-bottom: 25px;
    opacity: 0;
    transform: translateY(-25px);
    animation: slideDown 0.8s ease-out forwards;
}

@keyframes slideDown {
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ==========================================================================
   Filter Section
   ========================================================================== */

.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    max-width: 900px;
    margin: 0 auto 25px auto;
}

.filters select, .filters button {
    padding: 8px 14px;
    font-size: 14px;
    min-width: 140px;
    border-radius: 6px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: background 0.2s ease;
}

.filters button {
    background: #000;
    color: white;
    border: none;
}

.filters button:hover {
    background: orange;
}

/* ==========================================================================
   Calendar Table
   ========================================================================== */

.calendar-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

table {
    width: 95%;
    max-width: 950px;
    border-collapse: separate;
    border-spacing: 0 6px;
    text-align: center;
    background-color: #ffffff;
    margin: 0 auto;
}

th {
    background: orange;
    color: white;
    font-weight: bold;
    padding: 12px;
    font-size: 14px;
}

tbody tr td {
    background: #f5f5f5;
}

tbody tr:nth-child(even) td {
    background: #e9e9e9;
}

tbody tr { 
    height: 62px; 
}

tbody tr td { 
    padding-top: 18px; 
    padding-bottom: 18px; 
}

tbody tr:hover td { 
    background: #ffe8d1 !important; 
}

/* ==========================================================================
   Class Items
   ========================================================================== */

.class-item {
    background: #ffffff;
    border-left: 4px solid orange;
    padding: 6px;
    margin: 5px 0;
    border-radius: 5px;
    text-align: left;
    position: relative;
    cursor: pointer;
    z-index: 20;
}

.class-item strong { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

/* Tooltip */
.class-item .tooltip {
    visibility: hidden;
    opacity: 0;
    width: 180px;
    background-color: #1a1a1a;
    color: #fff;
    text-align: left;
    padding: 10px;
    border-radius: 8px;
    position: absolute;
    z-index: 9999;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.25s ease-in-out;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-size: 13px;
}

.class-item .tooltip::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -6px;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent #1a1a1a transparent transparent;
}

.class-item:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* ==========================================================================
   Map Container
   ========================================================================== */

#map-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    clip-path: polygon(0% 0%, 20% 10%, 30% 5%, 70% 5%, 80% 10%, 100% 0%, 100% 90%, 80% 85%, 70% 90%, 30% 90%, 20% 85%, 0% 90%);
    z-index: 1;
}

#map-container::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 50px;
    background: white;
    z-index: 3;
}

/* Merge footer with map */
.footer-container {
    background: white;
    margin-top: -25px;
    padding-top: 40px;
    z-index: 2;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.footer-container {
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    padding: 100px 50px 1px 50px;
}

.footer-top, .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px 0;
}

.footer-section {
    flex: 1;
    padding: 10px;
}

.footer-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section.start {
    text-align: left;
}

.footer-section.center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-section.end {
    text-align: end;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-section ul {
    list-style-type: none;
    padding: 0;
}

.footer-section form {
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

.footer-section button {
    background-color: #ff6600;
    color: rgb(0, 0, 0);
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-icons {
    right: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons a {
    color: rgb(0, 0, 0);
    font-size: 20px;
    transition: 0.3s;
}

.social-icons a:hover {
    color: #ff6600;
}

.footer-bottom .footer-section {
    display: flex;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 991px) {
    .container-fluid {
        flex-direction: row;
        justify-content: space-between;
    }
    .navbar-brand {
        margin-right: auto;
    }
    .navbar-toggler {
        order: 2;
        margin: 0 auto;
    }
    .d-flex.gap-3 {
        order: 3;
        margin-left: auto;
    }
    .navbar-collapse {
        width: 100%;
        text-align: center;
        transition: height 0.3s ease-in-out;
        overflow: hidden;
        display: block;
        width: 100%;
        text-align: center;
    }
    .navbar-nav {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    h2 { 
        font-size: 22px; 
    }
    
    table { 
        width: 100%; 
    }
    
    .filters { 
        flex-direction: column; 
        padding: 20px; 
    }
    
    .filters select, .filters button {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .filters {
        padding: 15px;
        gap: 10px;
    }
    
    .filters select, .filters button {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    th {
        font-size: 12px;
        padding: 8px 4px;
    }
    
    .class-item {
        font-size: 12px;
        padding: 4px;
    }
    
    .class-item .tooltip {
        width: 150px;
        font-size: 11px;
        padding: 8px;
    }
}
