/* Desktop-first responsive design with Gothic/Powder Ash palette */

/* Base desktop styles (1280px+) - Primary target */
.main-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 896px; /* 2xl in Tailwind */
    margin: 0 auto;
}

/* Desktop-first approach - optimal for 1280-1440px screens */
@media (min-width: 1280px) {
    .desktop-optimized {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem;
    }
    
    .homepage-container {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }
    
    .main-card {
        width: 100%;
        max-width: 896px;
        background: white;
        border-radius: 1.5rem;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(226, 232, 240, 0.6);
        overflow: hidden;
    }
}

/* Mobile devices (320px - 640px) - Optimized for touch */
@media (max-width: 640px) {
    body {
        padding: 1rem 0.75rem;
    }

    .main-container {
        max-width: 100%;
        margin: 0 auto;
        padding: 1.25rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        border-radius: 1rem;
    }

    /* Enhanced Mobile Navigation Menu - Touch-Friendly */
    #mobile-menu {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
        box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    }

    #mobile-menu .space-y-1 {
        padding: 0.5rem 0 1rem 0 !important;
        gap: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Mobile menu links - Modern minimal design with large touch targets */
    #mobile-menu a {
        display: block !important;
        padding: 1.25rem 1.5rem !important;
        font-size: 1.125rem !important; /* 18px - large and readable */
        font-weight: 500 !important;
        line-height: 1.4 !important;
        color: #475569 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
        text-decoration: none !important;
        min-height: 56px !important; /* Ensures large touch target */
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        letter-spacing: -0.01em !important;
        position: relative !important;
        border-bottom: 1px solid rgba(226, 232, 240, 0.4) !important;
    }

    /* Remove border from last item */
    #mobile-menu a:last-child {
        border-bottom: none !important;
    }

    /* Modern minimal hover and active states */
    #mobile-menu a:hover,
    #mobile-menu a:focus {
        background: rgba(248, 250, 252, 0.8) !important;
        color: #1e293b !important;
        transform: none !important;
        padding-left: 1.75rem !important; /* Subtle indent on hover */
    }

    /* Active/current page styling - minimal accent */
    #mobile-menu a.nav-active {
        color: #1e293b !important;
        font-weight: 600 !important;
        position: relative !important;
    }

    /* Subtle accent line for active page */
    #mobile-menu a.nav-active::before {
        content: '' !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 4px !important;
        background: #475569 !important;
        border-radius: 0 2px 2px 0 !important;
        z-index: 1 !important;
    }



    /* Focus states for accessibility */
    #mobile-menu a:focus-visible {
        outline: 2px solid #475569 !important;
        outline-offset: 2px !important;
        border-radius: 0.75rem !important;
    }

    /* Mobile menu button enhancements */
    #mobile-menu-button {
        padding: 0.75rem !important;
        min-height: 44px !important;
        min-width: 44px !important;
        border-radius: 0.5rem !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    #mobile-menu-button:hover,
    #mobile-menu-button:focus {
        background: rgba(241, 245, 249, 0.8) !important;
        transform: scale(1.05) !important;
    }

    /* Hamburger icon sizing */
    #mobile-menu-button svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }

    /* Enhanced typography for mobile readability */
    h1 {
        font-size: 1.375rem !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
        margin-bottom: 0.5rem !important;
    }

    h2 {
        font-size: 1.125rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }

    h3 {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }

    p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.5rem !important;
    }

    /* Optimized touch targets for mobile */
    input[type="email"],
    input[type="url"] {
        padding: 1rem !important;
        font-size: 1rem !important;
        min-height: 48px;
        border-radius: 0.75rem !important;
    }

    /* Enhanced button for mobile touch */
    .btn-primary {
        font-size: 1rem !important;
        padding: 1rem 1.5rem !important;
        min-height: 48px;
        border-radius: 0.75rem !important;
        font-weight: 600 !important;
    }

    .btn-secondary {
        font-size: 0.875rem !important;
        padding: 0.75rem 1rem !important;
        min-height: 44px;
    }

    /* Improved spacing for mobile */
    .input-group {
        margin-bottom: 1.25rem !important;
    }

    label {
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
    }

    .validation-message {
        font-size: 0.8125rem !important;
        margin-top: 0.375rem !important;
    }

    /* Icon scaling for mobile */
    .icon-primary,
    .icon-success,
    .icon-error {
        height: 2.5rem !important;
        width: 2.5rem !important;
    }

    .card {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    /* Stack metadata items vertically on mobile */
    .metadata-item {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .metadata-label {
        margin-bottom: 0.25rem !important;
        width: auto !important;
    }

    /* Adjust summary grid for mobile */
    .summary-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .summary-item {
        text-align: center !important;
        padding: 1rem !important;
        background: rgba(255, 255, 255, 0.8) !important;
        border-radius: 0.5rem !important;
    }
}

/* Small mobile devices (320px - 480px) */
@media (max-width: 480px) {
    body {
        padding: 0.75rem 0.5rem;
    }

    .main-container {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    h1 {
        font-size: 1.25rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1rem !important;
    }

    p {
        font-size: 0.8125rem !important;
    }

    /* Compact spacing for small screens */
    .input-group {
        margin-bottom: 1rem !important;
    }

    input[type="email"],
    input[type="url"] {
        padding: 0.875rem !important;
        border-radius: 0.625rem !important;
    }

    .btn-primary {
        padding: 0.875rem 1.25rem !important;
        border-radius: 0.625rem !important;
    }

    .card {
        padding: 0.875rem !important;
    }

    /* Small mobile navigation adjustments */
    #mobile-menu .space-y-1 {
        padding: 0.5rem 0 1rem 0 !important;
    }

    #mobile-menu a {
        padding: 1rem 1.25rem !important;
        font-size: 1rem !important; /* Slightly smaller for very small screens */
        min-height: 52px !important;
        border-radius: 0 !important;
    }

    /* Adjust hover indent for small screens */
    #mobile-menu a:hover,
    #mobile-menu a:focus {
        padding-left: 1.5rem !important;
    }

    /* Adjust hamburger button for small screens */
    #mobile-menu-button {
        padding: 0.625rem !important;
        min-height: 40px !important;
        min-width: 40px !important;
    }

    #mobile-menu-button svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
}

/* Tablet devices (641px - 1024px) - Optimized scaling and proportions */
@media (min-width: 641px) and (max-width: 1024px) {
    body {
        padding: 2rem 1.5rem;
    }

    .main-container {
        max-width: 520px;
        padding: 2.5rem;
        border-radius: 1.25rem;
    }

    /* Tablet-optimized typography */
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }

    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 2rem !important;
    }

    /* Tablet-friendly input sizing */
    input[type="email"],
    input[type="url"] {
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
        min-height: 44px;
        border-radius: 0.875rem !important;
    }

    /* Tablet button optimization */
    .btn-primary {
        font-size: 1.0625rem !important;
        padding: 0.9375rem 2rem !important;
        min-height: 44px;
        border-radius: 0.875rem !important;
    }

    /* Improved spacing for tablet */
    .input-group {
        margin-bottom: 1.5rem !important;
    }

    label {
        font-size: 0.9375rem !important;
        margin-bottom: 0.625rem !important;
    }

    .validation-message {
        font-size: 0.875rem !important;
    }

    /* Icon scaling for tablet */
    .icon-primary,
    .icon-success,
    .icon-error {
        height: 3rem !important;
        width: 3rem !important;
    }

    .main-container {
        max-width: 768px;
        padding: 2rem;
        border-radius: 1.25rem;
    }

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

/* Large tablet/small desktop (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .main-container {
        max-width: 560px;
        padding: 3rem;
    }

    h1 {
        font-size: 2rem !important;
        line-height: 1.25 !important;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    p {
        font-size: 1.0625rem !important;
        line-height: 1.6 !important;
    }
}

/* Desktop and larger screens (1281px+) */
@media (min-width: 1281px) {
    body {
        padding: 3rem 2rem;
    }

    .main-container {
        max-width: 600px;
        padding: 3.5rem;
    }

    h1 {
        font-size: 2.25rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    p {
        font-size: 1.125rem !important;
        line-height: 1.7 !important;
    }

    /* Enhanced desktop interactions */
    input[type="email"]:hover,
    input[type="url"]:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.08);
    }

    .main-container {
        max-width: 1024px;
        padding: 3rem;
        border-radius: 1.5rem;
    }

    /* Enhanced desktop interactions */
    .card:hover {
        transform: translateY(-2px);
    }

    .btn-primary:hover:not(:disabled),
    .btn-secondary:hover:not(:disabled) {
        transform: translateY(-2px);
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 640px) and (orientation: landscape) {
    body {
        padding: 0.75rem 1rem;
    }

    .main-container {
        padding: 1rem 1.25rem;
    }

    h1 {
        font-size: 1.25rem !important;
        margin-bottom: 0.375rem !important;
    }

    p {
        font-size: 0.8125rem !important;
        margin-bottom: 1rem !important;
    }

    .input-group {
        margin-bottom: 0.875rem !important;
    }
}

/* Smooth transitions for all responsive changes */
h1, h2, h3, p, input, button, .main-container, .input-group, label, .card, .btn-primary, .btn-secondary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}