/*
FIXYDO V7.5 - HOMEPAGE OPTIMIZED (CONTRAST & HEADING FIX)
Note: Listing Card styles (Compact Cards) have been moved to archive-companies.css

UPDATED:
- Fixed: Ad placeholder contrast.
- Fixed: Step card heading selector (H4 -> H3).
*/

/* ================================================== */
/* 1. HERO SECTION */
/* ================================================== */

.fixydo-hero-section {
    background-color: #0a192f;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #ffffff;
    padding-top: 80px;
    padding-bottom: 140px;
    text-align: center;
    margin-bottom: 0;
    width: 100%;
    position: relative !important;
    z-index: 0 !important; 
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 25, 47, 0.85);
    z-index: -1; /* Behind content */
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
}

.hero-content h1 {
    color: #ffffff;
    font-size: 2.8em;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.hero-content .tagline {
    font-size: 1.15em;
    opacity: 0.95;
    margin-bottom: 30px;
    display: block;
    font-weight: 400;
    color: #cbd5e1;
}

/* Search Card */
.hero-search-card {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 900px;
    margin: 0 auto;
    border: none;
}

.main-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.search-input-group,
.search-select-group {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 5px 15px;
    height: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.search-input-group:focus-within,
.search-select-group:focus-within {
    border-color: #ff4500;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.1);
}

.search-input-group .dashicons,
.search-select-group .dashicons {
    color: #64748b;
    font-size: 20px;
    margin-right: 12px;
}

.main-search-form input[type="text"],
.main-search-form select {
    border: none;
    background: transparent;
    width: 100%;
    padding: 10px 0;
    font-size: 1em;
    color: #334155;
    outline: none;
    font-weight: 500;
}

.main-search-form button {
    flex-shrink: 0;
    padding: 0 40px;
    height: 50px;
    font-size: 1.1em;
    background: linear-gradient(135deg, #ff8c00 0%, #ff4500 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.main-search-form button:hover {
    background: linear-gradient(135deg, #ff4500 0%, #cc3700 100%);
    transform: translateY(-1px);
}

/* ================================================== */
/* 2. INDUSTRIES ROW (UPDATED SECTION) */
/* ================================================== */

.fixydo-industries-row {
    margin-top: -70px; 
    margin-bottom: 60px;
    position: relative !important;
    z-index: 10; /* Lowered z-index for desktop */
    transform: translate3d(0, 0, 0); 
    -webkit-transform: translate3d(0, 0, 0);
}

.industries-grid-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.industries-grid-row::-webkit-scrollbar {
    display: none;
}

.industry-card-small {
    background: #fcfcfc; 
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    min-width: 130px;
    flex-shrink: 0;
    /* --- FIX: Make all boxes same size --- */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 160px; /* Fixed height for all boxes */
}

.industry-card-small:hover {
    border-color: #ff4500;
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.ind-icon-circle {
    /* --- FIX: Smaller icon circle --- */
    width: 55px;
    height: 55px;
    background: #F0F4F8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #003366;
    transition: all 0.3s ease;
}

.industry-card-small:hover .ind-icon-circle {
    background: #ff4500;
    color: #ffffff;
}

.ind-icon-circle img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.ind-icon-circle .dashicons,
.ind-icon-circle i {
    /* --- FIX: Smaller icon font size --- */
    font-size: 28px;
}

.ind-name {
    /* --- FIX: Handle long titles --- */
    font-size: 0.85rem; /* Smaller font */
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
    height: 2.8em; /* Allow for 2 lines of text (1.4 * 2) */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    width: 100%;
}

.industry-card-small:hover .ind-name {
    color: #ff4500;
}

/* View All Card */
.view-all-card {
    background-color: #F0F4F8;
    border-color: #cbd5e1;
}
.view-all-card .ind-name { color: #003366; }
.view-all-card:hover { background-color: #003366; border-color: #003366; }
.view-all-card:hover .ind-name { color: #ffffff; }
.view-all-card:hover .ind-icon-circle { background: #ffffff; color: #003366; }

/* ================================================== */
/* 3. HOW IT WORKS */
/* ================================================== */

.section-header-center {
    text-align: center;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header-center h2 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #0f172a;
    font-weight: 800;
}

.section-header-center p {
    color: #64748b;
    font-size: 1.1em;
    line-height: 1.5;
    margin: 0;
}

.section-how-it-works {
    padding: 40px 0 10px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    text-align: center;
    position: relative;
}

@media (min-width: 992px) {
    .steps-grid::before {
        content: '';
        position: absolute;
        top: 40px;
        left: 15%;
        right: 15%;
        height: 2px;
        background-image: linear-gradient(to right, #cbd5e1 50%, transparent 50%);
        background-size: 10px 100%;
        z-index: -1;
    }
}

.step-card {
    padding: 20px;
    position: relative;
    background: #fff;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: #F0F4F8;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #003366;
    font-size: 32px;
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.1);
    border: 4px solid #fff;
}

/* FIX: Updated selector to H3 */
.step-card h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #1e293b;
    font-weight: 700;
}

.step-card p { 
    color: #64748b; 
    font-size: 0.95em; 
    line-height: 1.5; 
}

/* ================================================== */
/* 4. LAYOUT & SIDEBAR */
/* ================================================== */

.fixydo-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.fixydo-homepage-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.homepage-listings-content {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.sidebar-right {
    width: 340px;
    flex-shrink: 0;
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: sticky;
    top: 20px;
}

.sidebar-right h3 {
    color: #0f172a;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 700;
}

.ad-box-placeholder {
    background: #f9f9f9;
    padding: 40px 20px;
    text-align: center;
    border: 2px dashed #cbd5e1;
    /* FIX: Darkened color for contrast */
    color: #64748b;
    border-radius: 12px;
    font-weight: 600;
}

.premium-ad-space img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* ================================================== */
/* 5. LISTING SECTIONS (STRUCTURE ONLY) */
/* ================================================== */

.fixydo-section { margin-bottom: 0px; width: 100%; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.fixydo-featured-listings h2,
.fixydo-latest-listings h2 {
    text-align: left;
    margin: 0;
    font-size: 1.2em;
    color: #111827;
    font-weight: 800;
    line-height: 1.2;
}

.section-subtitle {
    color: #64748b;
    font-size: 0.95em;
    margin-top: 5px;
    display: block;
}

.fixydo-featured-listings,
.fixydo-latest-listings {
    background: #fff;
    padding: 0;
    border: none;
    box-shadow: none;
    margin-bottom: 40px;
}

.listing-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.view-all-button { text-align: center; margin-top: 30px; }

.button-ghost {
    background: transparent;
    border: 2px solid #003366;
    color: #003366;
    padding: 12px 40px;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: inline-block;
    font-size: 0.95em;
}

.button-ghost:hover {
    background: #F0F4F8;
    color: #002244;
}

/* ================================================== */
/* 6. TESTIMONIALS */
/* ================================================== */

.section-testimonials {
    background: #f8fafc;
    padding: 60px 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.testimonial-card {
    background: #fff;
    padding: 30px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 100px;
    color: #f1f5f9;
    font-family: serif;
    line-height: 1;
    z-index: 0;
}

.testimonial-card p {
    font-style: italic;
    color: #475569;
    margin-bottom: 20px;
    font-size: 1em;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.user-info strong { display: block; color: #0f172a; font-size: 1em; font-weight: 700; }
.user-info span { font-size: 0.85em; color: #475569; }

/* ================================================== */
/* 7. MOBILE OPTIMIZATION */
/* ================================================== */

@media (max-width: 992px) {
    .fixydo-homepage-layout { flex-direction: column; }
    .sidebar-right { width: 100%; position: static; margin-top: 40px; }
}

@media (max-width: 600px) {
    /* --- FIX: Container override for full-width scrolling sections --- */
    .fixydo-container { 
        padding-left: 0 !important; 
        padding-right: 0 !important; 
        width: 100%; 
        max-width: 100vw; 
    }
    
    .fixydo-hero-section { 
        padding: 40px 10px 110px; 
        position: relative !important;
        z-index: 0 !important;
        transform: none !important;
    }
    
    .hero-content h1 { font-size: 2em; }
    .hero-search-card { padding: 0; }
    .main-search-form { flex-direction: column; gap: 15px; }
    .search-input-group, .search-select-group, .main-search-form button { width: 100%; }

    .fixydo-industries-row {
        margin-top: -60px;
        padding-left: 15px;
        padding-right: 15px;
        overflow: visible !important;
        /* --- Z-INDEX FIX FOR MOBILE MENU --- */
        /* This lowers the z-index of the industry row on mobile, */
        /* allowing the mobile menu (which has a z-index of 1200) to appear on top. */
        position: relative !important;
        z-index: 10 !important; /* Lowered from 9999 */
        transform: none !important;
        -webkit-transform: none !important;
    }

    /* --- FIX: Smaller industry boxes on mobile --- */
    .industry-card-small {
        min-width: 110px; /* Smaller width */
        height: 130px; /* Smaller height */
        padding: 15px 10px;
    }
    .ind-icon-circle {
        width: 45px; /* Even smaller */
        height: 45px;
    }
    .ind-icon-circle .dashicons, .ind-icon-circle i {
        font-size: 22px;
    }
    .ind-name {
        font-size: 0.8rem;
    }

    /* --- BONUS FIX: How It Works - Horizontal Scroll on Mobile --- */
    .steps-grid {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding: 0 15px 15px 15px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .steps-grid::-webkit-scrollbar { display: none; }

    .step-card {
        min-width: 65vw;
        scroll-snap-align: center;
        padding: 15px;
    }

    .step-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 10px;
    }

    .step-card h3 { font-size: 1.1em; }

    .step-card p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        height: 4.5em;
        font-size: 0.9em;
    }
    
    .fixydo-latest-listings {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .section-testimonials .section-header-center h2 {
        font-size: 1.4em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 10px;
    }
    
    /* --- BONUS FIX: Testimonials - Horizontal Scroll on Mobile --- */
    .testimonials-grid {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding: 0 15px 15px 15px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .testimonials-grid::-webkit-scrollbar { display: none; }
    
    .testimonial-card {
        min-width: 85vw;
        scroll-snap-align: center;
        padding: 20px;
    }
    
    .testimonial-card p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 10px;
    }
}