/**
 * Public Site Mobile Optimizations
 * Fixes touch targets, responsive layouts, and mobile UX issues
 * Cascades after modern-luxury.css to override desktop styles on mobile devices
 */

/* ============================================
   Touch Target Sizing (WCAG AA Minimum: 44x44px)
   ============================================ */

/* Navigation links */
.nav-links a {
    min-height: 44px;
    padding: 0.65rem 0.75rem !important;
    display: flex;
    align-items: center;
}

/* Menu toggle button */
.menu-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    gap: 5px;
    padding: 0.5rem !important;
}

/* Primary buttons */
.btn,
button[type="submit"],
button[type="button"],
.cta-button {
    min-height: 44px;
    padding: 0.85rem 1.5rem !important;
}

/* Hero buttons */
.hero-buttons a,
.hero-buttons button {
    min-height: 44px;
    padding: 0.9rem 1.75rem !important;
    font-size: 1rem;
}

/* Form inputs and labels */
input[type="text"],
input[type="email"],
input[type="phone"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    min-height: 44px;
    padding: 0.75rem 0.85rem !important;
}

input[type="radio"],
input[type="checkbox"] {
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
}

label.inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    min-height: 44px;
}

/* ============================================
   Touch Feedback & Active States
   ============================================ */

.nav-links a:active,
.menu-toggle:active,
.btn:active,
button:active,
.cta-button:active {
    background-color: rgba(218, 165, 32, 0.15) !important;
    transform: scale(0.98);
}

/* ============================================
   Responsive Media Queries: 480px - Small Mobile
   ============================================ */

@media (max-width: 480px) {
    /* ---- Navigation ---- */
    nav {
        padding: 0.75rem 1rem !important;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-links {
        gap: 0.5rem !important;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .menu-toggle span {
        height: 1.5px;
    }

    /* ---- Hero Section ---- */
    .hero {
        padding: 1.5rem 1rem !important;
    }

    .hero-content h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin: 0.75rem 0;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
        margin-top: 1.5rem !important;
    }

    .hero-buttons a,
    .hero-buttons button {
        width: 100% !important;
        text-align: center;
    }

    /* ---- Sections ---- */
    section {
        padding: 1.5rem 1rem !important;
    }

    /* ---- Forms ---- */
    form {
        padding: 1rem !important;
    }

    .form-group {
        margin-bottom: 0.75rem !important;
    }

    label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="phone"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea {
        font-size: 1rem; /* Prevents zoom on iOS */
        width: 100%;
        box-sizing: border-box;
    }

    /* ---- Cards & Grids ---- */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .card {
        padding: 1rem !important;
    }

    /* ---- Tables ---- */
    .table-responsive {
        font-size: 0.85rem;
    }

    table {
        width: 100%;
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem 0.25rem !important;
    }

    /* ---- Lists ---- */
    ul, ol {
        padding-left: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    li {
        margin-bottom: 0.4rem;
    }
}

/* ============================================
   Responsive Media Queries: 576px - Medium Mobile
   ============================================ */

@media (max-width: 576px) {
    /* ---- Navigation ---- */
    .nav-links {
        width: 100% !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding-top: 0.5rem !important;
    }

    .nav-links a {
        padding: 0.65rem 1rem !important;
        border-radius: 4px;
        transition: background-color 0.2s ease;
    }

    .nav-links a:hover,
    .nav-links a:focus {
        background-color: rgba(218, 165, 32, 0.08);
    }

    /* ---- Hero ---- */
    .hero {
        min-height: auto;
        padding: 2rem 1rem !important;
    }

    .hero-content h1 {
        font-size: 2rem !important;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column !important;
    }

    .hero-buttons a,
    .hero-buttons button {
        width: 100% !important;
        padding: 0.95rem 1.5rem !important;
    }

    /* ---- Pricing Table ---- */
    .pricing-table {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .pricing-card {
        padding: 1.25rem !important;
        text-align: center;
    }

    .pricing-card ul {
        text-align: left;
    }

    /* ---- Fleet Gallery ---- */
    .fleet-gallery {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .fleet-item img {
        max-height: 200px;
        object-fit: cover;
    }

    /* ---- Reservation Form ---- */
    .form-row {
        flex-direction: column !important;
    }

    input[type="text"],
    input[type="email"],
    input[type="phone"],
    input[type="date"],
    input[type="time"],
    select {
        width: 100%;
    }

    /* ---- CTA Sections ---- */
    .cta-section {
        padding: 2rem 1rem !important;
        text-align: center;
    }

    .cta-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .cta-section .cta-button {
        display: inline-block;
        width: auto;
        max-width: 100%;
    }

    /* ---- Footer ---- */
    footer {
        padding: 1.5rem 1rem !important;
    }

    footer ul {
        margin-bottom: 0.75rem !important;
    }

    footer a {
        padding: 0.4rem 0 !important;
        display: block;
    }

    /* ---- Modals/Overlays ---- */
    .modal-content {
        margin: 1rem !important;
        border-radius: 8px;
    }

    .modal-header {
        padding: 1rem !important;
    }

    .modal-body {
        padding: 1rem !important;
    }
}

/* ============================================
   Responsive Media Queries: 768px - Tablet Portrait
   ============================================ */

@media (max-width: 768px) {
    body {
        padding-top: 0; /* Remove any top padding that might be added on desktop */
    }

    /* ---- Grid Fallback ---- */
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    }

    /* ---- Forms ---- */
    .form-row {
        flex-direction: column !important;
    }

    /* ---- Sections with Full Width ---- */
    .full-width {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ============================================
   Responsive Media Queries: 900px - Tablet Landscape
   ============================================ */

@media (max-width: 900px) and (min-width: 769px) {
    /* Stack multi-column layouts */
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    }

    .form-row {
        flex-direction: column !important;
    }

    nav {
        flex-wrap: wrap;
    }

    .hero-content {
        flex-direction: column;
    }
}

/* ============================================
   Landscape Orientation Fixes
   ============================================ */

@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 1rem !important;
    }

    .hero-content h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem;
    }

    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .hero-buttons {
        gap: 0.5rem !important;
    }

    section {
        padding: 1rem !important;
    }

    .menu-toggle {
        margin-right: 0.25rem;
    }
}

/* ============================================
   Accessibility Improvements
   ============================================ */

/* Increase touch target for radio/checkbox with label */
input[type="radio"] + label,
input[type="checkbox"] + label {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

/* Focus indicators */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--gold, #DAA520);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    button,
    .btn,
    input[type="text"],
    input[type="email"],
    input[type="phone"],
    input[type="date"],
    input[type="time"],
    select,
    textarea {
        border-width: 2px !important;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Viewport-width scrolling prevention */
html,
body {
    overflow-x: hidden;
}
