/* ============================================
   Ocean City Mosque Website - Responsive Styles
   Mobile-First Approach
   ============================================ */

/* ============================================
   Tablet Breakpoint (768px and below)
   ============================================ */
@media screen and (max-width: 768px) {
    
    /* Typography adjustments */
    html {
        font-size: 15px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.35rem; }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-xl);
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-medium);
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }
    
    .nav-menu li a {
        display: block;
        width: 100%;
        padding: var(--spacing-md);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        height: 500px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Grid Adjustments */
    .stats-grid,
    .values-grid,
    .offers-grid,
    .quick-nav-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    /* Two-column grids to single column */
    .welcome-content,
    .about-content,
    .construction-content,
    .history-content,
    .location-content,
    .overview-content,
    .visit-content,
    .donation-grid,
    .context-content {
        grid-template-columns: 1fr;
    }
    
    /* Events */
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .event-card {
        flex-direction: column;
    }
    
    .event-date {
        min-width: 100%;
        padding: var(--spacing-lg);
    }
    
    .event-card-detailed {
        grid-template-columns: 1fr;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
   /* Donation Page */
    .amount-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .donation-impact {
        position: static;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Prayer Times */
    .prayer-times-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .jumuah-details {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tables */
    .prayer-schedule-table {
        font-size: 0.9rem;
    }
    
    .prayer-schedule-table th,
    .prayer-schedule-table td {
        padding: var(--spacing-sm);
    }
    
    /* Eid Cards */
    .eid-grid {
        grid-template-columns: 1fr;
    }
    
    /* Lecture Items */
    .lecture-item {
        flex-direction: column;
        text-align: center;
    }
    
    .lecture-date {
        width: 100%;
    }
    
    /* Show floating donate button on mobile */
    .floating-donate-btn {
        display: block;
    }
    
    /* Adjust padding for mobile */
    section {
        padding: var(--spacing-xl) 0;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* ============================================
   Mobile Breakpoint (480px and below)
   ============================================ */
@media screen and (max-width: 480px) {
    
    /* Typography */
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    /* Hero */
    .hero {
        height: 400px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Buttons */
    .btn-large {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    /* Cards */
    .stat-card,
    .value-card,
    .offer-card,
    .quick-nav-card {
        padding: var(--spacing-md);
    }
    
    /* Navigation Brand */
    .nav-brand h1 {
        font-size: 1.2rem;
    }
    
    /* Prayer Times */
    .prayer-times-grid {
        grid-template-columns: 1fr;
    }
    
    .time {
        font-size: 1.5rem;
    }
    
    .large-time {
        font-size: 2.2rem;
    }
    
    /* Donation Amount Buttons */
    .amount-buttons {
        grid-template-columns: 1fr;
    }
    
    /* CTA Buttons */
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    /* Tables - Smaller text */
    .prayer-schedule-table {
        font-size: 0.8rem;
    }
    
    .prayer-schedule-table th,
    .prayer-schedule-table td {
        padding: var(--spacing-xs);
    }
    
    /* Timeline */
    .timeline {
        padding-left: 30px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-marker {
        left: -25px;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-sm);
    }
    
    /* Floating Donate Button - Smaller on mobile */
    .floating-donate-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Reduce section padding */
    section {
        padding: var(--spacing-lg) 0;
    }
    
    /* Page Headers */
    .page-header {
        padding: var(--spacing-lg) 0;
    }
    
    /* Icon sizes */
    .stat-icon,
    .nav-icon,
    .value-icon,
    .ramadan-icon,
    .involved-icon,
    .contact-icon,
    .social-card-icon {
        font-size: 2.5rem;
    }
    
    /* Progress Circle */
    .progress-circle svg {
        width: 120px;
        height: 120px;
    }
    
    .progress-text .percentage {
        font-size: 1.5rem;
    }
}

/* ============================================
   Large Desktop Breakpoint (1400px and above)
   ============================================ */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .navbar,
    .menu-toggle,
    .floating-donate-btn,
    .scroll-indicator,
    .hero-buttons,
    .cta-buttons,
    .btn,
    .footer {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: #000;
    }
    
    .page-header {
        background: none;
        color: #000;
        border-bottom: 2px solid #000;
    }
    
    .page-header h1,
    .page-header p {
        color: #000;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* ============================================
   Accessibility Enhancements
   ============================================ */

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        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 Support */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #0039a6;
        --gold-accent: #b8860b;
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Dark Mode Support (optional - can be enabled) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --white: #1a1a1a;
        --off-white: #242424;
        --light-gray: #2d2d2d;
        --gray: #404040;
        --darker-gray: #e0e0e0;
        --dark-gray: #b0b0b0;
    }
    
    body {
        background-color: var(--white);
        color: var(--darker-gray);
    }
    */
}
