/**
 * TOWD Home Page Styles
 * Styles for hero, services, CTA, and booking sections
 */

/* Hero Section with Animated Background Slideshow */
.hero {
    position: relative;
    padding: 100px 1rem 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8));
    z-index: 1;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: var(--yellow);
    color: var(--black);
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--yellow);
}

.hero p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.btn-emergency {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--yellow);
    color: var(--black);
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    width: 100%;
    max-width: 280px;
    border: 2px solid var(--yellow);
    box-shadow: 0 4px 20px rgba(252, 238, 33, 0.4);
    transition: all 0.3s ease;
}

.btn-emergency:hover {
    background: var(--yellow-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(252, 238, 33, 0.5);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--white);
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    width: 100%;
    max-width: 280px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--yellow);
    color: var(--yellow);
    background: rgba(255, 255, 255, 0.15);
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--white);
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    width: 100%;
    max-width: 280px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    border-color: #25D366;
    color: var(--white);
    background: rgba(37, 211, 102, 0.15);
}

/* Trust Bar */
.trust-bar {
    background: var(--black);
    padding: 1.5rem 1rem;
    text-align: center;
}

.trust-bar-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
}

.trust-item svg {
    color: var(--yellow);
    width: 20px;
    height: 20px;
}

/* Services Section */
.services {
    padding: 4rem 1rem;
    background: var(--white);
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 0.95rem;
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.services-grid .service-card {
    width: 100%;
}

.service-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.service-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--yellow);
}

.service-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    flex-shrink: 0;
}

.service-content {
    padding: 1rem;
    flex: 1;
}

.service-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.25rem;
}

.service-content p {
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* CTA Section with Image */
.cta-section {
    position: relative;
    padding: 4rem 1rem;
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
                url('/static/bookings/images/cta-bg.jpg') center/cover no-repeat scroll;
    text-align: center;
}

@media (min-width: 768px) {
    .cta-section {
        background-attachment: fixed;
    }
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.cta-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--yellow);
    color: var(--black);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-phone:hover {
    background: var(--yellow-light);
    transform: scale(1.02);
}

/* Booking Section */
.booking {
    padding: 4rem 1rem;
    background: var(--gray-light);
}

.booking-container {
    max-width: 500px;
    margin: 0 auto;
}

.booking-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--yellow);
}

.booking-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.booking-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 0.25rem;
}

.booking-header p {
    color: var(--gray);
    font-size: 0.85rem;
}

/* Address Autocomplete styling */
.address-autocomplete-wrapper {
    position: relative;
}

.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 2px solid var(--yellow);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.address-suggestions.active {
    display: block;
}

.address-suggestion-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.address-suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.address-suggestion-item:hover,
.address-suggestion-item.selected {
    background: var(--yellow-pale);
}

.address-suggestion-item .main-text {
    font-weight: 600;
    color: var(--black);
    margin-bottom: 2px;
}

.address-suggestion-item .secondary-text {
    font-size: 0.8rem;
    color: var(--gray);
}

.address-suggestions-loading {
    padding: 1rem;
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
}

.address-suggestions-empty {
    padding: 1rem;
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
}

/* Field hint text */
.field-hint {
    font-size: 0.8rem;
    color: var(--gray);
    margin: 0.25rem 0 0.5rem;
    line-height: 1.4;
}

/* Vehicle Lookup styling */
.vehicle-lookup-group {
    position: relative;
}

.vehicle-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.vehicle-input-wrapper .form-control {
    flex: 1;
    text-transform: uppercase;
}

.btn-lookup {
    padding: 0.75rem 1.25rem;
    background: var(--yellow);
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-lookup:hover:not(:disabled) {
    background: var(--yellow-light);
    transform: translateY(-1px);
}

.btn-lookup:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.vehicle-lookup-result {
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 8px;
}

.vehicle-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #166534;
    font-weight: 600;
    font-size: 0.95rem;
}

.vehicle-info::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

.vehicle-lookup-error {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.9rem;
}

/* Tablet and up */
@media (min-width: 768px) {
    .hero {
        padding: 100px 2rem 50px;
    }

    .hero h1 {
        font-size: 2.75rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .btn-emergency, .btn-secondary, .btn-whatsapp {
        width: 280px;
    }

    .trust-bar {
        padding: 1.5rem 2rem;
    }

    .trust-item {
        font-size: 0.95rem;
    }

    .services {
        padding: 5rem 2rem;
    }

    .section-header h2 {
        font-size: 2.25rem;
    }

    .section-header p {
        font-size: 1.05rem;
    }

    .services-grid {
        gap: 1.5rem;
    }

    .services-grid .service-card {
        width: calc(50% - 0.75rem);
    }

    .service-card {
        flex-direction: column;
    }

    .service-image {
        width: 100%;
        height: 160px;
    }

    .service-content {
        padding: 1.25rem;
    }

    .service-content h3 {
        font-size: 1.1rem;
    }

    .cta-section {
        padding: 5rem 2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .booking {
        padding: 5rem 2rem;
    }

    .booking-card {
        padding: 2.5rem;
    }

    .booking-header h2 {
        font-size: 1.5rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .hero {
        padding: 110px 2rem 60px;
    }

    .hero h1 {
        font-size: 3.25rem;
    }

    .services-grid .service-card {
        width: calc(25% - 1.125rem);
    }

    .service-image {
        height: 140px;
    }

    .cta-content h2 {
        font-size: 2.5rem;
    }
}

/* Mobile form layout fix */
@media (max-width: 767px) {
    .booking .form-row {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
}

/* Fix date and time inputs to match heights */
input[type="date"].form-control,
select.form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 52px;
}

input[type="date"].form-control {
    -webkit-appearance: none;
    appearance: none;
}
