* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e40af;
    --primary-hover: #1e3a8a;
    --secondary-color: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
}

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

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow-md);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

main {
    padding: 2rem 0;
    min-height: calc(100vh - 400px);
}

.search-section {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.search-btn {
    padding: 0.875rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-select {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-color);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.clear-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--text-light);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.clear-btn:hover {
    background-color: #4b5563;
}

.results-info {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-weight: 500;
}

.filter-help {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.help-details {
    cursor: pointer;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.help-details summary {
    list-style: none;
    padding: 0.5rem 0;
    font-weight: 500;
}

.help-details summary::-webkit-details-marker {
    display: none;
}

.help-details summary::before {
    content: '▶ ';
    display: inline-block;
    transition: transform 0.2s;
    margin-right: 0.25rem;
}

.help-details[open] summary::before {
    transform: rotate(90deg);
}

.help-content {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    line-height: 1.6;
}

.help-content p {
    margin-bottom: 0.75rem;
}

.help-content strong {
    color: var(--primary-color);
}

.help-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.help-content a:hover {
    text-decoration: underline;
}

.schools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.school-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.school-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.school-card-link:hover .school-card {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.school-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.school-location {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.school-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.info-icon {
    color: var(--primary-color) !important;
    font-size: 0.8rem !important;
    cursor: help;
    margin-left: 0.25rem;
    display: inline-block;
    transition: transform 0.2s ease;
    vertical-align: middle;
}

.info-icon:hover {
    transform: scale(1.2);
    color: var(--primary-hover) !important;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.school-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.badge-government {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-catholic {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-independent {
    background-color: #e0e7ff;
    color: #3730a3;
}

.badge-primary {
    background-color: #dcfce7;
    color: #166534;
}

.badge-secondary {
    background-color: #fce7f3;
    color: #9f1239;
}

.badge-combined {
    background-color: #f3e8ff;
    color: #6b21a8;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.seo-description {
    background-color: var(--bg-color);
    padding: 3rem 0;
    margin-top: 3rem;
    border-top: 3px solid var(--primary-color);
}

.seo-description h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.seo-description h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.seo-description p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.seo-description ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.seo-description li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

footer {
    background-color: var(--text-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* Navigation Styles */
.main-nav {
    background-color: var(--bg-color);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Breadcrumb Styles */
.breadcrumb-nav {
    background-color: var(--bg-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-nav .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb-nav a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-light);
    margin: 0 0.5rem;
}

.breadcrumb-current {
    color: var(--text-light);
}

/* Footer Styles */
.main-footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
    opacity: 0.8;
}

/* Contextual Content Styles */
.contextual-intro {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.contextual-intro h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.user-guide {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

.user-guide h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.faq-question {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: var(--text-light);
    line-height: 1.8;
}

/* Blog Section Styles */
.latest-articles {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 3rem;
    box-shadow: var(--shadow);
}

.latest-articles h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.article-list {
    list-style: none;
}

.article-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.article-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
}

.article-list a:hover {
    text-decoration: underline;
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Blog Styles */
.blog-intro {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.blog-post-card {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.blog-post-card h3 {
    margin-bottom: 1rem;
}

.blog-post-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
}

.blog-post-card h3 a:hover {
    text-decoration: underline;
}

.blog-post-card .blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-post-card p {
    color: var(--text-color);
    line-height: 1.8;
}

.blog-cta {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 3rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.blog-cta h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.blog-cta a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.blog-cta a:hover {
    text-decoration: underline;
}

.blog-post {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.blog-post h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.blog-post h2:first-of-type {
    margin-top: 0;
}

.blog-post p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-color);
}

.blog-post a {
    color: var(--primary-color);
    text-decoration: none;
}

.blog-post a:hover {
    text-decoration: underline;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .blog-post-card h3 a {
        font-size: 1.25rem;
    }
    
    .blog-posts {
        grid-template-columns: 1fr;
    }
}

/* School Detail Page Styles */
.breadcrumb {
    margin: 1.5rem 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

.school-header {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.school-detail-name {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.school-detail-location {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.school-badges {
    margin-top: 1rem;
}

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

.detail-section {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.detail-section h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .detail-label {
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
    margin-right: 1rem;
}

.detail-row .detail-value {
    flex: 1;
    text-align: right;
    color: var(--text-color);
}

.detail-row .detail-value a {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-all;
}

.detail-row .detail-value a:hover {
    text-decoration: underline;
}

.info-box {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-box p {
    margin: 0.5rem 0;
    line-height: 1.7;
    color: var(--text-color);
    font-size: 0.95rem;
}

.info-box p:first-child {
    margin-top: 0;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box strong {
    color: var(--primary-color);
    font-weight: 600;
}

.back-button-container {
    text-align: center;
    margin: 3rem 0;
}

.back-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.back-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .school-detail-name {
        font-size: 1.75rem;
    }
    
    .school-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-row .detail-value {
        text-align: left;
        margin-top: 0.25rem;
    }
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .schools-grid {
        grid-template-columns: 1fr;
    }
    
    .school-details {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .schools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .schools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

