/* ---------------------------------------------------------------------- */
/*	Global - Mobile First (Estilos Padrão/Telas Pequenas)
/* ---------------------------------------------------------------------- */
html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif, serif;
    color: var(--primaryColor, #1b4332);
    font-size: var(--fontSize, 1rem);
    font-weight: var(--fontWeight, 400);
    background: var(--backgroundColor, #fafafa);
}

body > * {
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ---------------------------------------------------------------------- */
/*	Header - Mobile First
/* ---------------------------------------------------------------------- */
header {
    padding: 1.5rem 0;
}

header .logo {
    text-align: center;
}

header .logo img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primaryColor, #1b4332);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0 auto 10px;
}

header .logo h1 {
    font-size: 1.25rem;
    font-weight: 500;
}

header .social-medias {
    text-align: center;
    margin-top: 0.5rem;
}

header .social-medias a {
    font-size: 1.25rem;
}

header .social-medias a i {
    background-image: linear-gradient(
        45deg,
        #f09433 0%,
        #e6683c 25%,
        #dc2743 50%,
        #cc2366 75%,
        #bc1888 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

/* ---------------------------------------------------------------------- */
/*	Notices & Cards
/* ---------------------------------------------------------------------- */
.notices {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.card-body {
    background-color: var(--primaryColor, #1b4332) !important;
    color: var(--whiteColor, #ffffff) !important;
}

.card-text {
    color: var(--whiteColor, #ffffff) !important;
}

/* ---------------------------------------------------------------------- */
/*	Galeria de Fotos (Gallery Section) - Mobile First
/* ---------------------------------------------------------------------- */
.gallery-section {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

.gallery-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primaryColor, #1b4332);
    margin-bottom: 1.25rem;
    position: relative;
    display: inline-block;
}

.gallery-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--primaryColor, #2d6a4f);
    border-radius: 2px;
    margin-top: 4px;
}

/* Grid da Galeria (1 a 2 colunas no mobile) */
.about-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

/* Item Individual da Imagem */
.about-image-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #e9ecef;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.3s ease;
}

.about-image-item:active {
    transform: scale(0.98);
}

/* Link container */
.gallery-link {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3; /* Proporção uniforme para as fotos */
    text-decoration: none;
    overflow: hidden;
}

/* A Imagem */
.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Efeito Hover nas Imagens */
.about-image-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.about-image-item:hover .about-image {
    transform: scale(1.08);
}

/* Overlay / Legenda */
.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* chamadas */
.attendance-session {
    background-color: var(--primaryColor, #1b4332);
    color: var(--whiteColor, #ffffff);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1.5rem;
}

.attendance-session h1 {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
}

.attendance-session h2 {
    margin-top: 1rem !important;
    padding: 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
    background-color: var(--secondaryColor);
    border-radius: var(--borderRadius, 8px);
}

.attendance-session h3,
.attendance-session h4 {
    margin-top: 1rem !important;
    padding: 0.5rem 0;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    background-color: var(--redColor);
    border-radius: var(--borderRadius, 8px);
}

/* ---------------------------------------------------------------------- */
/*	Media Queries (Breakpoints para telas maiores)
/* ---------------------------------------------------------------------- */

/* Tablets e pequenos laptops (>= 576px) */
@media (min-width: 576px) {
    .about-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }

    .gallery-title {
        font-size: 1.4rem;
    }

    .image-caption {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
}

/* Tablets e desktops médios (>= 768px) */
@media (min-width: 768px) {
    header {
        padding: 2rem 0;
    }

    header .logo img {
        width: 120px;
        height: 120px;
        border-width: 4px;
        margin-bottom: 15px;
    }

    header .logo h1 {
        font-size: 1.5rem;
    }

    header .social-medias a {
        font-size: 1.5rem;
    }

    .gallery-section {
        margin-top: 3rem;
    }

    .about-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }

    .about-image-item:hover {
        transform: translateY(-4px);
    }
}

/* Desktops grandes (>= 1200px) */
@media (min-width: 1200px) {
    .about-images-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

.title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primaryColor, #1b4332);
    margin-bottom: 0.9rem;
}

/* ---------------------------------------------------------------------- */
/*	Attendance Session - Form de Busca (Radio Buttons + Input)
/* ---------------------------------------------------------------------- */

.attendance-session .card {
    border-radius: var(--borderRadius, 12px);
    background-color: #ffffff !important;
}

.attendance-session .card .form-label {
    color: var(--primaryColor, #1b4332);
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    margin-bottom: 0.5rem;
}

/* ---------------------------------------------------------------------- */
/*	Radio Buttons (Tipo de Busca) - Estilo Customizado
/* ---------------------------------------------------------------------- */
#formSearchStudent .btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border: 0;
}

#formSearchStudent .btn-group .btn {
    flex: 1 1 auto;
    min-width: 120px;
    border-radius: var(--borderRadius, 8px) !important;
    border: 2px solid var(--primaryColor, #1b4332);
    background-color: transparent;
    color: var(--primaryColor, #1b4332);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.55rem 0.75rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

#formSearchStudent .btn-group .btn:hover {
    background-color: rgba(27, 67, 50, 0.08);
    transform: translateY(-1px);
}

/* Estado ativo/selecionado do radio */
#formSearchStudent .btn-check:checked + .btn {
    background-color: var(--primaryColor, #1b4332);
    color: #ffffff;
    border-color: var(--primaryColor, #1b4332);
    box-shadow: 0 4px 10px rgba(27, 67, 50, 0.25);
}

#formSearchStudent .btn-check:focus + .btn,
#formSearchStudent .btn-check:focus-visible + .btn {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.25);
}

#formSearchStudent .btn-check:checked + .btn i {
    color: #ffffff;
}

/* ---------------------------------------------------------------------- */
/*	Input de Busca
/* ---------------------------------------------------------------------- */
#formSearchStudent #searchInput {
    border: 2px solid #e0e0e0;
    border-radius: var(--borderRadius, 8px);
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
    background-color: #ffffff;
    color: var(--primaryColor, #1b4332);
}

#formSearchStudent #searchInput:focus {
    border-color: var(--primaryColor, #1b4332);
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.15);
    outline: none;
}

#formSearchStudent #searchInput::placeholder {
    color: #9aa5a0;
}

/* ---------------------------------------------------------------------- */
/*	Botão Buscar
/* ---------------------------------------------------------------------- */
#formSearchStudent button[type='submit'] {
    background-color: var(--primaryColor, #1b4332);
    border-color: var(--primaryColor, #1b4332);
    border-radius: var(--borderRadius, 8px);
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    transition:
        background-color 0.25s ease,
        transform 0.15s ease;
}

#formSearchStudent button[type='submit']:hover {
    background-color: #2d6a4f;
    border-color: #2d6a4f;
    transform: translateY(-1px);
}

#formSearchStudent button[type='submit']:active {
    transform: translateY(0);
}

/* ---------------------------------------------------------------------- */
/*	Lista de Resultados
/* ---------------------------------------------------------------------- */
#studentsList .list-group-item {
    border: 1px solid #eef1ef;
    border-radius: var(--borderRadius, 8px) !important;
    margin-bottom: 8px;
    background-color: #ffffff;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

#studentsList .list-group-item:hover {
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.08);
    transform: translateY(-1px);
}

#studentsList .list-group-item .fw-bold {
    color: var(--primaryColor, #1b4332);
}

/* Botões Vou / Não vou */
#studentsList .btn-group .btn {
    border-radius: var(--borderRadius, 8px) !important;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

#studentsList .btn-outline-success {
    color: #1b4332;
    border-color: #1b4332;
}

#studentsList .btn-outline-success:hover,
#studentsList .btn-outline-success:focus {
    background-color: #1b4332;
    border-color: #1b4332;
    color: #ffffff;
}

#studentsList .btn-outline-danger {
    color: #b00020;
    border-color: #b00020;
}

#studentsList .btn-outline-danger:hover,
#studentsList .btn-outline-danger:focus {
    background-color: #b00020;
    border-color: #b00020;
    color: #ffffff;
}

/* ---------------------------------------------------------------------- */
/*	Ajustes Responsivos
/* ---------------------------------------------------------------------- */
@media (max-width: 575px) {
    #formSearchStudent .btn-group .btn {
        flex: 1 1 100%;
        min-width: 0;
    }
}

/* ============================================
   Modal Termo de Responsabilidade
   ============================================ */

.term-modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: termModalFadeIn 0.35s ease-out;
}

.term-modal-header {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: #fff;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.term-modal-header .modal-title {
    font-size: 1.15rem;
    letter-spacing: 0.3px;
}

.term-modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.term-modal-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.term-modal-body {
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.term-modal-body .text-danger {
    color: #dc3545 !important;
    font-size: 1.05rem;
}

.term-modal-body .bi-info-circle-fill {
    font-size: 1.1rem;
}

.term-modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.term-modal-footer .btn {
    border-radius: 10px;
    padding: 0.55rem 1.2rem;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.term-modal-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.term-modal-footer .btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
}

.term-modal-footer .btn-secondary {
    background-color: #6c757d;
    border: none;
}

/* Animação de entrada */
@keyframes termModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Backdrop mais escuro */
.modal-backdrop.show {
    opacity: 0.65;
}

/* Responsividade */
@media (max-width: 576px) {
    .term-modal-header {
        padding: 1rem 1.1rem;
    }

    .term-modal-header .modal-title {
        font-size: 1rem;
    }

    .term-modal-body {
        padding: 1.15rem;
        font-size: 0.95rem;
    }

    .term-modal-footer {
        padding: 0.9rem 1.1rem;
        flex-direction: column;
    }

    .term-modal-footer .btn {
        width: 100%;
        margin: 0;
    }
}
