/* ==========================================================================
   Scholarship Search Block Styles (Mobile-First)
   ========================================================================== */

/* --- General Wrapper Styles --- */
.vont-block.scholarship-search-block .scholarship-filters {
    display: flex;
    flex-direction: column; /* Mobile is a single column layout */
    gap: 4rem;
    flex-wrap: wrap; /* Keep this for safety */
}

.vont-block.scholarship-search-block .filter-sidebar,
.vont-block.scholarship-search-block .scholarship-results-area {
    width: 100%;
}

.vont-block.scholarship-search-block .filter-sidebar h3 {
    font-size: 22px;
}

.vont-block.scholarship-search-block .filter-sidebar h3,
.vont-block.scholarship-search-block .filter-sidebar h4 {
    font-family:"Overpass",sans-serif;
}

/* --- Mobile Filter Styles --- */
.vont-block.scholarship-search-block .desktop-filter-title {
    display: none; /* Hidden on mobile */
}

.vont-block.scholarship-search-block .mobile-filter-header {
    display: block; /* Shown on mobile */
}

.vont-block.scholarship-search-block .mobile-filter-container {
    border: 1px solid #ccc;
    border-radius: 5px;
}

.vont-block.scholarship-search-block .mobile-filter-toggle {
    width: 100%;
    padding: 1rem;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.vont-block.scholarship-search-block .mobile-filter-toggle[aria-expanded="false"] {
    border-bottom-color: transparent;
}

.vont-block.scholarship-search-block .filters-wrapper {
    display: none; /* Collapsed by default */
    padding: 0 1rem 1rem;
}

.vont-block.scholarship-search-block .filter-group {
    border: none;
    margin: 0;
    padding: 0;
    border-bottom:1px solid #eee;
}

.vont-block.scholarship-search-block .filter-group:first-child {
    margin-top: 0;
    padding-top: 0;
}

.vont-block.scholarship-search-block .filter-group h4 {
    margin-top: 0;
    font-size: 18px;
    margin-bottom:0;
}

.vont-block.scholarship-search-block .filter-group-header button {
    padding: 1rem 0;
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
}

/* --- Shared Styles --- */
.vont-block.scholarship-search-block .toggle-icon {
    font-size: 18px;
    font-weight: normal;
    text-align: center;
    width: 24px;
}

.vont-block.scholarship-search-block .toggle-icon::before {
    font: var(--fa-font-solid);
    content: '\f067'; /* Plus Icon */
}
    
.vont-block.scholarship-search-block .filter-group-header button[aria-expanded="true"] .toggle-icon::before,
.vont-block.scholarship-search-block .mobile-filter-toggle[aria-expanded="true"] .toggle-icon::before {
    content: '\f068'; /* Minus Icon */
}

.vont-block.scholarship-search-block .filter-group-content {
    display: none;
    padding-bottom: 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
}

.vont-block.scholarship-search-block .filter-group-content label {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px; /* Optional: Adds space between the checkboxes */
  font-size:17px;
  line-height:21px;
}

.vont-block.scholarship-search-block .filter-group-content input[type="radio"] {
    margin-top:1px;
    margin-bottom:0;
}

.vont-block.scholarship-search-block .filter-group-content input[type="checkbox"] {
  flex-shrink: 0; /* Prevents the checkbox from shrinking */
  margin-top: 1px; /* Adjust to vertically align with the text */
  margin-right: 8px; /* Adds space between the checkbox and the text */
  margin-bottom:0;
}

.vont-block.scholarship-search-block #clear-filters {
    background: none;
    border: none;
    padding: 0;
    margin-top: 1.5rem;
    text-decoration: underline;
    cursor: pointer;
    width: 100%;
    text-align: left;
    text-transform: uppercase;
    font-size: 14px;
}

.vont-block.scholarship-search-block #clear-filters:before {
    font: var(--fa-font-solid);
    content: '\f2ea';
    margin-right: 6px;
    display: inline-block;
    transition: transform 0.4s ease; /* Add transition for animation */
}

.vont-block.scholarship-search-block #clear-filters:hover::before {
    transform: rotate(360deg); /* Rotate icon on hover */
}

/* --- Results Area --- */
.vont-block.scholarship-search-block #loading-spinner {
    font-size: 20px;
    color: #5F8631;
    padding-bottom:40px;
}

.vont-block.scholarship-search-block .results-top-bar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.vont-block.scholarship-search-block .search-input-wrapper {
    position: relative;
}

.vont-block.scholarship-search-block .search-input-wrapper .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

.vont-block.scholarship-search-block #scholarship-search-input {
    width: 100%;
    height: auto;
    padding: 8px 8px 8px 40px;
    border: 1px solid #ccc;
    border-radius: 20px;
}

.vont-block.scholarship-search-block .sort-by-container {
    width: 100%;
    margin-bottom: 1rem;
}

.vont-block.scholarship-search-block .sort-by-container select {
    width: 100%;
    height: auto;
}

.vont-block.scholarship-search-block .scholarship-grid,
.vont-block.scholarship-search-block .scholarship-grid .no-results-scholarship-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.vont-block.scholarship-search-block .scholarship-grid.no-results {
    display:block;
}

.vont-block.scholarship-search-block .scholarship-grid .no-results-scholarship-grid {
    margin-top:20px;
}

.vont-block.scholarship-search-block .no-results-fallback h3 {
    margin-top:10px;
    color:#000;
    font-size:31px;
    line-height:37px;
}

.vont-block.scholarship-search-block .scholarship-count-container {
    color:#A50000;
    font-weight:bold;
}

/* --- Scholarship Card --- */
.vont-block.scholarship-search-block .scholarship-card {
    background-color: #F2F4E8;
    position: relative;
    display: flex;
    flex-wrap: wrap;
}

.vont-block.scholarship-search-block .scholarship-card .top {
    padding: 25px;
    font-weight: bold;
}

.vont-block.scholarship-search-block .scholarship-card .bottom {
    width: 100%;
    margin-top: auto;
}

.vont-block.scholarship-search-block .scholarship-card h3 {
    margin-top: 0;
    font-size: 22px;
    padding-right: 40px;
    color: #0A0A0A;
    margin-bottom: 2rem;
}

.vont-block.scholarship-search-block .scholarship-card h3 a {
    color: #0A0A0A;
}

.vont-block.scholarship-search-block .scholarship-card .card-label {
    color: #67853E;
    font-weight: bold;
    font-size: 17px;
}

.vont-block.scholarship-search-block .scholarship-card .amount {
    font-weight: bold;
    color: #0A0A0A;
    font-size: 35px;
}

.vont-block.scholarship-search-block .scholarship-card .deadline,
.vont-block.scholarship-search-block .scholarship-card .essay,
.vont-block.scholarship-search-block .scholarship-card .status {
    margin-top: 0.5rem;
    font-weight: bold;
    font-size: 17px;
}

.vont-block.scholarship-search-block .scholarship-card a.button {
    width: 100%;
    padding: 20px;
    font-family:"Overpass",sans-serif;
    font-size:20px;
}

.vont-block.scholarship-search-block .scholarship-card a.button:hover {
    background-color:#496425!important;
}

/* --- Favorites Bar --- */
.vont-block.scholarship-search-block .favorites-bar-wrapper {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
}

.vont-block.scholarship-search-block .favorites-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vont-block.scholarship-search-block .favorites-bar-header:hover {
    cursor: pointer;
}

.vont-block.scholarship-search-block .favorites-title {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.vont-block.scholarship-search-block .favorites-title .fa-heart {
    margin-right: 0.75rem;
}

.vont-block.scholarship-search-block .favorites-toggle-icon {
    background: none;
    color: #adb5bd;
    font-weight: bold;
    width: 28px;
    height: 28px;
    font-size: 1.5rem;
    line-height: 24px;
    text-align: center;
}

.vont-block.scholarship-search-block .favorites-bar-wrapper[data-count="0"] .favorites-bar-header {
    cursor: default;
}

.vont-block.scholarship-search-block .favorites-bar-wrapper[data-count="0"] .favorites-toggle-icon {
    opacity: 0.5;
}

.vont-block.scholarship-search-block .favorites-toggle-icon::before {
    font: var(--fa-font-solid);
    content: '\f067'; /* Plus Icon */
}

.vont-block.scholarship-search-block .favorites-bar-header[aria-expanded="true"] .favorites-toggle-icon::before {
    content: '\f068'; /* Minus Icon */
}

.vont-block.scholarship-search-block .favorites-content-area {
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.vont-block.scholarship-search-block .favorites-content-area .scholarship-card .top h3 {
    margin-bottom:10px;
}

.vont-block.scholarship-search-block .send-favorites-wrapper {
    margin-top: 2rem;
    text-align: center;
}

.vont-block.scholarship-search-block .send-favorites-wrapper h4 {
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.vont-block.scholarship-search-block .send-form-inputs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.vont-block.scholarship-search-block #favorites-email-input {
    padding: 1rem;
    height:45px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    min-width: 250px;
    margin-bottom:0;
}

.vont-block.scholarship-search-block #send-email-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size:16px;
    height:45px;
    margin-bottom:0;
}

.vont-block.scholarship-search-block .send-message {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 5px;
}

.vont-block.scholarship-search-block .send-message.success {
    background-color: #d4edda;
    color: #155724;
}

.vont-block.scholarship-search-block .send-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* --- Shared Favorite Icon Styles (Cards & Single Page) --- */
.vont-block.scholarship-search-block .scholarship-card .favorite-toggle,
.single-fame_scholarship .favorite-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #fff;
    color: #0A0A0A;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
    border: none;
}

.vont-block.scholarship-search-block .scholarship-card .favorite-toggle:hover,
.single-fame_scholarship .favorite-toggle:hover {
    transform:scale(1.1);
}

.single-fame_scholarship .favorite-toggle {
    position: static;
    margin-left: 1rem;
}

.vont-block.scholarship-search-block .scholarship-card .favorite-toggle .fas,
.single-fame_scholarship .favorite-toggle .fas {
    display: none;
}

.vont-block.scholarship-search-block .scholarship-card .favorite-toggle .far,
.single-fame_scholarship .favorite-toggle .far {
    display: inline-block;
}

.vont-block.scholarship-search-block .scholarship-card.is-favorite .favorite-toggle,
.single-fame_scholarship .is-favorite .favorite-toggle {
    background-color: #67853E;
    color: #fff;
}

.vont-block.scholarship-search-block .scholarship-card.is-favorite .favorite-toggle .fas,
.single-fame_scholarship .is-favorite .favorite-toggle .fas {
    display: inline-block;
}

.vont-block.scholarship-search-block .scholarship-card.is-favorite .favorite-toggle .far,
.single-fame_scholarship .is-favorite .favorite-toggle .far {
    display: none;
}


/* --- Favorites Bar Header Heart --- */
.vont-block.scholarship-search-block .favorites-bar-wrapper .favorites-title .far {
    display: inline-block;
    color: #6c757d;
}

.vont-block.scholarship-search-block .favorites-bar-wrapper .favorites-title .fas {
    display: none;
}

.vont-block.scholarship-search-block .favorites-bar-wrapper.has-favorites .favorites-title .far {
    display: none;
}

.vont-block.scholarship-search-block .favorites-bar-wrapper.has-favorites .favorites-title .fas {
    display: inline-block;
    color: #67853E;
}

/* --- Show More Button Styles --- */
.vont-block.scholarship-search-block .show-more-container {
    text-align: center;
    margin-top:40px;
}

.vont-block.scholarship-search-block #show-more-btn {
    font-family:"Overpass",sans-serif;
    font-size:20px;
    padding: 10px 20px;
    cursor: pointer;
    background:#2089BE;
}

.vont-block.scholarship-search-block #show-more-btn:hover {
    /* Hover styles will be inherited from theme button styles */
}


/* ==========================================================================
   Single Scholarship Page Styles
   ========================================================================== */

.single-fame_scholarship .site-main {
    padding: 2rem 0;
}

.single-fame_scholarship .back-to-search {
    font-size: 14px;
    text-transform: uppercase;
}

.single-fame_scholarship .back-to-search.bottom {
    margin-top:50px;
}

.single-fame_scholarship .back-to-search a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 2rem;
    display: inline-block;
}

.single-fame_scholarship .scholarship-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.single-fame_scholarship .entry-title {
    font-size: 2.5rem;
    margin: 0;
    line-height: 1.2;
}

.single-fame_scholarship .scholarship-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    padding-top: 30px;
}

.single-fame_scholarship .scholarship-sidebar {
    flex: 1;
    min-width: 280px;
    max-width: 320px;
}

.single-fame_scholarship .scholarship-main-content {
    flex: 2;
    min-width: 320px;
    padding-bottom: 40px;
}

.single-fame_scholarship .scholarship-sidebar .sidebar-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.single-fame_scholarship .scholarship-sidebar .sidebar-item:last-child {
    border-bottom: none;
}

.single-fame_scholarship .scholarship-sidebar .sidebar-label {
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
    color: #67853E;
    font-weight: bold;
    font-size: 16px;
}

.single-fame_scholarship .scholarship-sidebar .sidebar-value {
    font-weight: bold;
    font-size: 16px;
}

.single-fame_scholarship .scholarship-sidebar .sidebar-value ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.single-fame_scholarship .scholarship-sidebar .sidebar-value ul li {
    margin-bottom: 0.25rem;
}

.single-fame_scholarship .scholarship-main-content .status-badge {
    display: inline-block;
    background-color: #e0e0e0;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 2rem;
}

.single-fame_scholarship .scholarship-main-content .content-section {
    margin-bottom: 2.5rem;
}

.single-fame_scholarship .scholarship-main-content .content-section h3 {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 1rem;
}

.single-fame_scholarship .scholarship-main-content .content-section p,
.single-fame_scholarship .scholarship-main-content .content-section ul {
    margin-bottom: 1em;
    line-height: 1.6;
}

/* ==========================================================================
   Accessibility & Responsive Styles
   ========================================================================== */

/* --- Focus states for keyboard navigation --- */
.vont-block.scholarship-search-block .filter-group-header button:focus-visible,
.vont-block.scholarship-search-block .mobile-filter-toggle:focus-visible,
.vont-block.scholarship-search-block #clear-filters:focus-visible,
.vont-block.scholarship-search-block #send-email-btn:focus-visible,
.vont-block.scholarship-search-block .scholarship-card a.button:focus-visible,
.vont-block.scholarship-search-block #show-more-btn:focus-visible,
.vont-block.scholarship-search-block .sort-by-container select:focus-visible,
.vont-block.scholarship-search-block .scholarship-card .favorite-toggle:focus-visible,
.single-fame_scholarship .favorite-toggle:focus-visible,
.single-fame_scholarship .back-to-search a:focus-visible,
.single-fame_scholarship .scholarship-main-content .apply-button:focus-visible {
    outline: 2px solid #005a9c;
    outline-offset: 2px;
}

/* --- Breakpoint for desktop layout --- */
@media (min-width: 801px) {
    
    .vont-block.scholarship-search-block #favorites-email-input {
        width:auto;
    }
    
    .vont-block.scholarship-search-block .scholarship-filters {
        display: grid;
        grid-template-columns: 25% 1fr;
        flex-direction: row;
    }
    
    .vont-block.scholarship-search-block .results-top-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        gap: 2rem;
    }

    .vont-block.scholarship-search-block .search-scholarships-container {
        flex-grow: 1;
        max-width: 400px;
    }

    .vont-block.scholarship-search-block .sort-by-container {
        text-align: right;
        margin-bottom: 0;
        width: auto;
    }
    
    .vont-block.scholarship-search-block .sort-by-container select {
        width: auto;
    }

    .vont-block.scholarship-search-block .desktop-filter-title {
        display: block;
    }

    .vont-block.scholarship-search-block .mobile-filter-container {
        border: none;
        border-radius: 0;
    }
    
    .vont-block.scholarship-search-block .mobile-filter-header {
        display: none;
    }

    .vont-block.scholarship-search-block .filters-wrapper {
        display: block !important;
        padding: 0;
    }

    .vont-block.scholarship-search-block .filter-group {
        border-bottom: 1px solid #eee;
    }

    .vont-block.scholarship-search-block .filter-group:first-child {
        margin-top: 1.5rem;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
    }

    .vont-block.scholarship-search-block .filter-group-header button {
        padding: 1rem 0;
    }
    
    .vont-block.scholarship-search-block .scholarship-card .top {
        padding: 45px;
    }
}