@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/* Certifique-se de que esta linha está no seu HTML no <head> */
/* <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" /> */

/* Cores institucionais Unisc com base no Manual de Marca: */
/* Azul Marinho: #092F59 */
/* Azul Cobalto (Principal): #005EA3 */
/* Azul Sereno (Destaque/Secundário): #70A8F5 */
/* Branco Fosco (Fundo Geral): #EAECEF */
/* Branco (Fundo de Cards/Texto sobre escuro): #FFFFFF */
/* Cinza Escuro (Texto principal): #333333 */
/* Cinza Médio (Texto secundário): #555555, #444444 */
/* Cinza Claro (Bordas/Separadores/Fundo Elementos): #F0F0F0, #F8F8F8, #EEEEEE, #DDDDDD */


body {
    font-family: 'Raleway', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 20px;
    box-sizing: border-box;

    background-image: url('../images/fundo_formulario.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 94, 163, 0.3); /* Fundo azul mais transparente (0.3) */
    z-index: -1;
}


.site-header {
    text-align: center;
    margin-bottom: 25px;
    padding: 0 15px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1200px;
    z-index: 2;
}

.site-header h1 {
    color: #FFFFFF;
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.1;
    /*text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);*/
}

.site-header .header-logo {
    height: 50px;
    width: auto;
    /*filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.2));*/
}

.planner-content-wrapper {
    padding: 0px;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 2;
    position: relative;
    background-color: rgba(255, 255, 255, 0.70); 
    border-radius: 12px;
    /*box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);*/
    backdrop-filter: blur(5px);
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px; 
    padding: 15px 20px;    
    background-color: transparent; 
    border-radius: 0; 
    box-shadow: none; 
    backdrop-filter: none; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.05); 
}

.navigation button {
    background: none;
    color: #005EA3;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.8em;
    transition: color 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navigation button:hover {
    color: #70A8F5;
    background-color: rgba(0, 94, 163, 0.1);
}

#currentWeek {
    font-size: 1.4em;
    font-weight: 700;
    color: #333333;
    white-space: nowrap;
    text-align: center;
    flex-grow: 1;
}

/* --- ESTILOS DO CALENDÁRIO PARA DESKTOP (display: grid) --- */
.calendar-mobile-view {
    display: none;
}

.calendar-grid.desktop-view {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    grid-template-rows: auto auto auto auto;
    background-color: transparent; 
    border-radius: 0; 
    overflow: hidden; 
    box-shadow: none; 
    backdrop-filter: none; 
    padding: 5px; 
}

.day-names-header {
    display: contents;
}

.day-name {
    background-color: rgba(112, 168, 245, 0.9); 
    color: #FFFFFF;
    padding: 10px 5px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95em;
    border-right: 1px solid rgba(255, 255, 255, 0.5); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 6px; 
    margin: 2px;
}


.day-names-header .day-name:first-child { margin-left: 0; }
.day-names-header .day-name:last-child { margin-right: 0; border-right: none; } 


.empty-corner {
    background-color: rgba(112, 168, 245, 0.9); 
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin: 2px;
}


.shift-row {
    display: contents;
}

.shift-label {
    background-color: rgba(9, 47, 89, 0.6);
    color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.1em;
    padding: 10px 0;
    /*border-right: 1px solid rgba(255, 255, 255, 0.2); Borda branca mais sutil (0.2) */
    /*border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
	border-radius: 6px; /* Adicionar borda arredondada */
    margin: 2px;
}

.shift-row:last-child .shift-label {
    border-bottom: none;
}

.day-cell {
    display: flex;
    flex-direction: column;
    padding: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.1); /* Borda branca bem leve (0.1) */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Borda branca bem leve (0.1) */
    overflow-y: auto;
    min-height: 100px;
}

.day-cell:last-child {
    border-right: none;
}

.shift-row:last-child .day-cell {
    border-bottom: none;
}

.calendar-grid.desktop-view .shift-section {
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
    flex-grow: 0;
    min-height: unset;
    max-height: unset;
    overflow-y: visible;
}

.calendar-grid.desktop-view .shift-title {
    display: none;
}

.event {
    background-color: rgba(255, 255, 255, 0.9); 
    border: 1px solid rgba(255, 255, 255, 0.5); 
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #333333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-weight: 400;
}

.event strong {
    display: block;
    margin-bottom: 4px;
    color: #092F59; 
    font-weight: 600;
}

.event span {
    display: block;
    font-size: 0.85em;
    color: #555555;
    font-weight: 400;
}

.event:last-child {
    margin-bottom: 0;
}

.calendar-grid.desktop-view .no-events {
    font-size: 0.8em;
    color: #F8F8F8; 
    text-align: center;
    margin-top: 10px;
}


/* --- RESPONSIVIDADE --- */

@media (min-width: 769px) {
    .calendar-grid.desktop-view {
        display: grid;
    }
    .calendar-mobile-view {
        display: none;
    }
}

@media (max-width: 1050px) {
    .site-header h1 {
        font-size: 2.5em;
    }
    .site-header .header-logo {
        height: 50px;
    }
    .navigation button {
        font-size: 1.6em;
        padding: 8px 15px;
    }
    #currentWeek {
        font-size: 1.2em;
    }
    .calendar-grid.desktop-view {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    .shift-label {
        font-size: 1em;
    }
    .day-cell {
        min-height: 80px;
    }
}

/* Estilos MOBILE (mantidos como estavam, pois você pediu para não alterá-los) */
@media (max-width: 768px) {
    .calendar-grid.desktop-view {
        display: none;
    }
    .calendar-mobile-view {
        display: block;
        width: 100%;
    }

    body {
        padding: 15px;
    }
    .site-header {
        margin-bottom: 30px;
    }
    .site-header h1 {
        font-size: 2em;
    }
    .site-header .header-logo {
        height: 40px;
    }
    .planner-content-wrapper {
        padding: 25px;
        background-color: rgba(255, 255, 255, 0.75);
        border-radius: 12px;
        /*box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);*/
        backdrop-filter: none;
    }
    .navigation {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        margin-bottom: 25px;
        padding: 15px 20px;
        background-color: rgba(255, 255, 255, 0.85);
        border-radius: 12px;
        /*box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);*/
        backdrop-filter: blur(5px);
    }
    .navigation button {
        font-size: 1.4em;
        padding: 6px 10px;
    }
    #currentWeek {
        font-size: 1em;
        flex-grow: 1;
        text-align: center;
        margin: 0 8px;
        white-space: normal;
    }

    .day {
        border-right: none;
        border-bottom: none;
        margin-bottom: 15px;
        border-radius: 12px;
        overflow: hidden;
       /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/
        background-color: #FFFFFF;
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .day:last-child {
        margin-bottom: 0;
    }

    .day-header {
        border-right: none;
        border-bottom: none;
        padding: 15px 20px;
        font-size: 1.2em;
        white-space: normal;
        text-align: left;
        border-radius: 12px 12px 0 0;
        background-color: #005EA3;
        color: #FFFFFF;
        justify-content: space-between;
        margin: 0;
        display: flex;
        cursor: pointer;
    }
    .day-header.active {
        background-color: #092F59;
    }

    .accordion-icon {
        display: inline-block;
        font-size: 0.9em;
        color: rgba(255, 255, 255, 0.9);
        transition: transform 0.3s ease;
        font-family: 'Material Symbols Outlined';
        font-weight: normal;
        font-style: normal;
        font-size: 24px;
        line-height: 1;
        letter-spacing: normal;
        text-transform: none;
        white-space: nowrap;
        word-wrap: normal;
        direction: ltr;
        -webkit-font-feature-settings: 'liga';
        -webkit-font-smoothing: antialiased;
    }

    .day-header.active .accordion-icon {
        transform: rotate(180deg);
    }

    .day-content {
        display: none;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease-out, padding 0.3s ease-out;
        padding: 0 20px 20px 20px;
        flex-direction: column;
        background-color: #F8F8F8;
    }

    .day-content.active {
        display: flex;
        height: auto;
        overflow: visible;
        padding: 15px 20px 20px 20px;
    }

    .shift-title {
        font-size: 0.9em;
        font-weight: 700;
        color: #092F59;
        margin: 10px 0 5px;
        text-align: center;
        border-bottom: 1px dashed #DDDDDD;
        padding-bottom: 3px;
        display: block;
    }

    .shift-section {
        min-height: unset;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 15px;
        padding: 12px;
        background-color: #FFFFFF;
        border-radius: 8px;
       /* box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);*/
        flex-grow: 0;
    }
    .shift-section:last-child {
        margin-bottom: 0;
    }
    .event {
        font-size: 0.9em;
        padding: 10px;
        margin-bottom: 10px;
        border-radius: 6px;
        /*box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);*/
        background-color: #E6F3FB;
        border: 1px solid #A0CCE9;
    }

    .calendar-mobile-view .no-events {
        font-size: 0.8em;
        color: #888;
        text-align: center;
        margin-top: 5px;
        margin-bottom: 5px;
    }
}


@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    .site-header h1 {
        font-size: 1.8em;
    }
    .site-header .header-logo {
        height: 30px;
    }
    .planner-content-wrapper {
        padding: 15px;
    }
    .navigation button {
        font-size: 1.2em;
        padding: 5px 8px;
    }
    #currentWeek {
        font-size: 0.9em;
    }
    .day-header {
        font-size: 1.05em;
        padding: 12px 15px;
    }
    .shift-section {
        padding: 10px;
    }
    .event {
        font-size: 0.8em;
        padding: 8px;
    }
}