/* ==============================================
   EmergencyHelper - Homepage Styles
   Homepage Styles
   ============================================== */

/* ===== HERO MAP SECTION ===== */
.hero-map-section {
    position: relative;
    height: 75vh;
    min-height: 500px;
    overflow: hidden;
    max-width: 100%;
}

#hero-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 100%);
}

.hero-map-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    max-width: 560px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

.hero-map-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1A1A1A;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hero-map-subtitle {
    font-size: 1.05rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.hero-map-form .input-group {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.hero-map-form .form-control {
    border: none;
    font-size: 1rem;
}

.hero-map-form .form-control:focus {
    box-shadow: none;
}

.hero-map-form .input-group-text {
    border: none;
}

.hero-map-stats {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #6c757d;
}

.hero-map-stats span {
    white-space: nowrap;
}

.hero-map-stats i {
    color: var(--eh-primary);
}

/* ===== SERVICE CARDS ===== */
.services-section {
    padding: 5rem 0;
}

.service-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--eh-primary), var(--eh-primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.25rem;
}

.service-icon-lg {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--eh-primary), var(--eh-primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    margin: 0 auto 1.5rem;
}

.service-card h4 {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: #6C757D;
    font-size: 0.9rem;
    flex-grow: 1;
}

.service-card .btn {
    margin-top: auto;
}

/* ===== WHY CHOOSE US ===== */
.why-section {
    padding: 5rem 0;
}

.why-card {
    padding: 2rem;
}

.why-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFF0E8, #FFE0CC);
    color: var(--eh-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.25rem;
}

.why-card h4 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.why-card p {
    color: #6C757D;
    font-size: 0.95rem;
}

/* ===== HOW IT WORKS ===== */
.how-section {
    padding: 5rem 0;
}

.step-card {
    padding: 2rem 1rem;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--eh-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 1.25rem;
}

.step-card h5 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: #6C757D;
    font-size: 0.95rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--eh-primary) 0%, var(--eh-primary-dark) 100%);
    padding: 4rem 0;
}

.cta-title {
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cta-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-form .form-control {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.cta-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.cta-form .form-control:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    box-shadow: none;
}

/* ===== MAP RESULTS SECTION ===== */
.map-results-section {
    background: #f8f9fa;
}

#postcode-map {
    border: 2px solid #e9ecef;
    height: 420px;
}

.postcode-map-container {
    height: 420px;
}

/* User location pulse marker */
.user-location-marker {
    background: none;
    border: none;
}

.pulse-dot {
    width: 16px;
    height: 16px;
    background: var(--eh-primary);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(232, 67, 10, 0.5);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(232, 67, 10, 0.5); }
    70%  { box-shadow: 0 0 0 20px rgba(232, 67, 10, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 67, 10, 0); }
}

/* Helper map marker */
.helper-marker {
    background: none;
    border: none;
}

.helper-marker-pin {
    width: 30px;
    height: 30px;
    background: var(--eh-primary);
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.helper-marker-pin i {
    transform: rotate(45deg);
    color: #fff;
    font-size: 0.8rem;
}

/* Helper popup */
.helper-popup {
    font-size: 0.85rem;
    line-height: 1.5;
    min-width: 200px;
}

.helper-popup .badge {
    font-weight: 500;
}

/* Helper result cards */
.helper-result-card {
    transition: all 0.2s ease;
    border-radius: 12px;
}

.helper-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-map-section {
        height: 60vh;
        min-height: 380px;
    }

    .hero-map-card {
        padding: 1.75rem 1.5rem 1.25rem;
    }

    .hero-map-title {
        font-size: 1.5rem;
    }

    .hero-map-subtitle {
        font-size: 0.95rem;
    }

    .hero-map-stats {
        gap: 0.75rem;
        font-size: 0.75rem;
    }

    .services-section,
    .why-section,
    .how-section {
        padding: 3rem 0;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .cta-form-wrapper {
        max-width: 100% !important;
    }
}

@media (max-width: 576px) {
    .hero-map-section {
        height: auto;
        min-height: 320px;
    }

    .hero-map-title {
        font-size: 1.25rem;
    }

    .hero-map-subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .hero-map-card {
        padding: 1rem 1rem 0.75rem;
    }

    .hero-map-form .input-group {
        flex-wrap: wrap !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .hero-map-form .input-group .input-group-text {
        display: none;
    }

    .hero-map-form .input-group .form-control {
        flex: 0 0 100% !important;
        width: 100% !important;
        border: 2px solid #dee2e6 !important;
        border-radius: 0.5rem !important;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }

    .hero-map-form .input-group .btn {
        flex: 0 0 100% !important;
        width: 100% !important;
        border-radius: 0.5rem !important;
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .hero-map-stats {
        font-size: 0.75rem;
        margin-top: 0.5rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .service-card {
        padding: 1.25rem;
    }

    .services-section,
    .why-section,
    .how-section {
        padding: 2rem 0;
    }

    .service-icon {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }

    .service-icon-lg {
        width: 72px;
        height: 72px;
        font-size: 2rem;
    }

    .why-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .step-number {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    #postcode-map,
    .postcode-map-container {
        height: 280px !important;
    }

    .cta-section {
        padding: 2.5rem 0;
    }
}

/* ==============================================
   ENGINEER APP DOWNLOAD SECTION
   ============================================== */

.app-download-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 6rem 0;
    overflow: hidden;
}

/* ===== iPhone Frame ===== */
.iphone-frame {
    position: relative;
    width: 300px;
    height: 620px;
    background: #1a1a1a;
    border-radius: 44px;
    padding: 12px;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.1),
        inset 0 0 0 2px #2a2a2a;
}

.iphone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #1a1a1a;
    border-radius: 0 0 18px 18px;
    z-index: 20;
}

.iphone-notch::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #2a2a2a;
    border-radius: 50%;
}

.iphone-screen {
    width: 100%;
    height: 100%;
    background: #f0f1f3;
    border-radius: 34px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.iphone-home-indicator {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: #555;
    border-radius: 2px;
    z-index: 20;
}

/* ===== App Header ===== */
.app-header-bar {
    background: #1a1a2e;
    padding: 42px 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header-title {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.app-header-sub {
    font-size: 9px;
    color: #8e8ea0;
    margin-top: 1px;
}

.app-conn-status {
    display: flex;
    align-items: center;
    gap: 4px;
}

.app-conn-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6c757d;
}

.app-conn-dot.app-conn-live {
    background: #28A745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.5);
}

.app-conn-label {
    font-size: 9px;
    color: #8e8ea0;
}

/* ===== App Body ===== */
.app-body {
    flex: 1;
    overflow: hidden;
    padding-bottom: 4px;
}

/* Check-in toggle */
.app-checkin {
    display: flex;
    align-items: center;
    margin: 10px 12px 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.app-checkin-active {
    background: #d1e7dd;
    border-color: #28A745;
}

.app-checkin-icon {
    font-size: 18px;
    color: #28A745;
}

.app-checkin-text {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    color: #28A745;
    margin-left: 8px;
}

.app-checkin-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28A745;
    animation: pulse-ring 2s infinite;
}

/* Stats row */
.app-stats-row {
    display: flex;
    gap: 6px;
    padding: 8px 12px 0;
}

.app-stat-card {
    flex: 1;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
}

.app-stat-card i {
    font-size: 13px;
}

.app-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 2px;
}

.app-stat-label {
    font-size: 8px;
    color: #8e8ea0;
    margin-top: 1px;
}

/* Service badges */
.app-service-badges {
    display: flex;
    gap: 4px;
    padding: 6px 12px 0;
    flex-wrap: wrap;
}

.app-svc-badge {
    background: #fff;
    border: 1px solid #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 8px;
    color: #1a1a1a;
    font-weight: 500;
}

/* Section title */
.app-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 10px 12px 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.app-section-title i {
    font-size: 12px;
}

/* Job card */
.app-job-card {
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 4px 12px;
    border-left: 3px solid #E8430A;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.app-job-card-peek {
    opacity: 0.5;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

.app-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.app-job-badge {
    background: #E8430A;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.app-job-badge i {
    font-size: 8px;
}

.app-job-badge-gas {
    background: #e85d04;
}

.app-job-location {
    font-size: 8px;
    color: #8e8ea0;
    display: flex;
    align-items: center;
    gap: 2px;
}

.app-job-desc {
    font-size: 10px;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 8px;
}

.app-job-actions {
    display: flex;
    gap: 6px;
}

.app-accept-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #E8430A;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 0;
    font-size: 10px;
    font-weight: 700;
    cursor: default;
}

.app-decline-btn {
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    color: #8e8ea0;
    font-size: 10px;
    cursor: default;
}

/* Tab bar */
.app-tab-bar {
    display: flex;
    background: #fff;
    border-top: 1px solid #e9ecef;
    padding: 6px 0 14px;
}

.app-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 8px;
    color: #8e8ea0;
}

.app-tab i {
    font-size: 16px;
}

.app-tab-active {
    color: #E8430A;
}

/* ===== Download Content ===== */
.app-download-content {
    max-width: 480px;
}

.app-download-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFF0E8, #FFE0CC);
    color: var(--eh-primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 1.25rem;
}

.app-download-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.app-download-subtitle {
    font-size: 1.05rem;
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Feature list */
.app-features-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 2.5rem;
}

.app-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 500;
}

.app-feature-item i {
    font-size: 1.1rem;
    color: var(--eh-primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFF0E8;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Store buttons */
.app-store-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.app-store-btn {
    display: block;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 12px 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 170px;
}

.app-store-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.app-store-btn-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-store-btn-inner i {
    font-size: 1.75rem;
    color: #fff;
}

.app-store-btn-inner small {
    font-size: 0.65rem;
    color: #aaa;
    display: block;
    line-height: 1;
}

.app-store-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

/* ===== App Download Responsive ===== */
@media (max-width: 991px) {
    .app-download-section {
        padding: 4rem 0;
    }

    .app-download-section .row {
        flex-direction: column-reverse;
    }

    .app-download-content {
        text-align: center;
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .app-features-list {
        align-items: center;
    }

    .app-store-buttons {
        justify-content: center;
    }

    .app-download-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 576px) {
    .iphone-frame {
        width: 260px;
        height: 540px;
        border-radius: 38px;
        padding: 10px;
    }

    .iphone-notch {
        width: 100px;
        height: 24px;
        top: 10px;
    }

    .iphone-screen {
        border-radius: 30px;
    }

    .app-download-title {
        font-size: 1.75rem;
    }

    .app-download-subtitle {
        font-size: 0.95rem;
    }

    .app-store-btn {
        flex: 1;
        min-width: 150px;
    }

    .app-header-bar {
        padding: 36px 12px 10px;
    }

    .app-header-title {
        font-size: 12px;
    }
}
