/* ============================================================
   RESPONSIVE STYLESHEET - Rise and Hope Foundation Trust
   ============================================================ */

/* ===========================
   LARGE SCREENS (1200px+)
   =========================== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ===========================
   MEDIUM SCREENS (992px - 1199px)
   =========================== */
@media (max-width: 1199px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
}

/* ===========================
   TABLETS (768px - 991px)
   =========================== */
@media (max-width: 991px) {
    /* Legacy header rules - no longer needed */

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-item:nth-child(odd) {
        text-align: left;
        padding-right: 0;
        padding-left: 70px;
    }

    .timeline-item:nth-child(even) {
        margin-left: 0;
        padding-left: 70px;
    }

    .timeline-dot {
        left: 21px !important;
        right: auto !important;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

/* ===========================
   LARGE PHONES (576px - 767px)
   =========================== */
@media (max-width: 767px) {
    .section {
        padding: 3.5rem 0;
    }

    .hero-slider {
        min-height: 500px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-item:last-child {
        grid-column: 1 / -1;
    }

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

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

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .footer-grid > div:first-child {
        grid-column: auto;
    }

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

    .footer-policies {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-hero {
        padding: 8rem 0 3rem;
        min-height: 300px;
    }

    .page-hero-content h1 {
        font-size: 1.75rem;
    }

    .page-hero-content p {
        font-size: 1rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

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

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

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

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

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .newsletter-form {
        flex-direction: column;
    }

    .cta-section {
        padding: 3rem 0;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* ===========================
   SMALL PHONES (max 575px)
   =========================== */
@media (max-width: 575px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    .hero-slider {
        min-height: 450px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .hero-slider-nav {
        bottom: 1.5rem;
    }

    .hero-slider-dot {
        width: 8px;
        height: 8px;
    }

    .hero-slider-dot.active {
        width: 25px;
    }

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

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

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

    .testimonial-content {
        padding: 1.5rem;
    }

    .testimonial-quote {
        font-size: 1rem;
    }

    .testimonial-quote::before {
        font-size: 3rem;
    }

    .testimonial-author img {
        width: 50px;
        height: 50px;
    }

    .vm-card {
        padding: 1.5rem;
    }

    .objective-card {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-info-item {
        padding: 1rem;
    }

    .modal {
        padding: 1.5rem;
        width: 95%;
    }

    .lightbox-content img {
        max-width: 95%;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }
}

/* ===========================
   ACCESSIBILITY
   =========================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus States */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to Content */
.skip-to-content {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    z-index: 10000;
    font-weight: 600;
    transition: var(--transition);
}

.skip-to-content:focus {
    top: 0;
}

/* High Contrast Mode */
@media (forced-colors: active) {
    .btn {
        border: 2px solid currentColor;
    }

    .card {
        border: 1px solid currentColor;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .back-to-top,
    .loading-screen,
    .hero-slider,
    .cta-section {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    img {
        max-width: 100% !important;
    }
}
