/* MATOKEO CSS Part 3 - Footer, Animations, Responsive */

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 4rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 0.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
    color: white;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* News/Feature Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.news-card-image {
    height: 200px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 1.5rem;
}

.news-card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.news-card-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.news-card-title a {
    color: var(--text-primary);
}

.news-card-title a:hover {
    color: var(--primary);
}

.news-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Filter Sidebar */
.filter-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    position: sticky;
    top: 90px;
}

.filter-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.filter-option label {
    font-size: 0.875rem;
    cursor: pointer;
}

/* School Detail Page */
.school-hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 120px 0 60px;
}

.school-hero-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.school-logo {
    width: 120px;
    height: 120px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
    border: 2px solid var(--border-light);
    flex-shrink: 0;
}

.school-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.school-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.school-meta-item i {
    color: var(--primary);
}

.school-tabs-section {
    background: var(--bg-secondary);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 72px;
    z-index: 100;
}

.school-content {
    padding: 3rem 0;
}

.school-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.school-sidebar {
    position: sticky;
    top: 160px;
}

/* Charts Container */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    background-size: 2000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 2rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-card {
    height: 200px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 1rem !important;
}

.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 0.5rem !important;
}

.mt-2 {
    margin-top: 1rem !important;
}

.mt-3 {
    margin-top: 1.5rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.w-100 {
    width: 100%;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .school-content-grid {
        grid-template-columns: 1fr;
    }

    .school-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        z-index: 1000;
    }

    .nav-menu.open {
        transform: translateX(0);
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .quick-stats {
        gap: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .search-box {
        flex-direction: column;
        padding: 1rem;
    }

    .search-btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
        margin: 0 auto;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .school-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .schools-table th:nth-child(4),
    .schools-table td:nth-child(4),
    .schools-table th:nth-child(5),
    .schools-table td:nth-child(5) {
        display: none;
    }

    .filter-sidebar {
        position: static;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .regions-grid {
        grid-template-columns: 1fr 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

@media print {

    .header,
    .footer,
    .back-to-top,
    .filter-sidebar {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        min-height: auto;
        padding: 20px 0;
    }
}