/* 
 * Mobile UX Improvements - Minimal Changes
 * Goal: Improve readability and usability without redesigning
 * Mobile-first approach
 */

/* ============================================
   1. TYPOGRAPHY CLEANUP
   ============================================ */

/* Ensure minimum 16px font-size on mobile for readability */
body {
    font-size: 16px !important;
    line-height: 1.6 !important; /* Between 1.55-1.65 as requested */
}

/* Improve paragraph spacing for better readability */
p {
    margin-bottom: 1em !important;
    line-height: 1.6 !important;
}


/* ============================================
   2. CONTENT CLARITY
   ============================================ */

/* Better visual separation for headings */
.page-header-small,
.airport-info-title,
.airport-details-title,
.airport-section-title {
    margin-top: 1.5em !important;
    margin-bottom: 0.75em !important;
    padding-bottom: 0.5em !important;
    border-bottom: 2px solid #e1e5e9 !important;
}

/* ============================================
   3. STICKY SEARCH (if search exists)
   ============================================ */

/* Make search forms sticky on mobile */
.distance-form,
#stdCode,
.airport-search-form {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: #ffffff !important;
    padding: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 16px !important;
}

/* ============================================
   4. ACCORDIONS FOR LONG SECTIONS
   ============================================ */

/* Minimal vanilla JS accordion styles */
.ux-accordion {
    margin-bottom: 16px;
}

.ux-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    min-height: 44px; /* Mobile tap target */
    transition: background-color 0.2s ease;
}

.ux-accordion-header:hover {
    background: #e9ecef;
}

.ux-accordion-header.active {
    background: #ffffff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.ux-accordion-icon {
    transition: transform 0.3s ease;
    font-size: 14px;
    color: #666;
}

.ux-accordion-header.active .ux-accordion-icon {
    transform: rotate(180deg);
}

.ux-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.ux-accordion-content.active {
    max-height: 5000px;
    padding: 16px;
}

/* Apply to existing FAQ sections */
.airport-faq-item,
.faq-item {
    margin-bottom: 12px;
}

.airport-faq-question,
.faq-item h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 0.5em !important;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.airport-faq-question::after,
.faq-item h3::after {
    content: '+';
    font-size: 20px;
    font-weight: 300;
    color: #666;
    transition: transform 0.3s ease;
}

.airport-faq-question.active::after,
.faq-item h3.active::after {
    content: '−';
    transform: rotate(0deg);
}

.airport-faq-answer,
.faq-item p {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 16px;
}

.airport-faq-question.active + .airport-faq-answer,
.faq-item h3.active + p {
    max-height: 5000px;
    padding: 16px;
    margin-top: 8px;
    background: #ffffff;
    border-radius: 0 0 8px 8px;
}

/* ============================================
   5. QUICK JUMP LINKS
   ============================================ */

.quick-jump-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-top: 2px solid #FF6B35;
}

.quick-jump-links a {
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.quick-jump-links a:hover,
.quick-jump-links a:focus {
    background: #FF6B35;
    color: #ffffff;
    border-color: #FF6B35;
}

/* ============================================
   6. CARD & SECTION CONSISTENCY
   ============================================ */

/* Normalize padding inside cards */
.mobile-airport-card,
.airport-code-box,
.airport-description-box,
.airport-content-box,
.airport-details-box,
.airport-faq-item,
.boxed-text {
    padding: 16px !important; /* Consistent 16px on mobile */
}

/* Normalize vertical spacing between sections */
section,
.airport-info-section,
.airport-details-section {
    margin-bottom: 16px !important; /* Consistent 12-16px spacing */
}

/* ============================================
   7. PRIMARY ACTION EMPHASIS
   ============================================ */

/* Identify and emphasize primary action per page */
.primary-action {
    font-weight: 600 !important;
    margin-top: 1.5em !important;
    margin-bottom: 1em !important;
}

.airport-cta-button,
.search-btn,
.button-primary {
    font-weight: 600 !important;
    padding: 14px 20px !important;
    min-height: 44px !important; /* Mobile tap target */
}

/* ============================================
   8. TRUST SIGNALS
   ============================================ */

.last-updated {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e1e5e9;
}

.last-updated strong {
    color: #333;
    font-style: normal;
}

/* ============================================
   9. MOBILE TAP TARGETS
   ============================================ */

/* Ensure buttons and links meet 44px minimum height */
button,
a.button,
.search-btn,
.airport-cta-button,
.tool-item-mobile,
.quick-jump-links a {
    min-height: 44px !important;
    min-width: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Expand clickable area for links without changing design */
a {
    padding: 4px 0; /* Add vertical padding for easier tapping */
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    /* Ensure proper spacing on small screens */
    .container,
    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* Improve readability on small screens */
    body {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
    
    /* Better spacing for mobile */
    section {
        margin-bottom: 16px !important;
    }
}

/* ============================================
   EXISTING COMPONENT ENHANCEMENTS
   ============================================ */

/* Improve existing toggle sections */
.toggle-section {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Better visual hierarchy for airport details */
.airport-hero-mobile {
    margin-bottom: 0 !important;
}

.airport-details-section {
    margin-top: 0 !important;
}

/* Improve form inputs for mobile */
.form-input,
input[type="text"],
input[type="search"] {
    min-height: 44px !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 12px !important;
}

/* ============================================
   MENU SLIDE ANIMATIONS
   ============================================ */

/* Menu slide animation for smooth open/close */
.menu.menu-box-left {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: translateX(-100%);
    will-change: transform;
}

.menu.menu-box-left.menu-active {
    transform: translateX(0) !important;
}

