/* ============================================================
   CONFIGURAÇÕES GERAIS (Fonte Arial e Cores)
   ============================================================ */
:root {
    --azul-claro: #ADD8E6;
    --vermelho: #FF0000;
    --preto: #000000;
    --cinza-fundo: #f4f4f4;
    --branco: #ffffff;
}

body { 
    font-family: Arial, Helvetica, sans-serif; 
    background-color: var(--cinza-fundo); 
    margin: 0; 
    padding: 0;
    color: var(--preto); 
    line-height: 1.6;
}

/* ============================================================
   CABEÇALHO E LOGO RESPONSIVA
   ============================================================ */
header { 
    background-color: var(--azul-claro); 
    color: var(--preto); 
    padding: 20px 0; 
    text-align: center; 
    border-bottom: 5px solid var(--vermelho); 
}

.logo-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

.logo-horizontal {
    max-width: 350px; /* Tamanho máximo da logo no PC */
    width: 100%;      /* Ajusta ao tamanho da tela em dispositivos menores */
    height: auto;     /* Mantém a proporção */
    display: block;
    margin: 0 auto 10px auto;
}

header h1 { 
    margin: 5px 0; 
    font-size: 1.6em; 
    text-transform: uppercase;
    font-weight: bold;
}

/* ============================================================
   NAVEGAÇÃO (MENU)
   ============================================================ */
nav { 
    background: var(--branco); 
    padding: 12px; 
    text-align: center; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky; 
    top: 0;
    z-index: 1000;
}

nav a { 
    margin: 0 12px; 
    text-decoration: none; 
    color: var(--vermelho); 
    font-weight: bold; 
    font-size: 0.9em; 
}

nav a:hover {
    text-decoration: underline;
}

/* ============================================================
   CONTAINER E CARDS
   ============================================================ */
.container { 
    max-width: 1000px; 
    margin: 20px auto; 
    padding: 15px; 
}

.card { 
    background: var(--branco);
    border-left: 6px solid var(--azul-claro); 
    padding: 20px; 
    margin-bottom: 20px; 
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
}

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
input, textarea, select { 
    width: 100%; 
    padding: 12px; 
    margin: 10px 0; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    font-family: Arial, sans-serif;
    box-sizing: border-box; /* Evita que o input saia da tela */
}

.btn-submit { 
    background: var(--vermelho); 
    color: var(--branco); 
    border: none; 
    padding: 12px 25px; 
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer; 
    border-radius: 5px; 
    width: 100%; /* Botão largo no celular */
    transition: background 0.3s;
}

.btn-submit:hover { 
    background: #cc0000; 
}

/* ============================================================
   CALENDÁRIO (FULLCALENDAR)
   ============================================================ */
#calendar {
    background: var(--branco);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Cores dos eventos no calendário */
.fc-event {
    background-color: var(--vermelho) !important;
    border: none !important;
    cursor: pointer;
}

/* ============================================================
   MODAL (POP-UP DE DETALHES)
   ============================================================ */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; top: 0;
    width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.7); 
}

.modal-content {
    background-color: var(--branco);
    margin: 10% auto; 
    padding: 25px;
    border-radius: 12px;
    width: 85%; 
    max-width: 500px;
    border-top: 10px solid var(--azul-claro);
    position: relative;
}

.close {
    position: absolute;
    right: 15px; top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* ============================================================
   OTIMIZAÇÃO PARA MOBILE (TELAS ATÉ 600px)
   ============================================================ */
@media (max-width: 600px) {
    /* Ajuste do Calendário para caber na tela */
    .fc { font-size: 0.85em; } /* Diminui a fonte geral do calendário */
    .fc-toolbar-title { font-size: 1em !important; } /* Título do mês menor */
    .fc-toolbar { flex-direction: column; gap: 10px; } /* Empilha botões do topo */
    
    /* Botões menores no menu e geral */
    nav a { padding: 5px; font-size: 0.8em; margin: 2px; }
    .btn-submit { padding: 8px 15px; font-size: 0.9em; }

    /* POPUP (MODAL) OTIMIZADO - QUADRO BRANCO SOBREPONDO */
    .modal-content {
        margin: 5% auto; /* Aproxima do topo */
        width: 95% !important; /* Quase largura total */
        padding: 15px;
        border-radius: 5px;
        box-sizing: border-box;
    }

    #modalTitle { font-size: 1.2em; line-height: 1.2; }
    #modalBody { font-size: 0.9em; max-height: 60vh; overflow-y: auto; } /* Scroll se texto for longo */
    
    .logo-horizontal { max-width: 180px; }
}

/* Efeito de sobreposição do Modal */
.modal {
    background-color: rgba(0,0,0,0.85); /* Fundo mais escuro para destacar o quadro branco */
    backdrop-filter: blur(3px); /* Leve desfoque ao fundo */
}