html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Login Page Specific Styling */
.login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s ease;
}

.icon-circle {
    width: 70px;
    height: 70px;
    background: #f0f7ff;
    color: #0d6efd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem;
}

.login-header h3 {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
    text-align: center;
}

.login-header p {
    text-align: center;
    margin-bottom: 2rem;
}

.btn-login {
    border-radius: 8px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

    .btn-login:hover {
        background-color: #0b5ed7;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    }

.input-group-text {
    border-right: none;
}

.form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .hover-lift:hover {
        transform: translateY(-5px);
        box-shadow: 0 1rem 3rem rgba(0,0,0,.1) !important;
    }

/* Ensure the grid container can grow to show both rows */
.thumbnail-grid {
    height: auto;
    display: flex;
}

.post-thumb {
    transition: all 0.3s ease-in-out;
}

.post-thumb:hover {
    transform: scale(1.08);
    z-index: 2;
}

/* Optional: Make the container background look like a frame */
.thumbnail-grid .col-6 {
    padding-bottom: 0; /* Bootstrap g-2 handles spacing */
}

/* Ensure the layout doesn't break on mobile */
@media (max-width: 992px) {
    .thumbnail-grid {
        margin-top: 15px;
    }
}

#lightboxModal .modal-content {
    background: rgba(0, 0, 0, 0.8) !important; /* Dark dim effect */
}

#lightboxImg {
    max-height: 85vh;
    object-fit: contain;
}

.btn-link:hover {
    color: #0d6efd !important;
    transform: scale(1.1);
    transition: 0.2s;
}

/* Mobile Tab Navigation Styling */
@media (max-width: 576px) {
    .mobile-tabs-container .nav-tabs {
        display: flex;
        scrollbar-width: none; /* Hide scrollbar Firefox */
        -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
    }

        .mobile-tabs-container .nav-tabs::-webkit-scrollbar {
            display: none; /* Hide scrollbar Chrome/Safari */
        }

    .mobile-tabs-container .nav-link {
        border: none !important;
        padding: 10px 15px;
        color: #6c757d;
        font-size: 0.8rem;
        text-align: center;
    }

        .mobile-tabs-container .nav-link.active {
            color: #0d6efd !important;
            border-bottom: 3px solid #0d6efd !important;
            background: transparent !important;
        }

    .small-tab-text {
        display: block;
        font-size: 0.7rem;
        margin-top: 2px;
    }
}

/* Desktop spacing adjustment */
@media (min-width: 577px) {
    .mobile-tabs-container .nav-link {
        border: none;
        padding: 10px 20px;
    }
}

/* Hide scrollbar for the tab container across all browsers */
.mobile-tabs-container .nav-tabs {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

    .mobile-tabs-container .nav-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }

/* Ensure desktop doesn't feel like it's "overflowing" */
@media (min-width: 577px) {
    .mobile-tabs-container .nav-tabs {
        overflow: hidden !important; /* Prevents the scroll mechanic on desktop */
        justify-content: flex-start; /* Keeps items aligned to the left */
    }
}

/* Prevent the table from forcing width on desktop */
table {
    table-layout: fixed; /* Ensures percentages are strictly followed */
    width: 100% !important;
}

.smaller {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: bold;
}

/* On mobile, we hide the horizontal scrollbar entirely */
.table-responsive-sm {
    overflow-x: hidden;
}

/* Custom search icon positioning if needed */
.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}

.search-input {
    padding-left: 30px !important;
}

.navbar .form-control:focus {
    background-color: white !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    border: 1px solid #0d6efd;
}

/* Styling the "Advanced" labels inside the search dropdown */
.smaller {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Remove the blue outline from the dropdown button */
.input-group .btn:focus {
    box-shadow: none;
}

/* Ensure the dropdown menu doesn't feel cramped */
.dropdown-menu {
    border-radius: 12px !important;
}