/* Mobile Responsive Styles for ACsports */

/* Small devices (phones, less than 640px) */
@media (max-width: 639px) {
    .md-hero {
        min-height: 60vh;
        padding: var(--md-spacing-2xl) 0;
    }

    .md-hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .md-hero-subtitle {
        font-size: 0.9rem;
    }

    .md-hero-actions {
        flex-direction: column;
    }

    .md-hero-actions .md-btn {
        width: 100%;
        justify-content: center;
    }

    .md-section {
        padding: var(--md-spacing-2xl) 0;
    }

    .md-section-title {
        font-size: 1.5rem;
    }

    .md-page-header {
        padding: var(--md-spacing-2xl) 0;
    }

    .md-page-header-title {
        font-size: 1.75rem;
    }

    .md-card-content {
        padding: var(--md-spacing-sm);
    }

    .md-about-grid {
        gap: var(--md-spacing-xl);
    }

    .md-about-title {
        font-size: 1.25rem;
    }

    .md-event-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .md-event-date {
        width: auto;
        display: flex;
        gap: var(--md-spacing-xs);
        padding: var(--md-spacing-xs) var(--md-spacing-sm);
    }

    .md-event-date-day,
    .md-event-date-month {
        font-size: 0.875rem;
    }

    .md-featured-card {
        min-height: 300px;
    }

    .md-featured-card-title {
        font-size: 1.25rem;
    }

    .md-cta-title {
        font-size: 1.5rem;
    }

    .md-footer-grid {
        gap: var(--md-spacing-xl);
    }

    .md-timeline {
        padding-left: var(--md-spacing-xl);
    }

    .md-timeline::before {
        left: 7px;
    }

    .md-timeline-item::before {
        left: calc(-1 * var(--md-spacing-xl) + 2px);
        width: 10px;
        height: 10px;
    }

    .md-form {
        padding: var(--md-spacing-md) !important;
    }

    .md-top-bar-inner {
        height: 56px;
    }

    .md-logo-text span:first-child {
        font-size: 1.1rem;
    }

    .md-logo-text span:last-child {
        font-size: 0.55rem;
    }
}

/* Medium devices (tablets, 640px to 1023px) */
@media (min-width: 640px) and (max-width: 1023px) {
    .md-hero {
        min-height: 65vh;
    }

    .md-hero-title {
        font-size: 2.25rem;
    }

    .md-section-title {
        font-size: 1.75rem;
    }
}

/* Print styles */
@media print {
    .md-top-bar,
    .md-footer,
    .md-back-to-top,
    .md-mobile-nav,
    .md-overlay,
    .md-btn,
    .md-cta {
        display: none !important;
    }

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

    .md-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .md-hero {
        background: #f5f5f5;
        color: #000;
        min-height: auto;
        padding: 2rem 0;
    }

    .md-section {
        padding: 1.5rem 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --md-primary: #0000EE;
        --md-on-surface: #000;
        --md-outline: #000;
    }

    .md-card {
        border: 2px solid #000;
    }

    .md-btn {
        border: 2px solid currentColor;
    }
}

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

    [data-animate] {
        opacity: 1;
        transform: none;
    }

    .md-card:hover .md-card-media img {
        transform: none;
    }

    .md-sport-card:hover img {
        transform: none;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .md-nav-link:hover::before {
        opacity: 0;
    }

    .md-card-elevated:hover {
        transform: none;
        box-shadow: var(--md-elevation-1);
    }

    .md-btn:hover::before {
        opacity: 0;
    }

    .md-card:hover .md-card-media img {
        transform: none;
    }

    /* Larger touch targets */
    .md-nav-link,
    .md-mobile-nav-link {
        min-height: 48px;
    }

    .md-btn {
        min-height: 48px;
    }
}

/* Dark mode support (optional - uncomment to enable) */
/*
@media (prefers-color-scheme: dark) {
    :root {
        --md-surface: #1C1B1F;
        --md-surface-dim: #141316;
        --md-surface-container: #211F22;
        --md-surface-container-low: #1D1B1E;
        --md-surface-container-high: #2B292C;
        --md-on-surface: #E6E1E5;
        --md-on-surface-variant: #CAC4D0;
        --md-background: #1C1B1F;
        --md-on-background: #E6E1E5;
        --md-outline: #938F99;
        --md-outline-variant: #49454F;
    }

    .md-top-bar {
        background: var(--md-surface);
    }

    .md-card {
        background: var(--md-surface-container);
    }
}
*/

/* Landscape phone specific adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .md-hero {
        min-height: 100vh;
        padding: var(--md-spacing-lg) 0;
    }

    .md-hero-title {
        font-size: 1.5rem;
        margin-bottom: var(--md-spacing-sm);
    }

    .md-hero-subtitle {
        margin-bottom: var(--md-spacing-md);
    }

    .md-page-header {
        padding: var(--md-spacing-lg) 0;
    }
}
