* {
    font-family: "Teachers", sans-serif;
}

.navbar {
    width: 100%;
    background-color: #111111;
    border-bottom: 1px solid rgba(255, 99, 99, 0.35);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2000;
}

.logo {
    margin: 12px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
    transform: scale(1.03);
}

.perfilbtn {
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
    color: rgba(255, 255, 255, 0.8);
}

.perfilbtn:hover {
    color: #ff6363;
    border-color: #ff6363;
    background-color: rgba(255, 99, 99, 0.08);
}

.login {
    padding: 7px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.login:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

.register {
    padding: 7px 18px;
    border: 2px solid #ff6363;
    border-radius: 5px;
    background-color: #ff6363;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.register:hover {
    background-color: transparent;
    color: #ff6363;
    transform: translateY(-1px);
}

.planos {
    padding: 7px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.planos:hover {
    background-color: rgba(255, 99, 99, 0.08);
    color: #ff6363;
    border-color: rgba(255, 99, 99, 0.5);
}

/* ===== NAVBAR LAYOUT ===== */
.navbar-main-row {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 72px;
    z-index: 2001;
}

/* Search absolutamente centralizado no desktop */
.navbar-search-abs {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    max-width: min(480px, calc(100vw - 320px));
    z-index: 2100;
}

/* ===== SEARCH FIELD ===== */
.navbar-search-form,
.navbar-search-abs {
    display: flex;
    position: relative;
    align-items: stretch;
}

.navbar-search-input {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-right: none;
    color: #ffffff;
    border-radius: 6px 0 0 6px;
    transition: border-color 0.25s ease, background-color 0.25s ease, width 0.3s ease;
}

.navbar-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.navbar-search-input:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 99, 99, 0.7);
    box-shadow: none;
    color: #ffffff;
    outline: none;
}

.navbar-search-btn {
    background-color: rgba(255, 99, 99, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: none;
    border-radius: 0 6px 6px 0;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 16px;
    transition: background-color 0.22s ease, color 0.22s ease;
}

.navbar-search-btn:hover {
    background-color: rgba(255, 99, 99, 0.35);
    color: #ff6363;
}

.navbar-search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 2200;
    padding: 8px;
    border: 1px solid rgba(255, 99, 99, 0.28);
    border-radius: 16px;
    background: #151515;
    opacity: 1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.navbar-search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.18s ease;
}

.navbar-search-suggestion-item:hover {
    background-color: rgba(255, 99, 99, 0.12);
}

.navbar-search-suggestion-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    flex-shrink: 0;
    padding: 5px;
}

.navbar-search-suggestion-content {
    min-width: 0;
}

.navbar-search-suggestion-title {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.navbar-search-suggestion-meta {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    line-height: 1.35;
    margin-top: 2px;
}

.navbar-search-empty {
    margin: 0;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    font-size: 13px;
}

/* Search focus group effect */
.navbar-search-abs:focus-within .navbar-search-input,
.navbar-search-form:focus-within .navbar-search-input {
    border-color: rgba(255, 99, 99, 0.7);
}

.navbar-search-abs:focus-within .navbar-search-btn,
.navbar-search-form:focus-within .navbar-search-btn {
    border-color: rgba(255, 99, 99, 0.4);
    color: #ff6363;
}

/* ===== TOGGLER ===== */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

@media screen and (max-width: 790px) {
    .login {
        padding: 5px 10px;
        font-size: 13px;
    }

    .register {
        padding: 5px 10px;
        font-size: 13px;
    }

    .planos {
        padding: 5px 10px;
        font-size: 13px;
    }
}

@media screen and (min-width: 992px) {
    .navbar-main-row {
        display: grid;
        grid-template-columns: max-content 1fr max-content;
        gap: 24px;
    }

    .navbar-brand {
        justify-self: start;
    }

    .navbar-search-abs {
        position: relative;
        left: auto;
        transform: none;
        justify-self: center;
        width: min(600px, 100%);
        max-width: 600px;
    }

    .navbar-main-row > .ms-auto {
        margin-left: 0 !important;
        justify-self: end;
    }
}

@media screen and (max-width: 1199px) {
    .navbar-search-abs {
        max-width: min(440px, calc(100vw - 300px));
    }
}
