/*
Theme Name: School District Ratings
Description: A custom theme for school district ratings and reviews platform
Version: 1.0
Author: School Ratings Team
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Breadcrumbs */
.breadcrumbs {
    margin: 1rem 0;
    font-size: 0.85rem;
    color: #666;
    padding: 0.5rem 0;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    gap: 0.3rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    color: #999;
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

.breadcrumbs a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 400;
}

.breadcrumbs a:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

.breadcrumbs span {
    color: #666;
    font-weight: 400;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.site-title:hover {
    color: #1d4ed8;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #2563eb;
}

/* Search Bar */
.search-container {
    background: #f1f5f9;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

/* School Filters */
.school-filters {
    margin-top: 2rem;
    text-align: center;
    width: 100%;
}

.school-filters .filter-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
}

.school-filters h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1.25rem;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    align-items: center;
    max-width: 100%;
    overflow-x: auto;
    padding: 0.5rem 0;
    flex-direction: row;
}

.filter-button {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
    font-size: 0.9rem;
}

.filter-button:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.filter-button.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.filter-icon {
    font-size: 1.2rem;
}

.filter-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.filter-button.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Filter Animation */
.school-card {
    transition: all 0.3s ease;
}

.school-card.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.school-card.visible {
    opacity: 1;
    transform: scale(1);
}

/* No Results Message */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results-content h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.no-results-content p {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
}

/* No Schools Message */
.no-schools-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.no-schools-content {
    max-width: 500px;
    margin: 0 auto;
}

.no-schools-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-schools-content h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.no-schools-content p {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.no-schools-actions {
    margin-top: 1.5rem;
}

.no-schools-actions .button {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.no-schools-actions .button:hover {
    background: #1d4ed8;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #2563eb;
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background: #1d4ed8;
}

/* School Cards */
.schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.school-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.school-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.school-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.school-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.school-location {
    color: #64748b;
    font-size: 0.95rem;
}

.school-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.stars {
    color: #fbbf24;
    font-size: 1.2rem;
}

.rating-text {
    color: #64748b;
    font-weight: 500;
}

.school-stats {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #f8fafc;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Rating Form */
.rating-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.rating-form h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.star-rating {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.star {
    font-size: 2rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star:hover,
.star.active {
    color: #fbbf24;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.submit-button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background: #1d4ed8;
}

/* Comments/Reviews */
.reviews-section {
    margin: 2rem 0;
}

.review {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reviewer-name {
    font-weight: 600;
    color: #1e293b;
}

.review-date {
    color: #64748b;
    font-size: 0.9rem;
}

.review-rating {
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.review-content {
    color: #374151;
    line-height: 1.6;
}

/* Footer */
.site-footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .schools-grid {
        grid-template-columns: 1fr;
    }
    
    .school-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .filter-button {
        flex: 1;
        min-width: 140px;
        max-width: 200px;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .school-filters h3 {
        font-size: 1.1rem;
    }
}

/* Autocomplete Styles */
.autocomplete-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.search-form {
    position: relative;
}

.autocomplete-item {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background-color: #f8fafc;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-school-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.autocomplete-school-location {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.autocomplete-school-rating {
    font-size: 0.85rem;
    color: #fbbf24;
    font-weight: 500;
}

.autocomplete-item:hover .autocomplete-school-name {
    color: #2563eb;
}

/* Loading state for autocomplete */
.autocomplete-loading {
    padding: 1rem;
    text-align: center;
    color: #64748b;
    font-style: italic;
}

.autocomplete-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #2563eb;
    animation: spin 1s ease-in-out infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Detailed School Information */
.school-detailed-info {
    margin: 2rem 0;
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.detailed-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.info-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #2563eb;
}

.info-section h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.info-item strong {
    color: #374151;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item div {
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.95rem;
}

.test-scores,
.programs,
.sports,
.activities,
.special,
.faculty,
.facilities,
.diversity,
.financial-aid,
.admissions {
    white-space: pre-line;
}

/* Mobile responsive for detailed info */
@media (max-width: 768px) {
    .detailed-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .school-detailed-info {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .info-section {
        padding: 1rem;
    }
}

/* New Filter Button Styles */
.filter-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 1rem 0;
    max-width: 100%;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 120px;
    justify-content: center;
}

.filter-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #007cba;
    border-color: #007cba;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.filter-btn .count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 1.2rem;
    text-align: center;
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile responsive for new filter buttons */
@media (max-width: 768px) {
    .filter-buttons-container {
        gap: 0.3rem;
        padding: 0.5rem 0;
    }
    
    .filter-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
}
