/*
====================================================
 Sistema de Eventos Institucional
 Desenvolvido por: Thalia Justino
 Ano: 2026
====================================================
*/

/* =========================
   RESET BÁSICO
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background: #f6f7f9;
    color: #1f2937;
}

/* =========================
   HEADER GLOBAL
========================= */
.app-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-wrapper {
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 15px;
}

.header-logo {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: #7a0c0d;
}

/* NAV */
.header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-nav a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    position: relative;
}

.header-nav a:hover {
    color: #7a0c0d;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7a0c0d;
    transition: width .2s ease;
}

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

.nav-highlight {
    font-weight: 600;
    color: #7a0c0d;
}

/* =========================
   CONTAINER
========================= */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* =========================
   TÍTULOS
========================= */
h1 {
    font-size: 26px;
    color: #7a0c0d;
    margin-bottom: 20px;
}

h2 {
    font-size: 20px;
    color: #7a0c0d;
    margin-bottom: 16px;
}

/* =========================
   CARDS (GENÉRICO)
========================= */
.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Separação visual no admin */
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

/* =========================
   BOTÕES
========================= */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 6px;
    background: #7a0c0d;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
}

.button:hover {
    background: #5e090a;
    transform: translateY(-1px);
}

.button.secondary {
    background: #e5e7eb;
    color: #111827;
}

.button.secondary:hover {
    background: #d1d5db;
}

.button.danger {
    background: #dc2626;
    color: #fff;
}

.button.danger:hover {
    background: #b91c1c;
}

/* Botões menores no admin */
.admin-btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
}

/* Botão customizado Bootstrap override */
.btn-primary-custom {
    background: linear-gradient(135deg, #7a0c0d 0%, #a61214 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    transition: all .3s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #5e090a 0%, #8b0f10 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(122, 12, 13, .35);
    color: #fff;
}

/* =========================
   FORMULÁRIOS
========================= */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(.form-control):not(.form-check-input),
textarea:not(.form-control) {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 14px;
}

textarea:not(.form-control) {
    resize: vertical;
}

/* Bootstrap form overrides */
.form-control:focus,
.form-select:focus {
    border-color: #7a0c0d;
    box-shadow: 0 0 0 .2rem rgba(122, 12, 13, .15);
}

.form-check-input:checked {
    background-color: #7a0c0d;
    border-color: #7a0c0d;
}

/* =========================
   LISTAS
========================= */
ul,
ol {
    padding-left: 0;
    list-style: none;
}

.list-item {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.list-item:last-child {
    border-bottom: none;
}

.list-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #7a0c0d;
}

.list-meta {
    font-size: 13px;
    color: #6b7280;
}

/* =========================
   STATUS
========================= */
.status-ok {
    color: #065f46;
    background: #d1fae5;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.status-no {
    color: #7a0c0d;
    background: #fef2f2;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
}

/* =========================
   LOGIN
========================= */
.login-box {
    max-width: 380px;
    margin: 80px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,.1);
    text-align: center;
}

/* =========================
   ADMIN - EVENTOS
========================= */
.admin-evento-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-evento-left {
    flex: 1;
}

.admin-evento-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.admin-checkbox {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =========================
   ADMIN – EVENTOS EXPANSÍVEIS
========================= */

.admin-event {
    border-radius: 8px;
    overflow: hidden;
}

.admin-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 16px;
    background: #f9fafb;
}

.admin-event-header:hover {
    background: #f3f4f6;
}

.admin-event-header i {
    transition: transform .2s ease;
}

.admin-event.active .admin-event-header i {
    transform: rotate(180deg);
}

.admin-event-actions {
    display: none;
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-event.active .admin-event-actions {
    display: flex;
    align-items: center;
}

/* Ação individual */
.admin-action {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Switch bonito (visibilidade) */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #d1d5db;
    border-radius: 999px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
}

.switch input:checked + .slider {
    background-color: #7a0c0d;
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* =============================================
   HERO SECTION — Página Inicial
============================================= */
.hero-section {
    background: linear-gradient(135deg, #7a0c0d 0%, #a61214 40%, #c4292a 100%);
    padding: 60px 20px;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,.08) 0%, transparent 60%);
    animation: heroShine 8s ease-in-out infinite;
}

@keyframes heroShine {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(5%, 3%) rotate(2deg); }
}

.hero-section .hero-logo {
    height: 90px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
    opacity: .9;
}

.hero-section h1 {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    position: relative;
}

.hero-section p {
    font-size: 16px;
    opacity: .85;
    margin-bottom: 24px;
    position: relative;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.hero-actions .btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all .3s ease;
    border: 2px solid transparent;
}

.hero-actions .btn-hero-primary {
    background: #ffffff;
    color: #7a0c0d;
}

.hero-actions .btn-hero-primary:hover {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
}

.hero-actions .btn-hero-outline {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255,255,255,.5);
}

.hero-actions .btn-hero-outline:hover {
    background: #ffffff;
    color: #7a0c0d;
    border-color: #ffffff;
    transform: translateY(-2px);
}

/* =============================================
   SECTION HEADER
============================================= */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 8px;
}

.section-header p {
    color: #6b7280;
    font-size: 15px;
}

.section-header .accent-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #7a0c0d, #c4292a);
    border-radius: 2px;
    margin: 12px auto 0;
}

/* =============================================
   EVENTS GRID — Galeria de Cards
============================================= */
.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.event-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0,0,0,.08);
    transition: all .35s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,.04);
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(122, 12, 13, .16);
    border-color: rgba(122, 12, 13, .12);
}

/* Imagem de capa */
.event-card-img {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.event-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}

.event-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7a0c0d 0%, #a61214 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 3.5rem;
    transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}

.event-card:hover .event-card-img img,
.event-card:hover .event-card-placeholder {
    transform: scale(1.08);
}

/* Badge de status sobre a imagem */
.event-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.event-card-badge.badge-open {
    background: rgba(5, 150, 105, .88);
    color: #ffffff;
}

.event-card-badge.badge-closed {
    background: rgba(122, 12, 13, .85);
    color: #ffffff;
}

.event-card-badge.badge-full {
    background: rgba(217, 119, 6, .85);
    color: #ffffff;
}

/* Corpo do card */
.event-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Metadados com ícones */
.event-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.event-card-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}

.event-card-meta-item i {
    width: 16px;
    text-align: center;
    color: #7a0c0d;
    font-size: 13px;
}

/* Botão inscrever-se */
.btn-inscrever {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7a0c0d 0%, #a61214 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .3s ease;
    margin-top: auto;
}

.btn-inscrever:hover {
    background: linear-gradient(135deg, #5e090a 0%, #8b0f10 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(122, 12, 13, .3);
    color: #ffffff;
}

.btn-inscrever.disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

/* Mensagem sem eventos */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: .5;
}

.empty-state p {
    font-size: 16px;
}

/* =============================================
   UPLOAD AREA
============================================= */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 16px;
    transition: border-color .2s ease;
}

.upload-area:hover {
    border-color: #7a0c0d;
}

/* =============================================
   MOBILE
============================================= */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #7a0c0d;
}

/* TABLET */
@media (max-width: 992px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* MOBILE BREAKPOINT */
@media (max-width: 768px) {

    .header-container {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
    }

    .header-nav {
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 12px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #e5e7eb;
    }

    .header-nav.active {
        display: flex;
    }

    .container {
        margin: 20px auto;
        padding: 0 16px;
    }

    .admin-evento-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-evento-actions {
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hero-section {
        padding: 40px 16px;
    }

    .hero-section h1 {
        font-size: 24px;
    }

    .section-header h2 {
        font-size: 22px;
    }

    .agenda-filters {
        flex-wrap: wrap;
    }

    .agenda-timeline {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   AGENDA DE ESPAÇOS
============================================= */

/* Filtros */
.agenda-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    justify-content: center;
}

.agenda-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #e5e7eb;
    color: #4b5563;
    background: #ffffff;
    transition: all .25s ease;
    white-space: nowrap;
}

.agenda-filter-btn:hover {
    border-color: #7a0c0d;
    color: #7a0c0d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 12, 13, .12);
}

.agenda-filter-btn.active {
    background: linear-gradient(135deg, #7a0c0d 0%, #a61214 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(122, 12, 13, .3);
}

/* Card do local */
.agenda-local-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 0;
    margin-bottom: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.04);
}

.agenda-local-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #7a0c0d 0%, #a61214 100%);
    color: #ffffff;
}

.agenda-local-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.agenda-local-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

/* Timeline grid */
.agenda-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #e5e7eb;
}

/* Dia individual */
.agenda-day {
    background: #ffffff;
    padding: 16px;
    min-height: 120px;
}

.agenda-day-today {
    background: #fef2f2;
}

.agenda-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f3f4f6;
}

.agenda-day-today .agenda-day-header {
    border-bottom-color: #7a0c0d;
}

.agenda-day-name {
    font-weight: 700;
    font-size: 13px;
    color: #1f2937;
}

.agenda-day-today .agenda-day-name {
    color: #7a0c0d;
}

.agenda-day-date {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
}

/* Slot livre */
.agenda-slot-free {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #d1fae5;
    color: #065f46;
    font-size: 12px;
    font-weight: 500;
}

.agenda-slot-free i {
    font-size: 14px;
}

/* Slot ocupado */
.agenda-slot-busy {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    border-left: 3px solid #7a0c0d;
    margin-bottom: 8px;
}

.agenda-slot-busy:last-child {
    margin-bottom: 0;
}

.agenda-slot-time {
    font-size: 11px;
    font-weight: 700;
    color: #7a0c0d;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.agenda-slot-title {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
}

/* TABLET */
@media (max-width: 992px) {
    .agenda-timeline {
        grid-template-columns: repeat(2, 1fr);
    }
}
