
/* Base Mobile Styles (320px and up) */
:root {
    --header-height: 60px;
    --container-padding: 1rem;
}

/* Containers and Spacing */
.container {
    width: 100%;
    padding: 0 var(--container-padding);
    margin: 0 auto;
}

/* Typography */
html {
    font-size: 16px;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
p { font-size: clamp(1rem, 2vw, 1.1rem); }

/* Navigation */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: white;
    transition: left 0.3s ease;
    z-index: 1000;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-button {
    padding: 0.5rem;
    font-size: 1.5rem;
}

/* Grid System */
.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Touch-friendly Elements */
button, 
.btn,
input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
    padding: 0.8rem 1.5rem;
}

/* Form Elements */
input,
select,
textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.8rem;
    width: 100%;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Tablet Breakpoint (768px and up) */
@media (min-width: 768px) {
    :root {
        --container-padding: 2rem;
    }

    .container {
        max-width: 720px;
    }

    .mobile-menu-button {
        display: none;
    }

    .desktop-nav {
        display: flex;
    }
}

/* Desktop Breakpoint (1024px and up) */
@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }

    /* Hover effects only on desktop */
    @media (hover: hover) {
        .btn-hover:hover {
            transform: translateY(-2px);
        }
    }
}

/* Large Desktop Breakpoint (1280px and up) */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}

/* Utility Classes */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

.scroll-container {
    -webkit-overflow-scrolling: touch;
}

/* Animation Optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
