/* ============================================================================
   JESUS ON THE STREETS - RESPONSIVE STYLESHEET
   Mobile-first responsive design for all devices
   ============================================================================ */

/* ============================================================================
   BREAKPOINTS:
   - Mobile: 320px - 767px
   - Tablet: 768px - 1023px
   - Desktop: 1024px - 1439px
   - Large Desktop: 1440px+
   ============================================================================ */


/* ============================================================================
   LARGE DESKTOP (1440px and up)
   ============================================================================ */

@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}


/* ============================================================================
   TABLET & BELOW (1023px and down)
   ============================================================================ */

@media (max-width: 1023px) {
    
    /* Typography */
    h1 {
        font-size: var(--font-size-4xl);
    }
    
    h2 {
        font-size: var(--font-size-3xl);
    }
    
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .page-title {
        font-size: var(--font-size-4xl);
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--background-white);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-xl);
        gap: 0;
        transition: left var(--transition-base);
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
        z-index: var(--z-dropdown);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--background-light);
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: var(--spacing-md);
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Grids - 2 columns */
    .blog-posts-grid,
    .events-grid,
    .video-grid,
    .testimonies-grid,
    .team-grid,
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Blog Layout */
    .blog-layout,
    .post-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar,
    .post-sidebar {
        order: 2;
    }
    
    /* Contact Layout */
    .contact-layout {
        grid-template-columns: 1fr;
    }
    
    /* Story Content */
    .story-content {
        grid-template-columns: 1fr;
    }
    
    /* Mission & Vision */
    .mission-vision-grid {
        grid-template-columns: 1fr;
    }
    
    /* Featured Event */
    .featured-event-content {
        grid-template-columns: 1fr;
    }
    
    /* Featured Testimony */
    .featured-testimony-content {
        grid-template-columns: 1fr;
    }
    
    /* Impact Stats */
    .impact-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }
    
    /* Alternative Giving */
    .alternative-methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Support Options */
    .support-options-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    
    /* Related Posts */
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Post Navigation */
    .post-navigation-bottom {
        grid-template-columns: 1fr;
    }
    
    .post-nav-link.all-posts {
        order: -1;
    }
    
    /* Carousel Navigation */
    .carousel-prev {
        left: 0;
    }
    
    .carousel-next {
        right: 0;
    }
}


/* ============================================================================
   MOBILE (767px and down)
   ============================================================================ */

@media (max-width: 767px) {
    
    /* Root Variables - Mobile Adjustments */
    :root {
        --spacing-3xl: 4rem;
        --spacing-2xl: 3rem;
    }
    
    /* Typography */
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: var(--font-size-3xl);
    }
    
    h2 {
        font-size: var(--font-size-2xl);
    }
    
    h3 {
        font-size: var(--font-size-xl);
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .page-title {
        font-size: var(--font-size-3xl);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    /* Container */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Sections */
    section {
        padding: var(--spacing-2xl) 0;
    }
    
    /* Hero */
    .hero-section {
        min-height: 70vh;
    }
    
    .page-hero {
        min-height: 300px;
    }
    
    .hero-content {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .hero-cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta-buttons .btn {
        width: 100%;
    }
    
    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    .btn-lg {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* All Grids - Single Column */
    .blog-posts-grid,
    .events-grid,
    .video-grid,
    .testimonies-grid,
    .team-grid,
    .values-grid,
    .involvement-grid,
    .support-options-grid,
    .alternative-methods-grid,
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .impact-stats {
        grid-template-columns: 1fr;
    }
    
    /* Gallery Preview - Homepage */
    .gallery-preview-section .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Mission Statement */
    .mission-text {
        font-size: var(--font-size-base);
    }
    
    /* Blog Cards */
    .blog-card-content {
        padding: var(--spacing-md);
    }
    
    /* Event Cards */
    .event-card-content {
        padding: var(--spacing-md);
    }
    
    .event-card-actions {
        flex-direction: column;
    }
    
    .event-card-actions .btn {
        width: 100%;
    }
    
    /* Testimonies Carousel */
    .testimony-text {
        font-size: var(--font-size-base);
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
    
    .carousel-prev {
        left: 0;
    }
    
    .carousel-next {
        right: 0;
    }
    
    /* Newsletter */
    .newsletter-input-group {
        flex-direction: column;
    }
    
    .newsletter-input-group .btn {
        width: 100%;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* About Page */
    .story-content {
        gap: var(--spacing-xl);
    }
    
    .story-text {
        padding-right: 0;
    }
    
    .team-member-image {
        height: 250px;
    }
    
    /* Get Involved */
    .involvement-card {
        padding: var(--spacing-lg);
    }
    
    .involvement-details {
        font-size: var(--font-size-sm);
    }
    
    /* Events Page */
    .event-info-grid {
        gap: var(--spacing-md);
    }
    
    .event-info-icon {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
    
    .events-filter {
        gap: var(--spacing-xs);
    }
    
    .filter-btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    /* Gallery Page */
    .gallery-filters {
        gap: var(--spacing-xs);
    }
    
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gallery-view-toggle {
        justify-content: center;
    }
    
    .video-thumbnail {
        height: 180px;
    }
    
    .video-play-btn {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-2xl);
    }
    
    /* Lightbox */
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: var(--spacing-sm);
    }
    
    .lightbox-next {
        right: var(--spacing-sm);
    }
    
    .lightbox-close {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }
    
    /* Testimonies Page */
    .testimony-card {
        padding: var(--spacing-lg);
    }
    
    .testimony-card-icon {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
    
    /* Blog Page */
    .featured-post-image {
        height: 250px;
    }
    
    .featured-post-content {
        padding: var(--spacing-lg);
    }
    
    .blog-post-image {
        height: 180px;
    }
    
    .pagination-numbers {
        gap: 4px;
    }
    
    .pagination-number {
        width: 35px;
        height: 35px;
        font-size: var(--font-size-sm);
    }
    
    .pagination-btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    /* Blog Post Single */
    .post-main {
        padding: var(--spacing-lg);
    }
    
    .post-title {
        font-size: var(--font-size-2xl);
    }
    
    .post-meta-info {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .post-content {
        font-size: var(--font-size-base);
    }
    
    .post-content h2 {
        font-size: var(--font-size-xl);
    }
    
    .post-content h3 {
        font-size: var(--font-size-lg);
    }
    
    .post-quote p {
        font-size: var(--font-size-lg);
    }
    
    .gallery-row {
        grid-template-columns: 1fr;
    }
    
    .post-author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-bio-avatar {
        margin: 0 auto;
    }
    
    .post-tags,
    .post-share {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Donate Page */
    .donation-type-toggle {
        flex-direction: column;
    }
    
    .toggle-btn {
        width: 100%;
    }
    
    .donation-form-wrapper {
        padding: var(--spacing-lg);
    }
    
    .amount-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .amount-btn {
        padding: var(--spacing-md);
        font-size: var(--font-size-lg);
    }
    
    .payment-method-tabs {
        flex-direction: column;
    }
    
    .giving-method-card {
        padding: var(--spacing-lg);
    }
    
    .method-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-2xl);
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-2xl);
    }
    
    .stat-number {
        font-size: var(--font-size-4xl);
    }
    
    /* Contact Page */
    .contact-form-wrapper {
        padding: var(--spacing-lg);
    }
    
    .contact-info-icon {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
    
    .map-overlay-info {
        position: static;
        margin-top: var(--spacing-md);
    }
    
    .map-info-card {
        max-width: 100%;
    }
    
    .faq-question {
        padding: var(--spacing-md);
    }
    
    .faq-question-text {
        font-size: var(--font-size-base);
    }
    
    .faq-answer p {
        padding: var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    /* Tax Info */
    .tax-info-content {
        flex-direction: column;
        padding: var(--spacing-lg);
    }
    
    .tax-info-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-2xl);
        margin: 0 auto;
    }
    
    .tax-info-text {
        text-align: center;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        padding: var(--spacing-lg);
        max-height: 85vh;
    }
    
    .modal-title {
        font-size: var(--font-size-xl);
    }
    
    /* CTA Sections */
    .cta-title {
        font-size: var(--font-size-2xl);
    }
    
    .cta-text {
        font-size: var(--font-size-base);
    }
    
    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }
    
    /* Sidebar Widgets */
    .sidebar-widget {
        padding: var(--spacing-lg);
    }
    
    .widget-title {
        font-size: var(--font-size-lg);
    }
    
    /* Social Links */
    .social-links-large {
        gap: var(--spacing-xs);
    }
    
    .social-link-large {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
    
    /* Quick Links */
    .quick-links-list a {
        font-size: var(--font-size-sm);
    }
    
    /* Involvement Cards */
    .involvement-icon,
    .support-icon,
    .value-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-2xl);
    }
    
    /* Event Card Date Badge */
    .event-card-date {
        top: var(--spacing-sm);
        left: var(--spacing-sm);
        padding: var(--spacing-xs);
    }
    
    .event-day {
        font-size: var(--font-size-2xl);
    }
    
    /* Gallery Item Overlay */
    .gallery-item-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    }
    
    .gallery-item-btn {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
    
    /* Featured Event Badge */
    .featured-event-badge,
    .featured-testimony-badge,
    .featured-post-badge {
        font-size: var(--font-size-xs);
        padding: 4px var(--spacing-sm);
    }
    
    /* Testimony Quote Icon */
    .testimony-quote-icon,
    .testimonial-quote-icon {
        font-size: var(--font-size-4xl);
    }
    
    /* Testimonial Text */
    .testimonial-text {
        font-size: var(--font-size-lg);
    }
}


/* ============================================================================
   SMALL MOBILE (480px and down)
   ============================================================================ */

@media (max-width: 480px) {
    
    /* Typography */
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    /* Logo */
    .logo-text {
        font-size: var(--font-size-base);
    }
    
    .logo-img {
        height: 40px;
    }
    
    /* Hero */
    .hero-section {
        min-height: 60vh;
    }
    
    .page-hero {
        min-height: 250px;
    }
    
    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    /* Amount Buttons */
    .amount-buttons {
        grid-template-columns: 1fr;
    }
    
    /* Impact Stats */
    .stat-number {
        font-size: var(--font-size-3xl);
    }
    
    /* Event Info */
    .event-info-icon {
        width: 35px;
        height: 35px;
    }
    
    /* Carousel */
    .carousel-btn {
        width: 35px;
        height: 35px;
    }
    
    /* Share Buttons */
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .share-btn {
        width: 35px;
        height: 35px;
        font-size: var(--font-size-sm);
    }
    
    /* Social Buttons */
    .social-btn {
        width: 40px;
        height: 40px;
    }
    
    /* Pagination */
    .pagination-number {
        width: 30px;
        height: 30px;
    }
    
    .pagination-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    /* Modal */
    .modal-content {
        padding: var(--spacing-md);
    }
    
    /* Form Inputs */
    .form-input {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
    
    /* Buttons */
    .btn {
        padding: var(--spacing-sm);
    }
    
    /* Footer */
    .footer-column {
        text-align: center;
    }
    
    .footer-links,
    .footer-contact {
        align-items: center;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
}


/* ============================================================================
   LANDSCAPE MOBILE (max-height: 500px)
   ============================================================================ */

@media (max-height: 500px) and (orientation: landscape) {
    
    .hero-section {
        min-height: 100vh;
    }
    
    .page-hero {
        min-height: 100vh;
    }
    
    .hero-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .scroll-indicator {
        display: none;
    }
}


/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    
    /* Hide non-essential elements */
    .site-header,
    .site-footer,
    .back-to-top,
    .hero-cta-buttons,
    .cta-section,
    .newsletter-section,
    .social-links,
    .share-buttons,
    .mobile-menu-toggle,
    .carousel-btn,
    .carousel-dots,
    .filter-btn,
    .pagination,
    .modal,
    .lightbox {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    /* Show URLs after links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
    
    /* Page breaks */
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    /* Remove shadows and transitions */
    * {
        box-shadow: none !important;
        transition: none !important;
    }
}


/* ============================================================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-indicator {
        animation: none;
    }
}


/* ============================================================================
   HIGH CONTRAST MODE
   ============================================================================ */

@media (prefers-contrast: high) {
    
    :root {
        --primary-color: #0000ff;
        --secondary-color: #ff8c00;
        --text-dark: #000000;
        --text-light: #333333;
        --background-white: #ffffff;
        --background-light: #f0f0f0;
    }
    
    .btn {
        border-width: 3px;
    }
    
    a {
        text-decoration: underline;
    }
}
