/* ===== LAYOUT ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

.sugestoes-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 300px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    z-index: 999;
    overflow: hidden;
    display: none;
}
.sugestao-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.sugestao-item:hover { background: #f4f4f4; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}
.stat-card {
    background: transparent;
    border: 1.5px solid var(--black);
    border-radius: 12px;
    padding: 20px;
}
.stat-label {
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;

}
.stat-value {
    font-size: 30px;
    font-weight: 600;
    color: var(--black);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-sub {
    /*font-size: 12px;*/
    /*color: #aaa;*/
    display: none;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 28px 32px;
    border-right: 1px solid var(--subtle);
    background: var(--bg);
}

.brand {
    margin-bottom: 40px;
    text-align: center;
}

.brand-tagline {
    font-family: "Montserrat", sans-serif;;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
    margin-top: 5px;
}

/* ===== SIDEBAR HEADER ===== */
.sidebar-header {
    text-align: center;
    margin-bottom: 15px;
}

.sidebar-header .header-link {
    text-decoration: none;
    display: inline-block;
}

.sidebar-header .logo-vertical {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
    transition: transform 0.2s ease;
}

.sidebar-header .logo-horizontal {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.2s ease;
}

.sidebar-header .header-link:hover .logo-vertical,
.sidebar-header .header-link:hover .logo-horizontal {
    transform: scale(1.05);
}

/* Hide landing elements in sidebar */
.sidebar-header .tagline,
.sidebar-header .header-btns {
    display: none;
}

/* ===== HOME PAGE HEADER (for logged-in user dashboard) ===== */
.home-header {
    text-align: center;
    padding: 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--subtle);
    margin-bottom: 20px;
}

.home-header .header-link {
    text-decoration: none;
    display: inline-block;
}

.home-header .logo-vertical {
    width: 80px;
    display: block;
    margin: 0 auto 10px;
    transition: transform 0.3s ease;
}

.home-header .logo-horizontal {
    width: 200px;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.home-header .header-link:hover .logo-vertical,
.home-header .header-link:hover .logo-horizontal {
    transform: scale(1.03);
}

/* ===== NAVIGATION LINKS ===== */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    margin-top: 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    transition: all 0.15s;
}

.nav-link:hover {
    background: var(--card-bg);
    color: var(--black);
}

.nav-link.active {
    background: var(--black);
    color: var(--white);
}

.nav-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    flex-shrink: 0;
}

/* ===== SIDEBAR USER ===== */
.sidebar-user {
    border-top: 1px solid var(--subtle);
    padding-top: 20px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-tipo {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-logout {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--subtle);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.sidebar-logout:hover {
    color: var(--black);
}

.sidebar-logout svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

/* ===== MAIN CONTENT ===== */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 40px 48px 80px;
    max-width: calc(100% - var(--sidebar-w));
    width: 100%;
}

/* ===== TOPBAR ===== */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
    flex-wrap: wrap;  /* ADICIONE - permite quebra em mobile */
}

.topbar-title {
    font-family: "Montserrat", sans-serif;
    font-size: 32px;
    letter-spacing: -0.5px;
    font-weight: 600;
    flex-shrink: 0;  /* ADICIONE - evita que o título encolha */
}
.search-bar {
    display: flex;
    position: relative;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border-radius: 99px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--muted);
    width: 300px;  /* AUMENTE de 200px para 300px ou mais */
    min-width: 200px;  /* LARGURA MÍNIMA */
    max-width: 400px;  /* LARGURA MÁXIMA */
    flex: 1;  /* ADICIONE - permite crescer */
}

.search-bar svg {
    width: 14px;
    height: 14px;
    stroke: var(--muted);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    flex: 1;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    color: var(--muted);
    padding: 0;
    width: 100%;  /* ADICIONE */
    min-width: 0;  /* ADICIONE - importante para flex funcionar */
}

.search-bar input::placeholder {
    color: var(--muted);
    font-family: "Montserrat", sans-serif;
    white-space: nowrap;  /* ADICIONE - evita quebra de linha */
    overflow: visible;    /* ADICIONE */
}

.filtros-ativos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.filtro-ativo-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef4f0;
    color: #3c6e47;
    border: 1px solid #b8d4bf;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
}
.filtro-ativo-pill a {
    color: #3c6e47;
    text-decoration: none;
    font-weight: 700;
    margin-left: 2px;
    line-height: 1;
}
.filtro-ativo-pill a:hover {
    color: #c0392b;
}

/* ===== MOBILE NAVIGATION ===== */
.navbar-mobile {
    display: none;
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 304px;
    height: 62px;
    background: var(--black);
    border-radius: 99px;
    padding: 0 16px;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.navbar-mobile a {
    color: white;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
}

.navbar-mobile .nav-item {
    display: flex;
    align-items: center;
    opacity: 0.35;
    transition: opacity 0.15s;
    text-decoration: none;
}
.navbar-mobile .nav-item.active, .navbar-mobile .nav-item:hover {
    opacity: 1;
}
.navbar-mobile .nav-item svg {
    width: 20px;
    height: 20px;
    stroke: var(--white);
    fill: white;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--black);
    border: 1px solid var(--black);
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.btn btn-secondary.ativo {
    background: var(--black);
    color: var(--white);
}

/* ===== ADVANCED FILTERS ===== */
.filtros-avancados {
    margin-bottom: 24px;
}

.filtros-grid {
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--subtle);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.filtro-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filtro-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.filtro-group select,
.filtro-group input {
    border: 1px solid var(--black);
    border-radius: 30px;
    font-family: "Montserrat", sans-serif;;
    font-size: 13px;
    background: transparent;
    color: var(--black);
    transition: border-color 0.15s;
}

.filtro-group input {
    padding: 10px 14px;
}

.filtro-group select {
    cursor: pointer;
    padding: 12px 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='black' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 4a.5.5 0 0 1 .5.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L7.5 10.293V4.5A.5.5 0 0 1 8 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
}

.filtro-group select:focus,
.filtro-group input:focus {
    outline: none;
    border-color: var(--black);
}

.entrada-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.entrada-pill {
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid var(--subtle);
    background: transparent;
    font-family: "Montserrat", sans-serif;;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}

.entrada-pill:hover {
    border-color: var(--black);
    color: var(--black);
}

.entrada-pill.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.filtros-actions {
    text-align: center;
    margin-bottom: 24px;
}

.btn-limpar-filtros {
    background: transparent;
    border: 1px solid var(--subtle);
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 12px;
    font-family: "Montserrat", sans-serif;;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.15s;
}

.btn-limpar-filtros:hover {
    border-color: var(--black);
    color: var(--black);
}

.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding-top: 30px;
}

.events-container > a {
    display: contents;
}

.event-block {
    height: 260px;
    width: 100%;
    border: none;
    margin-bottom: 4px;
}

/* ===== RESPONSIVE - Mobile (max-width: 768px) ===== */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
        padding: 24px 16px 100px;
        flex: 1;
        max-width: 768px;
        width: 100%;
    }


    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .topbar-right {
        width: 100%;
    }

    .search-bar {
        width: 100%;
        max-width: none;
    }

    .topbar-title {
        text-align: center;
    }
        .landing-header {
            /*position: fixed;*/
            /*top: 0;*/
            /*left: 0;*/
            /*right: 0;*/
            background: var(--bg);
            border-bottom: 1px solid var(--black);
            border-left: 1px solid var(--black);
            border-right: 1px solid var(--black);
            border-bottom-left-radius: 10px;
            border-bottom-right-radius: 10px;
            padding: 12px 24px;
            display: flex;
            gap: 20px;
            z-index: 100;
            flex-direction: row;
            align-items: center;
        }


        .landing-header-brand {
            display: inline-flex;
            flex-direction: row;
            gap: 10px;
            row-gap: 1px;
            text-align: center;
            flex: 1;
            margin-bottom: 0;
            flex-wrap: wrap;
            align-content: center;
        }

        .landing-header-logo-link {
            text-decoration: none;
            display: inline-flex;
            /* padding-bottom: 5px; */
            flex-direction: column-reverse;
            justify-content: center;
        }

        .landing-header-logo-vertical {
            display: none;
            /*width: 30px;*/
            /*display: inline-block;*/
            /*margin: 0 auto;*/
            /*transition: transform 0.3s ease;*/
        }

        .landing-header-logo-horizontal {
            width: 150px;
            display: block;
            justify-content: left;
            margin: 0 auto;
            transition: transform 0.3s ease;
        }

        .landing-header-brand .brand-tagline {
            font-family: "Montserrat", sans-serif;
            font-size: 10px;
            color: var(--black);
            /* margin: 10px 0 0 0; */
            padding: 0;
            line-height: 1.4;
        }

        .landing-search-bar {
            display: none;
        }

        .landing-header-buttons {
            display: inline-flex;
            gap: 8px;
            flex: 0 0 auto;
            margin-bottom: 4px;
            text-align: center;
        }

        .home .section-title {
            font-family: "Montserrat", sans-serif;
            font-size: 25px;
            font-weight: 600;
            color: black;
            padding: 30px;
            margin-top: auto;
        }

        .btn {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-family: "Montserrat", sans-serif;
            font-weight: 600;
            text-align: center;
            cursor: pointer;
            border: none;
            border-radius: 30px;
            transition: all 0.3s ease;
            text-decoration: none;
            background: none;
            line-height: 1;
            box-sizing: border-box;
            vertical-align: middle;
        }

        .btn-primary {
            padding: 10px 20px;
            font-size: 10px;
            border: none !important;
            text-align: center;
            display: flex;
            position: fixed;
        }

        /* SHOW BOTTOM NAVIGATION */
        .bottom-nav {
            display: flex !important;
            position: fixed;
            margin-left: 100px;
            margin-right: 100px;
            margin-bottom: 10px;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--black);
            border-top: none;
            justify-content: space-around;
            border-radius: 99px;
            z-index: 100;
        }

        .events-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            padding: 20px 0 20px 0;
        }

        .event-card {
            width: 100%;
            overflow: hidden;
            background: transparent;
            position: relative;
            height: 200px;
            text-decoration: none;
            display: block;
        }

        .event-details {
            display: flex;
            gap: 12px;
            align-items: center;
            padding: 8px 16px 16px;
            font-size: 13px;
            color: #444;
        }

        .home {
            padding-bottom: 80px;
            padding-top: 0;
        }

        /* Keep bottom-nav styling consistent */
        .bottom-nav a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 60px;
            height: 60px;
            color: var(--bg);
            text-decoration: none;
            transition: color 0.3s;
        }

        .bottom-nav a:hover {
            color: var(--black);
        }

        .bottom-nav a i {
            font-size: 20px;
        }
    }

/* ===== EVENT DETAIL PAGE SPECIFIC ===== */
.evento-preco {
    border-radius: 30px;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 300;
}

.btn-inscrever:hover, .btn-comprar:hover {
    background: #333;
    transform: translateY(-2px);
}

.btn-cancelar:hover {
    background: var(--red);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===== MESSAGES ===== */
.msg-erro {
    background: #fdecea;
    color: var(--red);
    border: 1px solid #e74c3c;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    margin-top: 16px;
}

.msg-sucesso {
    background: #eafaf1;
    color: #1a7a4a;
    border: 1px solid #2ecc71;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    margin-top: 16px;
}

.msg-info {
    background: #eaf4fb;
    color: #1a5276;
    border: 1px solid #3498db;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    margin-top: 16px;
}

/* ===== PERFIL PAGE SPECIFIC ===== */
.perfil-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.perfil-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--black);
    background: transparent;
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    flex-shrink: 0;
}

.perfil-header-info h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.perfil-header-info span {
    font-size: 13px;
    color: var(--muted);
}

.perfil-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 12px;
}

.perfil-item {
    margin-bottom: 16px;
}

.perfil-item label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 4px;
}

.perfil-item span {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
}

@media (max-width: 768px) {
    .perfil-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .perfil-avatar {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }

    .perfil-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .events-grid {
        grid-template-columns: 1fr;
        padding: 0 22px;
        gap: 10px;
    }

    .filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 0 22px;
    }

    .filters::-webkit-scrollbar {
        display: none;
    }
}