/* General Body and Typography Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none !important;
}

/* Main Container */
.container {
    max-width: 80rem; /* 1280px */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Header and Navigation */
.main-nav {
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem; /* 64px */
}
.nav-logo img {
    height: 2.5rem; /* 40px */
}
.nav-links {
    display: none; /* Hidden on mobile */
    align-items: center;
    gap: 1rem;
}
.nav-links a {
    color: #4b5563;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover {
    color: #111827;
}
.nav-links a.active {
    color: #2563eb;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* 24px */
}
.language-selector button {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
}
.language-selector svg {
    height: 1.25rem;
    width: 1.25rem;
    margin-left: 0.25rem;
}
.profile-button img {
    height: 2.25rem; /* 36px */
    width: 2.25rem;
    border-radius: 9999px;
}

/* Search Overlay */
#search-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 40;
    display: flex;
    justify-content: center;
    padding-top: 5rem;
    background-color: rgba(243, 244, 246, 0.9);
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}
#search-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.search-box {
    position: relative;
    width: 100%;
    max-width: 32rem; /* 512px */
}
#school-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    outline: none;
}
#clear-search-button {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    color: #6b7280;
}
#clear-search-button:hover {
    color: #4f46e5;
}
#clear-search-button svg {
    height: 1.5rem;
    width: 1.5rem;
}

/* Top Bar (Breadcrumb & Search Icon) */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}
#breadcrumb-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    transition: opacity 0.3s;
}
#breadcrumb-container.opacity-0 {
    opacity: 0;
}
#breadcrumb-container a:hover {
    color: #111827;
}
#breadcrumb-container .font-medium {
    font-weight: 500;
    color: #111827;
}
#open-search-button {
    padding: 0.5rem;
    color: #6b7280;
}
#open-search-button:hover {
    color: #4f46e5;
}
#open-search-button svg {
    height: 1.5rem;
    width: 1.5rem;
}

/* Main Content Layout */
main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Filters Sidebar */
aside {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    height: fit-content;
}
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}
.filters-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}
.reset-filters {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4f46e5;
}
.reset-filters:hover {
    color: #3730a3;
}
.filter-group {
    margin-top: 1.5rem;
}
.filter-group h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}
.filter-options > div {
    margin-bottom: 0.5rem;
}
.filter-item {
    display: flex;
    align-items: center;
}
.filter-checkbox {
    height: 1rem;
    width: 1rem;
    color: #4f46e5;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
}
.filter-checkbox:focus {
    ring: #4f46e5;
}
.filter-item label {
    margin-left: 0.75rem;
    font-size: 0.875rem;
    color: #4b5563;
}
.view-more {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4f46e5;
    margin-top: 0.5rem;
}
.view-more:hover {
    color: #3730a3;
}

/* School List */
#school-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.school-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.school-item {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.school-item-image {
    width: 100%;
    height: 10rem;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}
.school-item-details {
    flex-grow: 1;
    text-align: center;
}
.school-item-details h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}
.school-item-details p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}
.school-item-details .font-medium {
    font-weight: 500;
    color: #374151;
}
.school-item-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}
.rating {
    text-align: center;
}
.rating-score {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
}
.rating-stars {
    display: flex;
    justify-content: center;
    color: #f59e0b;
}
.rating-stars svg {
    height: 1.25rem;
    width: 1.25rem;
}
.rating-stars .star-gray {
     color: #d1d5db;
}
.view-profile-btn {
    width: 100%;
    text-align: center;
    color: #ffffff;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background-color: #3b82f6 !important;
    transition: background-color 0.3s !important;
}
.view-profile-btn:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/* No Results & Pagination */
#no-results-message {
    text-align: center;
    padding: 3rem 0;
}
#no-results-message h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}
#no-results-message p {
    color: #6b7280;
    margin-top: 0.5rem;
}
#pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.pagination-button {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #374151;
}
.pagination-button:hover {
    background-color: #f9fafb;
}
.pagination-button.active {
    background-color: #4f46e5;
    color: white;
    border-color: #4f46e5;
}
.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
footer {
    background-color: #ffffff;
    margin-top: 3rem;
    border-top: 1px solid #e5e7eb;
}
.footer-content {
    padding: 3rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.footer-logo-section img {
    height: 2.5rem;
}
.footer-logo-section p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 1rem;
}
.footer-links h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.footer-links ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.footer-links a {
    font-size: 1rem;
    color: #6b7280;
}
.footer-links a:hover {
    color: #111827;
}
.footer-bottom {
    margin-top: 2rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.footer-socials {
    display: flex;
    gap: 1.5rem;
}
.footer-socials a {
    color: #9ca3af;
}
.footer-socials a:hover {
    color: #6b7280;
}
.footer-socials svg {
    height: 1.5rem;
    width: 1.5rem;
}
.footer-copyright {
    margin-top: 2rem;
    font-size: 1rem;
    color: #9ca3af;
}

/* Responsive Styles */
@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
    .school-item {
        flex-direction: row;
        text-align: left;
    }
    .school-item-image {
        width: 14rem; /* 224px */
    }
    .school-item-details {
        text-align: left;
    }
    .school-item-actions {
        width: auto;
    }
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
    .footer-socials {
        order: 2;
    }
    .footer-copyright {
        margin-top: 0;
        order: 1;
    }
}
@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    main {
        grid-template-columns: repeat(4, 1fr);
    }
    aside {
        grid-column: span 1 / span 1;
    }
    .school-list-container {
        grid-column: span 3 / span 3;
    }
}
