/* Base Styles */
.school-single-container {
    font-family: Arial, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-x: hidden; /* Prevent horizontal overflow */
}

.school-title {
    font-size: 24px;
    color: #ff6600;
    text-align: center;
}

.school-details p {
    margin: 10px 0;
    font-size: 16px;
}

.school-details p strong {
    color: #3333cc;
}

.school-details p a {
    color: #ff6600;
    text-decoration: none;
}

.school-details p a:hover {
    text-decoration: underline;
}

.school-layout {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%; /* Ensure layout uses full available width */
}

.school-filters {
    flex: 1;
    padding: 20px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-sizing: border-box;
}

.school-grid {
    flex: 3;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Default to 2 columns */
    gap: 20px;
    width: 100%; /* Ensure grid uses full available width */
}

.school-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    box-sizing: border-box;
}

.school-card img.school-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 5px;
}

.school-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.school-card p {
    margin: 5px 0;
    color: #555;
}

.view-button {
    display: inline-block;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.view-button:hover {
    background-color: #005177;
    color: white;
}

/* Responsive Styles */

/* Desktop View - 3 columns */
@media (min-width: 1025px) {
    .school-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for desktop view */
    }
}

/* Tablet View - 4 columns */
@media (max-width: 1024px) and (min-width: 768px) {
    .school-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablet view */
    }
}

/* Mobile View - 2 columns */
@media (max-width: 768px) {
    .school-single-container {
        padding: 15px; /* Less padding on smaller screens */
    }

    .school-title {
        font-size: 22px; /* Slightly smaller title */
    }

    .school-details p {
        font-size: 14px; /* Adjust text size */
    }

    .school-card h3 {
        font-size: 1.1rem; /* Smaller font size for card titles */
    }

    .view-button {
        padding: 8px 12px; /* Adjust padding for smaller screens */
        font-size: 0.8rem; /* Smaller font size for button */
    }

    .school-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile view */
    }
}

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden; /* Remove horizontal scroll globally */
}