/* Hirly/styling/pages/page-index.css */
/* New Index Page Styling: Flawless, Immersive, Convincing, Positive Vibes (Upwork Inspired) */

/* LOCAL Color Variables for specific elements on this page */
:root {
    /* New, isolated variables for the tags and rating stars */
    --tag-background: #EAF7E9;
    --tag-text: #28A745;
    --warning: #F59E0B; /* Added for star rating color */

    /* Assuming these are defined in your main.css or components.js for header height */
    --header-height: 80px; /* Default desktop header height */
    --header-height-mobile: 60px; /* Default mobile header height */
}


/* General Page Content & Section Styling */
.page-content {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xxl);
    background-color: var(--background-light);
}


.section {
    padding: var(--spacing-xxl) 0;
    background-color: var(--background-light);
}

/* UNIVERSAL RULE: Section titles will align with the text direction (left in LTR, right in RTL) */
.section-title {
    font-size: var(--font-size-xxxl);
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    text-align: start; /* Universal alignment: left for LTR, right in RTL */
    line-height: 1.2;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* UNIVERSAL RULE: Section subtitles will align with the text direction (left in LTR, right in RTL) */
.section-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-body);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    text-align: start; /* Universal alignment: left for LTR, right for RTL */
    line-height: 1.6;
}

/* Special override for sections that need to be explicitly centered */
.text-center .section-title,
.text-center .section-subtitle {
    text-align: center;
}


/* Hero Section - Clean & Impactful */
.hero-main {
    background: linear-gradient(rgba(44, 62, 80, 0.3), rgba(44, 62, 80, 0.3)), url('/images/homepage.jpg') no-repeat center center/cover;
    background-size: cover; /* Ensure image covers the area */
    background-position: center; /* Center the image */
    padding: calc(var(--spacing-xxxl) * 1.5) var(--spacing-md);
    text-align: center; /* Hero content is always centered */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    position: relative;
    overflow: hidden;
    padding-top: calc(var(--spacing-xxxl) * 1.5 + var(--header-height)); /* Adjust for header */
}
@media (max-width: 768px) {
    .hero-main {
        padding-top: calc(var(--spacing-xxxl) + var(--header-height-mobile));
    }
}

.hero-main .background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;     /* match hero width */
    height: 100%;    /* match hero height */
    z-index: 1;
    object-fit: cover;   /* ✅ crop like phone background */
    object-position: center;
}


.hero-main .hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
    padding: 0 var(--spacing-md);
}

.hero-main h1 {
    font-size: clamp(var(--font-size-xxl), 5vw, var(--font-size-xxxl));
    line-height: 1.2;
    font-weight: 800;
    max-width: 800px;
    margin: 0 auto;
    letter-spacing: -0.5px;
    color: var(--primary-light);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

.hero-main p {
    font-size: clamp(var(--font-size-sm), 1.5vw, var(--font-size-lg));
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-on-dark);
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-main .hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.hero-main .btn-large {
    font-size: var(--font-size-base);
    padding: var(--spacing-md) var(--spacing-xl);
    min-width: 200px;
    transition: transform 0.2s ease;
    font-weight: 600;
}

.hero-main .btn-primary {
    background-color: var(--white);
    color: var(--white);
    border-color: var(--white);
}

.hero-main .btn-primary:hover {
    background-color: var(--primary-light);
    color: var(--white);
    border-color: var(--primary-light);
}

.hero-main .btn-outline-white {
    border-color: var(--white);
    color: var(--white);
    background-color: transparent;
}

.hero-main .btn-outline-white:hover {
    background-color: var(--white);
    color: var(--primary-dark);
    border-color: var(--white);
}


/* Enhanced "What is Hirly" Section - Modern, Clean Design */
.about-hirly-intro {
    background: linear-gradient(135deg, var(--white) 0%, #f8fafc 100%) !important;
    padding: var(--spacing-xxl) 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.about-hirly-intro::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%) !important;
}

.about-hirly-intro .container {
    position: relative !important;
    z-index: 2 !important;
}

.about-hirly-intro .section-title {
    font-size: var(--font-size-xxxl) !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin-bottom: var(--spacing-lg) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.1 !important;
}

.about-hirly-intro .section-opening-question {
    font-size: var(--font-size-xl) !important;
    font-weight: 700 !important;
    color: var(--primary-dark) !important;
    text-align: center !important;
    margin: 0 auto var(--spacing-lg) !important;
    max-width: 600px !important;
    line-height: 1.4 !important;
    letter-spacing: -0.01em !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.about-hirly-intro .section-intro-paragraph {
    font-size: var(--font-size-lg) !important;
    color: var(--text-body) !important;
    max-width: 900px !important;
    margin: 0 auto var(--spacing-xl) !important;
    line-height: 1.7 !important;
    text-align: center !important;
    font-weight: 400 !important;
    opacity: 0.9 !important;
}

.about-hirly-intro .styled-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto var(--spacing-xl) !important;
    max-width: 800px !important;
    text-align: center !important;
    display: grid !important;
    gap: var(--spacing-md) !important;
}

.about-hirly-intro .styled-list li {
    background: rgba(255, 255, 255, 0.7) !important;
    padding: var(--spacing-md) var(--spacing-lg) !important;
    border-radius: var(--border-radius-md) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    font-size: var(--font-size-base) !important;
    color: var(--text-dark) !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    line-height: 1.6 !important;
    flex-direction: row !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
}

.about-hirly-intro .styled-list li:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(var(--primary-rgb), 0.2) !important;
}

.about-hirly-intro .styled-list li i {
    background: linear-gradient(135deg, var(--success) 0%, #22c55e 100%) !important;
    color: white !important;
    margin-inline-end: var(--spacing-md) !important;
    font-size: var(--font-size-sm) !important;
    flex-shrink: 0 !important;
    padding: 8px !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3) !important;
    margin-top: 2px !important;
}

.about-hirly-intro .section-outro-paragraph {
    font-size: var(--font-size-lg) !important;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    max-width: 900px !important;
    margin: 0 auto 0 !important;
    text-align: center !important;
    line-height: 1.7 !important;
    font-weight: 600 !important;
    padding: var(--spacing-lg) var(--spacing-xl) !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    border-radius: var(--border-radius-lg) !important;
    border: 2px solid rgba(var(--primary-rgb), 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(10px) !important;
    position: relative !important; /* <--- THIS IS THE CRUCIAL FIX */
}

/* Now, this pseudo-element will be positioned relative to the paragraph above */
.about-hirly-intro .section-outro-paragraph::before {
    /* Explicitly define all Font Awesome properties for a solid icon */
    content: '\f005';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    
    /* Ensure the element is visible and has a size */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    display: inline-block;
    
    /* Your existing positioning and styling */
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 0 var(--spacing-sm);
    font-size: var(--font-size-lg);
    color: var(--warning);
    z-index: 10;
    width: auto;
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .about-hirly-intro .section-title {
        font-size: var(--font-size-xxl) !important;
    }
    
    .about-hirly-intro .section-intro-paragraph,
    .about-hirly-intro .section-outro-paragraph {
        font-size: var(--font-size-base) !important;
        padding: var(--spacing-md) !important;
    }
    
    .about-hirly-intro .styled-list li {
        padding: var(--spacing-sm) var(--spacing-md) !important;
    }
    
    .about-hirly-intro .styled-list li i {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
}


/* Popular Categories Section */
.popular-categories .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
}

.popular-categories .category-card {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xs);
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.popular-categories .category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.popular-categories .category-card .category-icon {
    font-size: var(--font-size-xxl);
    color: var(--accent);
    margin-bottom: var(--spacing-sm);
}

.popular-categories .category-card h3 {
    font-size: var(--font-size-base);
    color: var(--primary-dark);
    margin-bottom: 0;
}

/* Diverse Opportunities Section */
.diverse-opportunities {
    background-color: var(--background-light);
    padding: var(--spacing-xxl) 0;
}

.opportunities-showcase {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
}

.opportunities-showcase.services {
    margin-top: var(--spacing-xxxl);
}

/* UNIVERSAL RULE: Showcase header uses flex direction based on LTR/RTL */
.showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    flex-direction: row; /* Default for LTR */
}

/* UNIVERSAL RULE: Showcase title aligns with text direction */
.showcase-title {
    text-align: start; /* Universal alignment */
}

.category-label {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 600;
    display: block;
    margin-bottom: var(--spacing-xs);
}

.showcase-title h3 {
    font-size: clamp(var(--font-size-lg), 2.5vw, var(--font-size-xxl));
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
}

.showcase-title p {
    color: var(--text-light);
    font-size: var(--font-size-base);
}

.showcase-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all 0.2s ease;
}

/* RTL specific arrow flip for showcase-link */
html[dir="rtl"] .showcase-link i.fa-arrow-right {
    transform: scaleX(-1); /* Flip horizontally */
}

html[dir="rtl"] .showcase-link:hover i.fa-arrow-right {
    transform: translateX(-4px) scaleX(-1); /* Move left and stay flipped */
}

.showcase-link:hover {
    color: var(--primary-dark);
    /* `translateX` works relative to the element's inherent direction. */
    /* For RTL, if the arrow is on the right and we want it to "move forward" with hover,
       it should move right. This is achieved by positive translateX. */
    transform: translateX(4px);
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

/* MODIFIED: New grid styles for featured talents and jobs by tier */
.talent-grid-scroll-wrapper,
.jobs-by-tier-grid-scroll-wrapper,
.companies-grid-scroll-wrapper, /* UPDATED: Add new class for companies */
.services-grid-scroll-wrapper /* NEW: Services scroll wrapper */
{
    position: relative;
    display: flex;
    align-items: center;
    margin-top: var(--spacing-xl);
    padding: 0; /* Keep wrapper padding at 0 for desktop, will add in mobile media query */
    overflow-x: auto; /* Always allow horizontal scrolling */
    scroll-snap-type: x mandatory; /* Re-added scroll snapping for horizontal lists */
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}

/* MODIFIED: Hide scrollbar for Webkit browsers */
.talent-grid-scroll-wrapper::-webkit-scrollbar,
.jobs-by-tier-grid-scroll-wrapper::-webkit-scrollbar,
.companies-grid-scroll-wrapper::-webkit-scrollbar,
.services-grid-scroll-wrapper::-webkit-scrollbar { /* NEW: Services scrollbar hide */
    display: none;
}

.talent-grid,
.jobs-by-tier-grid,
.companies-grid,
.services-grid { /* NEW: Services grid flex */
    display: flex; /* Always use flex for horizontal scrolling */
    flex-wrap: nowrap; /* Prevent wrapping */
    gap: var(--spacing-lg); /* Keep gap for spacing between cards */
    padding: 0;
    margin: 0;
    scroll-padding-inline-start: 0; /* Use logical property */
    scroll-padding-inline-end: 0;   /* Use logical property */
    scroll-behavior: smooth;
    width: max-content; /* Ensure it takes full width of its content for scrolling */
    justify-content: flex-start; /* Align items to the start for scrolling */
}

/* REMOVED: Desktop-specific grid styles for companies, defaulting to horizontal scroll. */

.showcase-featured {
    grid-column: 1;
}

.showcase-regular {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

/* Card Styles */
.category-card,
.talent-card,
.job-card,
.company-card /* UPDATED: Add new class for companies */
{
    background: var(--white);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
}


@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.category-card.featured,
.service-card-horizontal.featured {
    padding: var(--spacing-xl);
    color: var(--white);
    border: none;
    overflow: hidden;
    position: relative;
}

/* IMPORTANT: Replace these with your actual image paths */
.category-card.featured {
    background: linear-gradient(rgba(44, 62, 80, 0.2), rgba(44, 62, 80, 0.2)), url('/images/IT.jpg') no-repeat center center/cover;
}

.category-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(44, 62, 80, 0.2) 0%, rgba(44, 62, 80, 0.2) 100%);
    z-index: 1;
}

.service-card-horizontal.featured {
    background: linear-gradient(rgba(44, 62, 80, 0.2), rgba(44, 62, 80, 0.4)), url('/images/farmer.jpg') no-repeat center center/cover;
}

.service-card-horizontal.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(44, 62, 80, 0.2) 0%, rgba(44, 62, 80, 0.2) 100%);
    z-index: 1;
}

.featured .card-content {
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.featured .category-icon,
.featured .service-icon {
    color: var(--secondary);
    font-size: var(--font-size-xxl);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: var(--spacing-md);
    opacity: 1;
}

.featured h4 {
    color: var(--white);
    font-size: clamp(var(--font-size-lg), 2.5vw, var(--font-size-xxl));
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
    position: relative;
    display: inline-block;
    background: linear-gradient(45deg, #ffffff 0%, #f0f0f0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: brightness(1.2) contrast(1.2);
}

/* UNIVERSAL RULE: Pseudo-element position based on logical 'end' */
.featured h4::after {
    content: '';
    position: absolute;
    inset-inline-end: 0; /* Universal positioning: right in LTR, left in RTL */
    bottom: -8px;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary) 0%, rgba(80, 227, 194, 0.7) 100%);
    opacity: 1;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.featured p {
    color: var(--text-on-dark);
    font-size: var(--font-size-base);
    line-height: 1.6;
    font-weight: 500;
    margin-top: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.card-content {
    flex: 1;
}

.category-icon,
.service-icon {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-md);
}

.category-card .category-icon {
    color: var(--primary);
}

.service-card-horizontal .service-icon {
    color: var(--accent);
}

.category-card h4,
.service-card-horizontal h4 {
    font-size: var(--font-size-lg);
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.category-card p,
.service-card-horizontal p {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    margin: 0;
}

/* UNIVERSAL RULE: Trending tag position based on logical 'end' */
.trending-tag {
    position: absolute;
    top: var(--spacing-md);
    inset-inline-end: var(--spacing-md); /* Universal positioning: right in LTR, left in RTL */
    background: var(--primary-light);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--primary-dark);
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.service-card-horizontal .trending-tag {
    background: var(--secondary-light);
    color: var(--secondary-dark);
}

/* Hover Effects */
.category-card:hover,
.service-card-horizontal:hover,
.talent-card:hover,
.job-card:hover, /* UPDATED */
.company-card:hover /* UPDATED */
{
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary); /* Default hover border color */
}

/* Specific hover border colors */
.service-card-horizontal:hover {
    border-color: var(--accent);
}

.talent-card:hover {
    border-color: var(--primary);
}

/* NEW: Job card hover border color */
.job-card:hover {
    border-color: var(--secondary);
}

/* NEW: Company card hover border color */
.company-card:hover {
    border-color: var(--accent);
}


.category-card.featured:hover,
.service-card-horizontal.featured:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border: none;
}

.category-card:not(.featured):hover {
    /* `135deg` is absolute, so it does not change with text direction. */
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
}

.service-card-horizontal:not(.featured):hover {
    /* `135deg` is absolute, so it does not change with text direction. */
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--white) 100%);
}

/* UNIVERSAL RULE: Professional Categories specific styles using logical borders */
.professional-categories .category-card {
    border-inline-start: none; /* No border at the start (left in LTR, right in RTL) */
    border-inline-end: 3px solid var(--primary); /* Border at the end (right in LTR, left in RTL) */
}

/* UNIVERSAL RULE: Quick Services specific styles using logical borders */
.quick-services .service-card {
    border-inline-start: none; /* No border at the start (left in LTR, right in RTL) */
    border-inline-end: 3px solid var(--accent); /* Border at the end (right in LTR, left in RTL) */
}

.quick-services .service-icon {
    color: var(--accent);
}

/* Why Choose Hirly Section - Concise & Visually Appealing */
.why-choose-us {
    background-color: var(--background-light);
    padding: var(--spacing-xxl) 0;
}

.why-choose-us .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.why-choose-us .feature-card {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xs);
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid var(--border-color);
}

.why-choose-us .feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.why-choose-us .feature-card .feature-icon {
    font-size: var(--font-size-xxl);
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.why-choose-us .feature-card h3 {
    font-size: var(--font-size-lg);
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

.why-choose-us .feature-card p {
    font-size: var(--font-size-sm);
    color: var(--text-body);
    line-height: 1.6;
}

/* Quick Services Section */
.quick-services {
    background-color: var(--background-light);
    padding: var(--spacing-lg) 0; /* Adjusted padding */
}

.quick-services .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
}

.quick-services .service-card-horizontal {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xs);
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1-px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.quick-services .service-card-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.quick-services .service-card-horizontal .service-icon {
    font-size: var(--font-size-xxl);
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.quick-services .service-card-horizontal h3 {
    font-size: var(--font-size-base);
    color: var(--primary-dark);
    margin-bottom: 0;
}

/* Final Call to Action Section - Enhanced & Beautiful */
.final-cta {
    background: linear-gradient(135deg, 
        var(--primary-dark) 0%, 
        var(--primary) 50%, 
        var(--secondary) 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
    color: var(--white);
    padding: var(--spacing-xxxl) var(--spacing-md);
    text-align: center;
    border-radius: var(--border-radius-lg);
    margin: var(--spacing-xxl) auto;
    max-width: 1200px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.final-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 3s ease-in-out infinite;
}

.final-cta:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.2),
        0 15px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.final-cta .section-title {
    color: var(--white);
    font-size: var(--font-size-xxxl);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

.final-cta .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xl);
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.final-cta .cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.final-cta .btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    border: 2px solid transparent;
}

.final-cta .btn-lg::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.final-cta .btn-lg:hover::before {
    left: 100%;
}

.final-cta .btn-primary {
    background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
    color: var(--primary-dark);
    border-color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.final-cta .btn-primary:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, var(--primary-light) 100%);
    color: var(--primary-dark);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

.final-cta .btn-outline-white {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: var(--white);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.final-cta .btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced CTA Responsive Design */
@media (max-width: 992px) {
    .final-cta {
        padding: var(--spacing-xl) var(--spacing-md);
        margin: var(--spacing-xl) var(--spacing-sm);
    }
    .final-cta .section-title {
        font-size: var(--font-size-xxl);
    }
    .final-cta .section-subtitle {
        font-size: var(--font-size-base);
    }
    .final-cta .btn-lg {
        min-width: 180px;
        padding: var(--spacing-sm) var(--spacing-lg);
    }
}

@media (max-width: 576px) {
    .final-cta {
        padding: var(--spacing-lg) var(--spacing-sm);
        margin: var(--spacing-lg) var(--spacing-xs);
        border-radius: var(--border-radius);
    }
    .final-cta .section-title {
        font-size: var(--font-size-xl);
    }
    .final-cta .section-subtitle {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-lg);
    }
    .final-cta .btn-lg {
        min-width: 160px;
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    .final-cta .cta-buttons {
        flex-direction: column; /* Stack CTA buttons vertically */
    }
}

/* NEW: Styles for Discover Talents/Jobs/Companies/Services sections */
.discover-talents,
.discover-jobs-by-tier,
.discover-companies,
.discover-services { /* NEW: Services section */
    background-color: var(--background-light);
    padding: var(--spacing-xxl) 0;
}

/* Talent and Company card base styles are already defined above,
   ensuring consistency with other cards. */
   
/* NEW: Service card specific styles for the new horizontal section */
.service-card-horizontal {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    flex: 0 0 280px;
    width: 280px;
    min-width: 280px;
    height: 320px; /* Increased card height for better spacing */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    scroll-snap-align: start;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.5s ease-out forwards;
}

html[dir="rtl"] .service-card-horizontal {
    direction: rtl !important;
    text-align: center !important;
}

.service-card-horizontal:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.service-card-header-horizontal {
    width: 100%;
    flex-grow: 1; /* Allow header to take up remaining space */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* For image positioning */
    overflow: hidden;
}

.service-card-horizontal .service-image-horizontal {
    width: 100%;
    height: 100%; /* Make image fill the header space */
    object-fit: cover;
    border-radius: var(--border-radius-md);
    transition: transform 0.3s ease;
}

.service-card-horizontal:hover .service-image-horizontal {
    transform: scale(1.1);
}

.service-card-body-horizontal {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 1rem;
}

html[dir="rtl"] .service-card-body-horizontal {
    align-items: center;
    text-align: center;
}

.service-card-horizontal .service-title-horizontal {
    font-size: var(--font-size-base);
    color: var(--primary-dark);
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.service-card-horizontal .service-price-horizontal {
    font-size: var(--font-size-sm);
    color: var(--accent);
    font-weight: 700;
    margin: 0;
}

.service-card-footer-horizontal {
    width: 100%;
    padding-top: 1rem;
}

.service-card-horizontal .view-profile-btn-horizontal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: color 0.2s ease;
}

.service-card-horizontal .view-profile-btn-horizontal:hover {
    color: var(--primary-dark);
}

html[dir="rtl"] .service-card-horizontal .view-profile-btn-horizontal {
    flex-direction: row-reverse;
}

/* Talent Card Specific Styles (from page-talent.css) */
.talent-card {
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    min-height: 400px;
    box-sizing: border-box;
    width: 280px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: start;

    /* Animation for dynamic loading */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.5s ease-out forwards;
}

html[dir="rtl"] .talent-card {
    direction: rtl !important;
    text-align: right !important;
    align-items: flex-end !important;
}

.talent-card .avatar-container {
    align-self: flex-start;
    margin-bottom: 1rem;
}

html[dir="rtl"] .talent-card .avatar-container {
    align-self: flex-end !important;
}

.talent-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* UNIVERSAL RULE: Talent card header uses flex direction based on LTR/RTL */
.talent-card-header {
    display: flex;
    flex-direction: row; /* Default for LTR */
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    flex-shrink: 0;
    width: 100%;
    margin-bottom: 0.75rem;
}

/* UNIVERSAL RULE: Talent name and location align with text direction */
.talent-name-and-location {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Universal alignment */
    text-align: start; /* Universal alignment */
    flex-grow: 1;
    overflow: hidden;
}

html[dir="rtl"] .talent-name-and-location {
    align-items: flex-end !important;
    text-align: right !important;
    width: 100% !important;
    margin-left: auto;
    margin-right: 0;
    justify-content: flex-end !important;
}


/* UNIVERSAL RULE: Talent rating aligns with text direction */
.talent-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-body);
    font-size: var(--font-size-base);
    justify-content: flex-start; /* Universal alignment */
    min-height: 1.5em;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

html[dir="rtl"] .talent-rating {
    justify-content: flex-end !important;
    text-align: right !important;
    width: 100% !important;
    align-items: center !important;
    flex-direction: row-reverse !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    float: right !important;
    display: flex !important;
}

html[dir="rtl"] .talent-card .talent-rating {
    justify-content: flex-end !important;
    text-align: right !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    float: right !important;
    display: flex !important;
    width: 100% !important;
    flex-direction: row-reverse !important;
    align-self: flex-end !important;
}

html[dir="rtl"] .talent-rating i {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
    order: 1 !important;
}

.talent-rating i {
    color: var(--warning);
}

/* UNIVERSAL RULE: Talent location aligns with text direction */
.talent-location-display {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Universal alignment */
    gap: var(--spacing-xs);
    color: var(--text-body);
    font-size: var(--font-size-sm);
    min-height: 1.5em;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

html[dir="rtl"] .talent-location-display {
    justify-content: flex-end !important;
    text-align: right !important;
    width: 100% !important;
    align-items: center !important;
    flex-direction: row-reverse !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    float: right !important;
    display: flex !important;
}

html[dir="rtl"] .talent-card .talent-location-display {
    justify-content: flex-end !important;
    text-align: right !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    float: right !important;
    display: flex !important;
    width: 100% !important;
    flex-direction: row-reverse !important;
    align-self: flex-end !important;
}

html[dir="rtl"] .talent-location-display i {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
    order: 1 !important;
}

.talent-location-display i {
    color: var(--primary);
}

/* Additional RTL styling for talent card elements */
html[dir="rtl"] .talent-name {
    text-align: right !important;
    direction: rtl !important;
    margin-left: auto;
    margin-right: 0;
    width: 100% !important;
}

html[dir="rtl"] .talent-title {
    text-align: right !important;
    direction: rtl !important;
}

html[dir="rtl"] .talent-description {
    text-align: right !important;
    direction: rtl !important;
}

html[dir="rtl"] .talent-skills {
    text-align: right !important;
    direction: rtl !important;
    justify-content: flex-end !important;
}

html[dir="rtl"] .talent-skill-tag {
    text-align: right !important;
    direction: rtl !important;
}

html[dir="rtl"] .talent-card-header {
    flex-direction: row-reverse !important;
    justify-content: space-between !important;
    align-items: center !important;
}

html[dir="rtl"] .talent-card-content {
    text-align: right !important;
    direction: rtl !important;
}

html[dir="rtl"] .talent-card-body {
    text-align: right !important;
    direction: rtl !important;
}

html[dir="rtl"] .talent-card-footer {
    flex-direction: row-reverse !important;
    justify-content: space-between !important;
}

html[dir="rtl"] .talent-hourly-rate {
    text-align: right !important;
    justify-content: flex-end !important;
}

html[dir="rtl"] .talent-card .btn {
    text-align: center !important;
}

html[dir="rtl"] .talent-card-divider {
    margin: 0.75rem 0 !important;
}


.talent-card-divider {
    width: 100%;
    height: 2px;
    background-color: var(--border-color);
    margin: 0.75rem 0;
}

/* UNIVERSAL RULE: Talent details bottom section aligns with text direction */
.talent-details-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Universal alignment */
    flex-grow: 1;
    justify-content: flex-start;
    width: 100%;
    padding-bottom: 0.5rem;
}

/* RTL specific alignment for talent details bottom */
html[dir="rtl"] .talent-details-bottom {
    align-items: flex-end !important;
    text-align: right !important;
    direction: rtl !important;
}


/* UNIVERSAL RULE: Talent avatar container uses logical margin */
.talent-avatar-container {
    order: 1; /* Default order */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-extra-light);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
    transition: all 0.2s ease;
    color: var(--primary);
    font-weight: 600;
    font-size: var(--font-size-lg);
    margin-inline-end: 0.5rem; /* Universal margin: right in LTR, left in RTL */
    margin-bottom: 0;
}

/* RTL specific order for talent avatar */
html[dir="rtl"] .talent-avatar-container {
    order: 1 !important;
    margin-inline-end: 0 !important;
    margin-inline-start: 0.5rem !important;
}


.talent-avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.talent-avatar-container.premium-border {
    border: 3px solid #DAA520; /* Goldenrod for Premium */
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.7);
}

.talent-card:hover .talent-avatar-container {
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

/* UNIVERSAL RULE: Talent skills container aligns with text direction */
.talent-skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Universal alignment */
    gap: 0.5rem;
    margin-top: auto;
    /* min-height: 3em; */ /* MODIFIED: Remove min-height */
    align-items: flex-start; /* MODIFIED: Align items at the top */
    width: 100%;
    min-height: 2.5em; /* Add minimum height to maintain consistent spacing */
    overflow: hidden; /* Prevent overflow from breaking layout */
}

/* RTL specific alignment for talent skills */
html[dir="rtl"] .talent-skills-container {
    justify-content: flex-end; /* Align to the right */
    align-items: flex-start; /* MODIFIED: Align items at the top */
}


.skill-tag {
    font-size: var(--font-size-xs);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: var(--tag-background);
    color: var(--tag-text);
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0; /* MODIFIED: Prevent tags from shrinking */
    max-width: 150px; /* Limit maximum width */
    overflow: hidden;
    text-overflow: ellipsis;
}
.skill-tag:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.skill-tag.skill-more {
    background-color: var(--primary-extra-light);
    color: var(--primary-dark);
    font-weight: 600;
}

.talent-actions {
    margin-top: var(--spacing-md);
    width: 100%;
    flex-shrink: 0;
    position: relative; /* Ensure consistent positioning */
    bottom: 0; /* Align to bottom of card */
}

.talent-actions .btn {
    width: 100%;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    border-radius: var(--border-radius);
    white-space: nowrap; /* Prevent button text from wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
}

.talent-actions .btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Job Card Specific Styles (from page-jobs.css inspiration) */
.job-card {
    min-height: 380px !important;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    padding-bottom: var(--spacing-sm);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    text-align: center;
    flex-shrink: 0; /* Prevent from shrinking in flex container */
    min-width: 320px;
    min-height: 320px; /* Fixed height for uniformity and to prevent button cutoff */
    box-sizing: border-box;
    align-items: center; /* Center content horizontally */
    justify-content: space-between; /* Distribute content vertically */

    /* Animation for dynamic loading */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.5s ease-out forwards;
}

.job-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary); /* Distinct hover color for job cards */
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.5rem;
    width: 100%;
    flex-direction: row; /* Default LTR */
}

html[dir="rtl"] .job-card-header {
    flex-direction: row-reverse; /* RTL flip */
}

.job-card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Default LTR */
    text-align: right; /* Default LTR */
    flex-grow: 1;
    overflow: hidden;
}

html[dir="rtl"] .job-card-info {
    align-items: flex-end !important; /* RTL align right */
    text-align: right !important; /* RTL align right */
    display: flex !important;
    width: 100% !important;
    flex-direction: column !important;
    align-self: flex-end !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}


.job-title-main {
    font-size: var(--font-size-base); /* Reduced font size */
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%; /* Ensure it takes full width */
}

.job-employer-name {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.job-employer-logo-container {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border: 2px solid transparent;
    background: var(--primary-extra-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--primary);
    box-shadow: var(--shadow-xs);
    transition: all 0.2s ease;
    overflow: hidden;
    flex-shrink: 0;
    margin-inline-end: 0.5rem; /* Universal margin */
}

html[dir="rtl"] .job-employer-logo-container {
    margin-inline-end: 0;
    margin-inline-start: 0.5rem; /* RTL margin */
    order: -1 !important;
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

.job-employer-logo-container.company {
    border-radius: var(--radius-sm); /* Square for company logos */
}

.job-employer-logo-container.individual {
    border-radius: 50%; /* Circle for individual avatars */
}

.job-employer-logo-container.unlimited-border {
    border-color: #FF1493;
    box-shadow: 0 0 8px rgba(255, 20, 147, 0.5);
}

.job-employer-logo-container.pro-border {
    border-color: #C0C0C0;
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.5);
}

.job-employer-logo-container.premium-border {
    border-color: #DAA520;
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.5);
}

.job-card:hover .job-employer-logo-container {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center !important; /* Center items */
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: var(--font-size-sm);
    color: var(--text-body);
    width: 100%; /* Ensure it takes full width */
    text-align: center !important;
}

html[dir="rtl"] .job-meta {
    justify-content: center !important; /* Keep centered in RTL */
    text-align: center !important;
}

.job-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

html[dir="rtl"] .job-meta span {
    flex-direction: row-reverse; /* RTL flip for individual spans */
}

html[dir="rtl"] .job-meta span i {
    margin-left: 0.5rem; /* Space after icon in RTL */
    margin-right: 0; /* Remove LTR margin */
    order: 1 !important; /* Move icon to the right */
}

.job-meta i {
    color: var(--primary);
}

.job-location-display {
    display: flex;
    align-items: center;
    justify-content: center !important;
    gap: var(--spacing-xs);
    color: var(--text-body);
    font-size: var(--font-size-sm);
    width: 100%; /* Ensure it takes full width */
    text-align: center !important;
}

html[dir="rtl"] .job-location-display {
    flex-direction: row-reverse !important; /* Reverse order to show text before icon */
    justify-content: center !important; /* Keep centered in RTL */
    text-align: center !important;
}

html[dir="rtl"] .job-location-display i {
    margin-left: var(--spacing-xs); /* Space after icon in RTL */
    margin-right: 0; /* Remove LTR margin */
}

.job-location-display i {
    color: var(--primary);
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center !important; /* Center tags */
    gap: 0.5rem;
    margin-top: auto;
    width: 100%; /* Ensure it takes full width */
    text-align: center !important;
}

html[dir="rtl"] .job-tags {
    justify-content: center !important; /* Keep centered in RTL */
    text-align: center !important;
}

.tag {
    font-size: var(--font-size-xs);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: var(--primary-extra-light);
    color: var(--primary);
    font-weight: 500;
    white-space: nowrap;
}

.job-type-tag {
    background: var(--primary-light);
    color: var(--primary);
}

.job-actions {
    margin-top: var(--spacing-md);
    width: 100%;
    flex-shrink: 0;
}

.job-actions .btn {
    width: 100%;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    border-radius: var(--border-radius);
}

.job-actions .btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* RTL styling for view-details-btn arrow icon */
html[dir="rtl"] .view-details-btn i {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
    order: -1 !important; /* Move arrow to the left in RTL */
}

/* --- MODAL STYLES (from jobs.css inspiration) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* UNIVERSAL RULE: Modal close button position based on logical 'end' */
.modal-close {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem; /* Universal positioning: right in LTR, left in RTL */
    font-size: var(--font-size-lg);
    color: var(--text-light);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--text-dark);
    background-color: var(--background-hover);
}

.modal-header-icon-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.modal-header-icon-container:hover {
    transform: scale(1.1);
}

.modal-content h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.modal-content p {
    font-size: var(--font-size-sm);
    color: var(--text-body);
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
}

.modal-actions .btn {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
}

/* Styles for scrollable grid wrappers and buttons */
.scroll-button {
    display: none; /* Hide buttons completely */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .talent-card,
    .job-card { /* Updated to job-card */
        min-width: 420px;
        min-height: 380px;
        width: 100%;
        max-width: 100%;
    }

    .talent-grid,
    .jobs-by-tier-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

/* --- ENHANCED MOBILE STYLES FOR JOB CARDS --- */
@media (max-width: 768px) {
    /* Set a fixed size for the card to ensure consistency */
    .job-card {
        flex: 0 0 270px;
        width: 250px;
        min-width: 270px;
        height: 300px; /* NEW: Set a fixed height */
        scroll-snap-align: start;
        padding: 1rem;
        gap: 0.5rem; /* Reduced gap for a tighter layout */
    }

    /* Constrain the header info section to prevent it from growing too tall */
    .job-card-info {
        height: 55px; /* NEW: Fixed height to control multi-line titles */
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* NEW: Limit job title to 2 lines */
        -webkit-box-orient: vertical;
        line-clamp: 2; /* Standard property for line clamping */
        margin-left: 0;
        margin-right: auto;
    }

    /* Ensure job title fits within the constrained space */
    .job-title-main {
        font-size: var(--font-size-sm);
        line-height: 1.2;
    }

    /* Make sure employer name is always a single line with ellipsis */
    .job-employer-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Adjust avatar container size for a compact look */
    .job-employer-logo-container {
        width: 40px;
        height: 40px;
    }

    /* Adjust the spacing and font size for meta details */
    .job-meta {
        margin-top: 0;
        font-size: var(--font-size-xs);
        padding: 0.25rem 0;
        gap: 0.5rem;
        justify-content: space-between;
    }
    
    /* Ensure the location display is a single line */
    .job-location-display {
        font-size: var(--font-size-xs);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
        width: 100%;
        margin-top: 0.25rem;
    }
    
    /* Make job tags smaller and wrap neatly */
    .job-tags {
        margin-top: 0.25rem;
        justify-content: center;
    }
    
    .tag {
        font-size: var(--font-size-xxs);
        padding: 0.15rem 0.5rem;
    }
    
    /* Ensure the button is always at the bottom */
    .job-actions .btn {
        padding: 0.6rem 1rem;
        font-size: var(--font-size-sm);
        margin-top: auto; /* Push the button to the bottom */
    }
}

@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
    }
    .modal-header-icon-container {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
    }
    .modal-content h2 {
        font-size: var(--font-size-lg);
    }
    .modal-content p {
        font-size: var(--font-size-xs);
    }
    .modal-actions .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-xs);
    }

    /* Adjust showcase grid for smaller screens */
    .showcase-grid {
        grid-template-columns: 1fr; /* Single column layout */
    }

    .showcase-featured {
        grid-column: 1; /* Ensure featured card takes full width */
    }

    .showcase-regular {
        grid-column: 1; /* Ensure regular cards also take full width */
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Allow multiple small cards if space permits */
        gap: var(--spacing-sm); /* Reduce gap for smaller screens */
    }

    /* MODIFIED: Adjust wrapper padding for mobile */
    .talent-grid-scroll-wrapper,
    .jobs-by-tier-grid-scroll-wrapper,
    .companies-grid-scroll-wrapper,
    .services-grid-scroll-wrapper { /* NEW: Services wrapper */
        padding: 0 var(--spacing-md); /* Add consistent padding to the sides of the wrapper */
        overflow-x: auto;
        width: 100%;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .talent-grid-scroll-wrapper::-webkit-scrollbar,
    .jobs-by-tier-grid-scroll-wrapper::-webkit-scrollbar,
    .companies-grid-scroll-wrapper::-webkit-scrollbar,
    .services-grid-scroll-wrapper::-webkit-scrollbar { /* NEW: Services scrollbar hide */
        display: none;
    }

    /* MODIFIED: Reset grid padding/margin and set scroll-padding to match wrapper */
    .talent-grid,
    .jobs-by-tier-grid,
    .companies-grid,
    .services-grid { /* NEW: Services grid flex */
        display: flex;
        flex-wrap: nowrap;
        gap: 1.5rem;
        width: max-content;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .talent-grid::-webkit-scrollbar,
    .jobs-by-tier-grid::-webkit-scrollbar,
    .companies-grid::-webkit-scrollbar,
    .services-grid::-webkit-scrollbar { /* NEW: Services scrollbar hide */
        display: none;
    }

    .talent-card {
        /* MODIFIED: Set fixed width for horizontal scrolling */
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        scroll-snap-align: start;
    }
    
    .job-card { /* Updated to job-card */
        /* MODIFIED: Set fixed width for horizontal scrolling on small screens - slightly wider */
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
        height: 280px;
        scroll-snap-align: start;
    }
    
    .job-card .btn,
    .job-card .btn-secondary {
        padding: 0.75rem 1rem;
        font-size: var(--font-size-base);
        margin-top: -0.5rem;
    }

    .talent-name,
    .company-name {
        font-size: var(--font-size-base);
    }

    .talent-rating,
    .talent-location,
    .company-meta {
        font-size: var(--font-size-xs);
    }

    .company-industry-display { /* Responsive font size for industry */
        font-size: var(--font-size-xxs);
    }

    .skill-tag {
        font-size: var(--font-size-xxs);
        padding: 0.25rem 0.75rem;
    }

    .talent-badge,
    .company-badge {
        font-size: var(--font-size-xxs);
        padding: var(--spacing-xxs) var(--spacing-sm);
    }
}

@media (max-width: 576px) {
    .hero-main h1 {
        font-size: var(--font-size-xl);
    }
    .hero-main p {
        font-size: var(--font-size-xs);
    }
    .hero-main .hero-buttons {
        flex-direction: column; /* Stack buttons vertically on very small screens */
        gap: var(--spacing-sm);
    }
    .hero-main .btn-large {
        min-width: unset; /* Remove min-width to allow full flexibility */
        width: 100%; /* Make buttons take full width */
    }

    .section-title {
        font-size: var(--font-size-lg);
    }
    .section-subtitle {
        font-size: var(--font-size-xs); /* Adjusted from xxs for better readability */
    }

    .why-choose-us .features-grid {
        grid-template-columns: 1fr;
    }

    .final-cta .cta-buttons {
        flex-direction: column; /* Stack CTA buttons vertically */
    }

    /* MODIFIED: Adjust wrapper padding for very small screens */
    .talent-grid-scroll-wrapper,
    .jobs-by-tier-grid-scroll-wrapper,
    .companies-grid-scroll-wrapper,
    .services-grid-scroll-wrapper { /* NEW: Services wrapper */
        padding: 0 var(--spacing-sm); /* Reduce padding for very small screens */
    }

    /* MODIFIED: Adjust scroll-padding to match new wrapper padding */
    .talent-grid,
    .jobs-by-tier-grid,
    .companies-grid,
    .services-grid { /* NEW: Services grid flex */
        scroll-padding-inline-start: var(--spacing-sm);
        scroll-padding-inline-end: var(--spacing-sm);
    }

    .talent-card {
        /* MODIFIED: Set fixed width for horizontal scrolling on small screens */
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
        height: 280px;
        scroll-snap-align: start;
    }
    
    .job-card { /* Updated to job-card */
        /* MODIFIED: Set fixed width for horizontal scrolling on small screens - slightly wider */
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
        height: 280px;
        scroll-snap-align: start;
    }
    
    .job-card .btn,
    .job-card .btn-secondary {
        padding: 0.75rem 1rem;
        font-size: var(--font-size-base);
        margin-top: -0.5rem;
    }

    .talent-name,
    .company-name {
        font-size: var(--font-size-base);
    }

    .talent-rating,
    .talent-location,
    .company-meta {
        font-size: var(--font-size-xs);
    }

    .company-industry-display { /* Responsive font size for industry */
        font-size: var(--font-size-xxs);
    }

    .skill-tag {
        font-size: var(--font-size-xxs);
        padding: 0.25rem 0.75rem;
    }

    .talent-badge,
    .company-badge {
        font-size: var(--font-size-xxs);
        padding: var(--spacing-xxs) var(--spacing-sm);
    }
}

/* Ensure consistent spacing for containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (max-width: 576px) {
    .container {
        padding: 0 var(--spacing-sm); /* Reduce container padding on very small screens */
    }
}

/* New section for the "About Hirly" intro paragraph */
.about-hirly-intro {
    background-color: var(--white); /* Or a subtle background color */
    padding: var(--spacing-xxl) 0;
}

.about-hirly-intro .section-title {
    margin-bottom: var(--spacing-md); /* Increased margin for better separation from intro paragraph */
}

.about-hirly-intro .section-intro-paragraph {
    font-size: var(--font-size-base);
    color: var(--text-body);
    max-width: 700px;
    margin: 0 auto var(--spacing-lg); /* Added bottom margin for separation from list */
    text-align: start; /* Universal alignment */
    line-height: 1.6;
}

.about-hirly-intro .styled-list {
    list-style: none;
    padding: 0;
    margin: 0 auto var(--spacing-lg);
    max-width: 700px;
    text-align: start; /* Universal alignment */
}

.about-hirly-intro .styled-list li {
    font-size: var(--font-size-base);
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: flex-start;
    line-height: 1.6;
    flex-direction: row; /* Default for LTR */
}

.about-hirly-intro .styled-list li i {
    color: var(--accent); /* Color for the checkmark icon */
    margin-inline-end: var(--spacing-sm); /* Universal margin: right in LTR, left in RTL */
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    padding-top: 2px;
}

.about-hirly-intro .section-outro-paragraph {
    font-size: var(--font-size-base);
    color: var(--text-body);
    max-width: 700px;
    margin: 0 auto 0;
    text-align: start; /* Universal alignment */
    line-height: 1.6;
}

/* No Results / Empty State for dynamic grids */
.empty-state {
    grid-column: 1 / -1; /* Span full width in grid */
    text-align: center;
    padding: 3rem;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin: 0 auto; /* Center the block */
    max-width: 600px; /* Limit width */
}

.empty-state.small-empty-state {
    padding: 1.5rem; /* Smaller padding */
    max-width: 400px; /* Smaller max-width */
}

.empty-state i {
    font-size: var(--font-size-xxxl);
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}
.empty-state.small-empty-state i {
    font-size: var(--font-size-xxl); /* Smaller icon for small empty state */
}

.empty-state p {
    color: var(--text-body);
    margin-bottom: var(--spacing-lg);
}
.empty-state.small-empty-state p {
    font-size: var(--font-size-sm); /* Smaller text for small empty state */
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    grid-column: 1 / -1; /* Span full width in grid */
    padding: 3rem;
}

.loading-spinner i {
    font-size: var(--font-size-xxxl);
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* NEW: Company Card Styles for the new section */
.company-card {
    border-radius: var(--border-radius-lg);
    padding: 1.5rem; /* Increased padding */
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    flex: 0 0 280px; /* Increased card width */
    width: 280px;
    min-width: 280px;
    height: 180px; /* Increased card height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    scroll-snap-align: start;

    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.5s ease-out forwards;
}

html[dir="rtl"] .company-card {
    direction: rtl !important;
    text-align: center !important;
}

.company-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.company-logo-container {
    width: 80px; /* Increased logo size */
    height: 80px; /* Increased logo size */
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-extra-light);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
    margin-bottom: 0.75rem; /* Increased margin */
    color: var(--primary);
    font-weight: 600;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    border: 3px solid transparent;
}

.company-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    background-color: transparent;
    border-radius: inherit;
}

.company-logo-container.pro-border {
    border-color: #C0C0C0;
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.5);
}

.company-logo-container.unlimited-border {
    border-color: #FF1493;
    box-shadow: 0 0 8px rgba(255, 20, 147, 0.5);
}

.company-name {
    font-size: var(--font-size-base); /* Increased font size */
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
    /* FIX: We will allow the text to wrap to multiple lines to prevent cut-off. */
    overflow: hidden;
    text-overflow: unset; /* Remove ellipsis for desktop */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    width: 100%;
    text-align: center;
    direction: rtl; /* Ensure proper RTL handling */
}

.company-category {
    font-size: var(--font-size-sm); /* Increased font size */
    color: var(--text-light);
    margin: 0;
    font-weight: 400;
}

.company-card.no-logo-card {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    text-decoration: none;
    cursor: default;
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.company-card.no-logo-card .company-logo-container {
    background-color: var(--primary-dark);
    color: var(--white);
    border: none;
}

.company-card.no-logo-card .company-name {
    color: var(--primary-dark);
}

.company-card.no-logo-card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
    cursor: default;
}

@media (max-width: 1024px) {
    /* Styles to allow horizontal scrolling on tablets and mobile */
    .companies-grid-scroll-wrapper {
        padding: 0 var(--spacing-md);
    }
    .company-card {
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
        height: 160px;
        padding: 1rem;
    }
    .company-logo-container {
        width: 70px;
        height: 70px;
    }
    .company-name {
        font-size: var(--font-size-base);
        /* 2-line ellipsis on mobile */
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limit to 2 lines */
        -webkit-box-orient: vertical;
    }
    .company-category {
        font-size: var(--font-size-sm);
    }
    
    /* NEW: Service card responsive styles */
    .services-grid-scroll-wrapper {
        padding: 0 var(--spacing-md);
    }
    .service-card-horizontal {
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
        height: 160px;
        padding: 1rem;
    }
    .service-card-horizontal .service-image-horizontal {
        font-size: var(--font-size-lg);
    }
    .service-card-horizontal h3 {
        font-size: var(--font-size-base);
    }
    .service-card-horizontal p {
        font-size: var(--font-size-sm);
    }
}
@media (min-width: 1025px) {
    /* Set a standard card size for desktop to fit nicely on screen */
    .company-card {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        height: 200px; /* NEW: Increased height for longer names */
    }

    /* NEW: Service card desktop styles */
    .service-card-horizontal {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        height: 200px; 
    }
}

/* Ensure consistent spacing for containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (max-width: 576px) {
    .container {
        padding: 0 var(--spacing-sm); /* Reduce container padding on very small screens */
    }
}

/* New section for the "About Hirly" intro paragraph */
.about-hirly-intro {
    background-color: var(--white); /* Or a subtle background color */
    padding: var(--spacing-xxl) 0;
}

.about-hirly-intro .section-title {
    margin-bottom: var(--spacing-md); /* Increased margin for better separation from intro paragraph */
}

.about-hirly-intro .section-intro-paragraph {
    font-size: var(--font-size-base);
    color: var(--text-body);
    max-width: 700px;
    margin: 0 auto var(--spacing-lg); /* Added bottom margin for separation from list */
    text-align: start; /* Universal alignment */
    line-height: 1.6;
}

.about-hirly-intro .styled-list {
    list-style: none;
    padding: 0;
    margin: 0 auto var(--spacing-lg);
    max-width: 700px;
    text-align: start; /* Universal alignment */
}

.about-hirly-intro .styled-list li {
    font-size: var(--font-size-base);
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: flex-start;
    line-height: 1.6;
    flex-direction: row; /* Default for LTR */
}

.about-hirly-intro .styled-list li i {
    color: var(--accent); /* Color for the checkmark icon */
    margin-inline-end: var(--spacing-sm); /* Universal margin: right in LTR, left in RTL */
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    padding-top: 2px;
}

.about-hirly-intro .section-outro-paragraph {
    font-size: var(--font-size-base);
    color: var(--text-body);
    max-width: 700px;
    margin: 0 auto 0;
    text-align: start; /* Universal alignment */
    line-height: 1.6;
}

/* No Results / Empty State for dynamic grids */
.empty-state {
    grid-column: 1 / -1; /* Span full width in grid */
    text-align: center;
    padding: 3rem;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin: 0 auto; /* Center the block */
    max-width: 600px; /* Limit width */
}

.empty-state.small-empty-state {
    padding: 1.5rem; /* Smaller padding */
    max-width: 400px; /* Smaller max-width */
}

.empty-state i {
    font-size: var(--font-size-xxxl);
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}
.empty-state.small-empty-state i {
    font-size: var(--font-size-xxl); /* Smaller icon for small empty state */
}

.empty-state p {
    color: var(--text-body);
    margin-bottom: var(--spacing-lg);
}
.empty-state.small-empty-state p {
    font-size: var(--font-size-sm); /* Smaller text for small empty state */
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    grid-column: 1 / -1; /* Span full width in grid */
    padding: 3rem;
}

.loading-spinner i {
    font-size: var(--font-size-xxxl);
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* NEW: Company Card Styles for the new section */
.company-card {
    border-radius: var(--border-radius-lg);
    padding: 1.5rem; /* Increased padding */
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    flex: 0 0 280px; /* Increased card width */
    width: 280px;
    min-width: 280px;
    height: 180px; /* Increased card height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    scroll-snap-align: start;

    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.5s ease-out forwards;
}

html[dir="rtl"] .company-card {
    direction: rtl !important;
    text-align: center !important;
}

.company-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.company-logo-container {
    width: 80px; /* Increased logo size */
    height: 80px; /* Increased logo size */
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-extra-light);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
    margin-bottom: 0.75rem; /* Increased margin */
    color: var(--primary);
    font-weight: 600;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    border: 3px solid transparent;
}

.company-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    background-color: transparent;
    border-radius: inherit;
}

.company-logo-container.pro-border {
    border-color: #C0C0C0;
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.5);
}

.company-logo-container.unlimited-border {
    border-color: #FF1493;
    box-shadow: 0 0 8px rgba(255, 20, 147, 0.5);
}

.company-name {
    font-size: var(--font-size-base); /* Increased font size */
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
    /* FIX: We will allow the text to wrap to multiple lines to prevent cut-off. */
    overflow: hidden;
    text-overflow: unset; /* Remove ellipsis for desktop */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    width: 100%;
    text-align: center;
    direction: rtl; /* Ensure proper RTL handling */
}

.company-category {
    font-size: var(--font-size-sm); /* Increased font size */
    color: var(--text-light);
    margin: 0;
    font-weight: 400;
}

.company-card.no-logo-card {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    text-decoration: none;
    cursor: default;
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.company-card.no-logo-card .company-logo-container {
    background-color: var(--primary-dark);
    color: var(--white);
    border: none;
}

.company-card.no-logo-card .company-name {
    color: var(--primary-dark);
}

.company-card.no-logo-card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
    cursor: default;
}

@media (max-width: 1024px) {
    /* Styles to allow horizontal scrolling on tablets and mobile */
    .companies-grid-scroll-wrapper {
        padding: 0 var(--spacing-md);
    }
    .company-card {
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
        height: 160px;
        padding: 1rem;
    }
    .company-logo-container {
        width: 70px;
        height: 70px;
    }
    .company-name {
        font-size: var(--font-size-base);
        /* 2-line ellipsis on mobile */
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limit to 2 lines */
        -webkit-box-orient: vertical;
    }
    .company-category {
        font-size: var(--font-size-sm);
    }
    
    /* NEW: Service card responsive styles */
    .services-grid-scroll-wrapper {
        padding: 0 var(--spacing-md);
    }
    .service-card-horizontal {
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
        height: 160px;
        padding: 1rem;
    }
    .service-card-horizontal .service-image-horizontal {
        font-size: var(--font-size-lg);
    }
    .service-card-horizontal h3 {
        font-size: var(--font-size-base);
    }
    .service-card-horizontal p {
        font-size: var(--font-size-sm);
    }
}
@media (min-width: 1025px) {
    /* Set a standard card size for desktop to fit nicely on screen */
    .company-card {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        height: 200px; /* NEW: Increased height for longer names */
    }

    /* NEW: Service card desktop styles */
    .service-card-horizontal {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        height: 200px; 
    }
}

/* Ensure consistent spacing for containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (max-width: 576px) {
    .container {
        padding: 0 var(--spacing-sm); /* Reduce container padding on very small screens */
    }
}

/* New section for the "About Hirly" intro paragraph */
.about-hirly-intro {
    background-color: var(--white); /* Or a subtle background color */
    padding: var(--spacing-xxl) 0;
}

.about-hirly-intro .section-title {
    margin-bottom: var(--spacing-md); /* Increased margin for better separation from intro paragraph */
}

.about-hirly-intro .section-intro-paragraph {
    font-size: var(--font-size-base);
    color: var(--text-body);
    max-width: 700px;
    margin: 0 auto var(--spacing-lg); /* Added bottom margin for separation from list */
    text-align: start; /* Universal alignment */
    line-height: 1.6;
}

.about-hirly-intro .styled-list {
    list-style: none;
    padding: 0;
    margin: 0 auto var(--spacing-lg);
    max-width: 700px;
    text-align: start; /* Universal alignment */
}

.about-hirly-intro .styled-list li {
    font-size: var(--font-size-base);
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: flex-start;
    line-height: 1.6;
    flex-direction: row; /* Default for LTR */
}

.about-hirly-intro .styled-list li i {
    color: var(--accent); /* Color for the checkmark icon */
    margin-inline-end: var(--spacing-sm); /* Universal margin: right in LTR, left in RTL */
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    padding-top: 2px;
}

.about-hirly-intro .section-outro-paragraph {
    font-size: var(--font-size-base);
    color: var(--text-body);
    max-width: 700px;
    margin: 0 auto 0;
    text-align: start; /* Universal alignment */
    line-height: 1.6;
}

/* No Results / Empty State for dynamic grids */
.empty-state {
    grid-column: 1 / -1; /* Span full width in grid */
    text-align: center;
    padding: 3rem;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin: 0 auto; /* Center the block */
    max-width: 600px; /* Limit width */
}

.empty-state.small-empty-state {
    padding: 1.5rem; /* Smaller padding */
    max-width: 400px; /* Smaller max-width */
}

.empty-state i {
    font-size: var(--font-size-xxxl);
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}
.empty-state.small-empty-state i {
    font-size: var(--font-size-xxl); /* Smaller icon for small empty state */
}

.empty-state p {
    color: var(--text-body);
    margin-bottom: var(--spacing-lg);
}
.empty-state.small-empty-state p {
    font-size: var(--font-size-sm); /* Smaller text for small empty state */
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    grid-column: 1 / -1; /* Span full width in grid */
    padding: 3rem;
}

.loading-spinner i {
    font-size: var(--font-size-xxxl);
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* NEW: Company Card Styles for the new section */
.company-card {
    border-radius: var(--border-radius-lg);
    padding: 1.5rem; /* Increased padding */
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    flex: 0 0 280px; /* Increased card width */
    width: 280px;
    min-width: 280px;
    height: 180px; /* Increased card height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    scroll-snap-align: start;

    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.5s ease-out forwards;
}

html[dir="rtl"] .company-card {
    direction: rtl !important;
    text-align: center !important;
}

.company-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.company-logo-container {
    width: 80px; /* Increased logo size */
    height: 80px; /* Increased logo size */
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-extra-light);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
    margin-bottom: 0.75rem; /* Increased margin */
    color: var(--primary);
    font-weight: 600;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    border: 3px solid transparent;
}

.company-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    background-color: transparent;
    border-radius: inherit;
}

.company-logo-container.pro-border {
    border-color: #C0C0C0;
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.5);
}

.company-logo-container.unlimited-border {
    border-color: #FF1493;
    box-shadow: 0 0 8px rgba(255, 20, 147, 0.5);
}

.company-name {
    font-size: var(--font-size-base); /* Increased font size */
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
    /* FIX: We will allow the text to wrap to multiple lines to prevent cut-off. */
    overflow: hidden;
    text-overflow: unset; /* Remove ellipsis for desktop */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    width: 100%;
    text-align: center;
    direction: rtl; /* Ensure proper RTL handling */
}

.company-category {
    font-size: var(--font-size-sm); /* Increased font size */
    color: var(--text-light);
    margin: 0;
    font-weight: 400;
}

.company-card.no-logo-card {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    text-decoration: none;
    cursor: default;
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.company-card.no-logo-card .company-logo-container {
    background-color: var(--primary-dark);
    color: var(--white);
    border: none;
}

.company-card.no-logo-card .company-name {
    color: var(--primary-dark);
}

.company-card.no-logo-card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
    cursor: default;
}

@media (max-width: 1024px) {
    /* Styles to allow horizontal scrolling on tablets and mobile */
    .companies-grid-scroll-wrapper {
        padding: 0 var(--spacing-md);
    }
    .company-card {
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
        height: 160px;
        padding: 1rem;
    }
    .company-logo-container {
        width: 70px;
        height: 70px;
    }
    .company-name {
        font-size: var(--font-size-base);
        /* 2-line ellipsis on mobile */
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limit to 2 lines */
        -webkit-box-orient: vertical;
    }
    .company-category {
        font-size: var(--font-size-sm);
    }
    
    /* NEW: Service card responsive styles */
    .services-grid-scroll-wrapper {
        padding: 0 var(--spacing-md);
    }
    .service-card-horizontal {
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
        height: 280px;
        padding: 1rem;
    }
    .service-card-horizontal .service-image-horizontal {
        font-size: var(--font-size-lg);
    }
    .service-card-horizontal h3 {
        font-size: var(--font-size-base);
    }
    .service-card-horizontal p {
        font-size: var(--font-size-sm);
    }
    
    /* NEW: Talent card responsive styles for mobile */
    .talent-grid-scroll-wrapper {
        padding: 0 var(--spacing-md);
    }
    .talent-card {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        height: 320px; /* Fixed height for consistency */
        min-height: 320px; /* Override the 400px min-height */
        padding: 1rem;
        box-sizing: border-box;
    }
    .talent-avatar-container {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-base);
    }
    .talent-name {
        font-size: var(--font-size-base);
        line-height: 1.3;
        /* Limit name to 2 lines */
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .talent-location-display {
        font-size: var(--font-size-xs);
    }
    .talent-rating {
        font-size: var(--font-size-xs);
    }
    
    /* CRITICAL FIX: Prevent skills container from expanding card height */
     .talent-skills-container {
         height: 3.8em !important; /* Slightly increased height to prevent cropping */
         max-height: 3.8em !important;
         overflow: hidden !important;
         display: flex !important;
         flex-wrap: wrap !important;
         align-content: flex-start !important; /* Align content to top */
     }
    
    .skill-tag {
        font-size: var(--font-size-xs);
        padding: 0.2rem 0.5rem;
        /* Limit skill tag text to prevent overflow */
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-bottom: 0.25rem; /* Small margin for wrapped tags */
    }
    .talent-actions .btn {
        padding: 0.6rem 0.8rem;
        font-size: var(--font-size-sm);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
@media (min-width: 1025px) {
    /* Set a standard card size for desktop to fit nicely on screen */
    .company-card {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        height: 200px; /* NEW: Increased height for longer names */
    }

    /* NEW: Service card desktop styles */
    .service-card-horizontal {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        height: 300px; 
    }
}

/* Styling for the new icon placeholder */
.service-card-horizontal .service-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-extra-light);
    color: var(--primary);
    border-radius: var(--border-radius-md);
}

.service-card-horizontal .service-icon-placeholder i {
    font-size: 3rem; 
}