/**
 * Helios Theme - Responsive Fixes
 * Fixes mobile overflow issues, form fields, tables
 */

/* ==========================================================================
   Hero Section Fixes - Prevent Overflow on Mobile
   ========================================================================== */

@media (max-width: 768px) {
    /* Hero Section Container */
    .hero-section,
    .city-hero,
    .page-hero {
        min-height: auto !important;
        padding: 80px 20px 40px !important;
        overflow: hidden;
    }

    /* Hero Content */
    .hero-content {
        padding: 20px 15px !important;
        max-width: 100%;
    }

    /* Hero Heading */
    .hero-heading,
    .city-hero h1,
    .page-hero h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
        word-wrap: break-word;
    }

    /* Hero Subheading */
    .hero-subheading,
    .city-hero .subtitle,
    .page-hero .subtitle {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
    }

    /* Trust Badges in Hero */
    .trust-badges,
    .hero-badges {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        margin: 20px 0 !important;
    }

    .trust-badge {
        padding: 10px !important;
        font-size: 0.85rem !important;
    }

    /* CTA Buttons in Hero */
    .hero-cta-buttons,
    .cta-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-top: 20px !important;
    }

    .hero-cta-buttons .btn,
    .cta-buttons .btn {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 1rem !important;
    }
}

/* ==========================================================================
   Form Fields Fixes - Prevent Overflow
   ========================================================================== */

@media (max-width: 768px) {
    /* Form Container */
    .booking-form,
    .quote-form,
    .enquiry-form,
    .helios-booking-form {
        padding: 20px 15px !important;
        max-width: 100% !important;
        overflow: hidden;
        box-sizing: border-box;
    }

    /* Form Fields */
    .form-group,
    .form-field {
        margin-bottom: 15px !important;
        width: 100% !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-field input,
    .form-field select,
    .form-field textarea {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 15px !important;
        font-size: 1rem !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
    }

    /* Form Labels */
    .form-group label,
    .form-field label {
        font-size: 0.95rem !important;
        margin-bottom: 8px !important;
        display: block;
        color: #dcc87f !important;
    }

    /* Placeholder Text - White Color */
    .form-group input::placeholder,
    .form-group select::placeholder,
    .form-group textarea::placeholder,
    .form-field input::placeholder,
    .form-field select::placeholder,
    .form-field textarea::placeholder {
        color: rgba(255, 255, 255, 0.6) !important;
        opacity: 1 !important;
    }

    /* Date and Time Inputs */
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"] {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }

    /* Select Dropdowns */
    select {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.1) !important;
        appearance: none;
        background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
        background-repeat: no-repeat;
        background-position: right 10px center;
        padding-right: 40px !important;
    }

    /* Form Submit Button */
    .form-submit,
    .submit-btn,
    button[type="submit"] {
        width: 100% !important;
        padding: 15px 20px !important;
        font-size: 1.1rem !important;
        margin-top: 10px !important;
    }
}

/* ==========================================================================
   Service Cards - Grey Text to Gold
   ========================================================================== */

.service-card .service-description,
.service-card p,
.service-item .description,
.service-item p {
    color: #dcc87f !important; /* Gold color instead of grey */
}

.service-features li {
    color: rgba(220, 200, 127, 0.9) !important;
}

/* ==========================================================================
   Tables - Responsive on Mobile
   ========================================================================== */

@media (max-width: 768px) {
    /* Table Container */
    .table-container,
    .routes-table-container,
    .pricing-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin: 20px 0 !important;
    }

    /* Tables */
    table {
        width: 100% !important;
        min-width: 500px; /* Allows horizontal scroll */
        display: block;
        overflow-x: auto;
    }

    /* Table Headers */
    table th {
        font-size: 0.85rem !important;
        padding: 10px 8px !important;
        white-space: nowrap;
    }

    /* Table Cells */
    table td {
        font-size: 0.8rem !important;
        padding: 10px 8px !important;
    }

    /* Alternative: Stack Table on Mobile */
    .responsive-stack table,
    .responsive-stack thead,
    .responsive-stack tbody,
    .responsive-stack th,
    .responsive-stack td,
    .responsive-stack tr {
        display: block;
    }

    .responsive-stack thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .responsive-stack tr {
        margin-bottom: 15px;
        border: 1px solid #dcc87f;
        border-radius: 8px;
        padding: 10px;
    }

    .responsive-stack td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        text-align: right;
    }

    .responsive-stack td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        text-align: left;
        color: #dcc87f;
    }
}

/* ==========================================================================
   FAQ Section - Ensure Proper Functionality
   ========================================================================== */

.faq-item,
.accordion-item {
    margin-bottom: 15px;
    border: 1px solid rgba(220, 200, 127, 0.3);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question,
.accordion-header,
.faq-header {
    padding: 15px 20px;
    cursor: pointer;
    background: rgba(220, 200, 127, 0.1);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question:hover,
.accordion-header:hover {
    background: rgba(220, 200, 127, 0.2);
}

.faq-question:after,
.accordion-header:after {
    content: '+';
    font-size: 1.5rem;
    color: #dcc87f;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question:after,
.accordion-item.active .accordion-header:after {
    content: '−';
}

.faq-answer,
.accordion-content,
.faq-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer,
.accordion-item.active .accordion-content {
    padding: 15px 20px;
}

@media (max-width: 768px) {
    .faq-question,
    .accordion-header {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .faq-answer,
    .accordion-content {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   General Mobile Fixes
   ========================================================================== */

@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden !important;
    }

    /* Container padding */
    .container,
    .section-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Section spacing */
    section {
        padding: 40px 15px !important;
    }

    /* Headings */
    h1 {
        font-size: 2rem !important;
    }

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

    h3 {
        font-size: 1.5rem !important;
    }

    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

