/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #313886;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #1e2433;
    color: #aab4ff;
}

body.dark-mode .header {
    background: #2a2f3e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.dark-mode .search-card {
    background: #2a2f3e;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

body.dark-mode .search-input {
    background: #3a3e50;
    border-color: #717b96;
    color: #f1f5f9;
}

body.dark-mode .search-input:focus {
    border-color: #aab4ff;
    box-shadow: 0 0 0 3px rgba(170, 180, 255, 0.25);
    color: #f1f5f9;
}

body.dark-mode .search-input::placeholder {
    color: #b7c1ff;
}

body.dark-mode .dark-mode-icon {
    stroke: #aab4ff;
}

body.dark-mode .service-card {
    background: #2a2f3e;
}

body.dark-mode .app-features {
    background: #2a2f3e;
}

body.dark-mode .services-section {
    background: #1e2433;
}

body.dark-mode .carousel-nav-btn {
    background: #2a2f3e;
    border-color: #3a4553;
    color: #cbd5e1;
}

body.dark-mode .carousel-nav-btn:hover {
    background: #374151;
    border-color: #4b5563;
    color: #f1f5f9;
}

body.dark-mode .how-it-works {
    background: #1e2433;
}

body.dark-mode .hire-section-bg {
    background: #2a2f3e;
}

body.dark-mode .step-description {
    color: #aab4ff;
}

body.dark-mode .steps-button {
    background: #7e8bb4 !important;
}

body.dark-mode .steps-button:hover {
    background: #aab4ff !important;
}

body.dark-mode .steps-title-2,
body.dark-mode .post-project-text,
body.dark-mode h1 {
    color: #7e8bb4;
}

body.dark-mode .search-btn {
    background: #717b96;
}

body.dark-mode .search-btn:hover {
    background: #7e8bb4;
}

body.dark-mode .post-project-btn {
    background: #717b96;
}

body.dark-mode .post-project-btn:hover {
    background: #7e8bb4;
}

body.dark-mode .step-icon.has-image {
    border-image: linear-gradient(135deg, #7e8bb4, #aab4ff) 1;
}

body.dark-mode .or-divider::before {
    background: #7e8bb4;
}

body.dark-mode .section-divider::before {
    background: #3a3e50;
}

body.dark-mode .section-divider::before {
    background: #3a3e50;
}

body.dark-mode .footer {
    background: #1e2433;
    color: #aab4ff;
}

body.dark-mode .footer-links a {
    color: #aab4ff;
}

.header {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    margin: 0 auto;
    padding: 0 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-group-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-group-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 70px;
    width: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #5b6bb9;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #313886;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile a {
    text-decoration: none;
    transition: transform 0.2s ease-in-out;
}

.user-profile a:hover {
    transform: scale(1.1);
}

.language-selector {
    background: #d6deff;
    border: 2px solid #313886;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #313886;
    cursor: pointer;
    margin-right: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.language-selector:hover {
    background: #aab4ff;
    border-color: #7e8bb4;
}

.language-selector:focus {
    box-shadow: 0 0 0 3px rgba(49, 56, 134, 0.2);
}

body.dark-mode .language-selector {
    background: #3a3e50;
    border-color: #717b96;
    color: #aab4ff;
}

body.dark-mode .language-selector:hover {
    background: #4a4e60;
    border-color: #aab4ff;
}

.dark-mode-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dark-mode-btn:hover {
    background: rgba(49, 56, 134, 0.1);
    transform: scale(1.1);
}

.dark-mode-icon {
    color: #313886;
    width: 24px;
    height: 24px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: #d6deff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section {
    background: linear-gradient(135deg, #f7f9fd 0%, #ffffff 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

.hero-background-carousel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

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

/* Fallback background colors if images don't load */
.hero-bg-slide:nth-child(1) {
    background-color: #f7f9fd;
}

.hero-bg-slide:nth-child(2) {
    background-color: #fff8e1;
}

.hero-bg-slide:nth-child(3) {
    background-color: #e8f5e8;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-card {
    background: rgba(255, 255, 255, 0.85);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 100%;
}

.looking-for-text {
    color: #7e8bb4;
    font-weight: 200;
    text-align: left;
    margin-bottom: 0rem;
    margin-top: 0rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-input {
    padding: 1rem;
    border: 1px solid #d6deff;
    border-radius: 10px;
    font-size: 0.8rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: border-color 0.3s;
    color: #313886; /* Ensure text color remains consistent when not focused */
    flex: 1;
}

.search-input:focus {    
    outline: none;
    border-color: #313886;
    box-shadow: 0 0 0 3px rgba(49, 56, 134, 0.2);
    color: #313886;
}

.search-input.postal-code {
    flex: 1; 
}

.search-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-btn {
    background: #313886;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #4b85d2;
}

.or-divider {
    text-align: center;
    margin: 1rem 0;
    position: relative;
    width: 100%;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #313886;
}

.or-divider span {
    background: transparent;
    padding: 0 1rem;
    color: #5b6bb9;
}

.section-divider::before {
    background: #d6deff;
}

.post-project-text {
    color: #313886;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

.post-project-btn {
    background: #313886;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.post-project-btn:hover {
    background: #4b85d2;
}

.services-section {
    padding: 2rem 0;
    background: white;
    overflow: hidden;
}

.services-carousel-container {
    position: relative;
    margin-top: 1rem;
    width: 100%;
    overflow: hidden;
}

.services-carousel-inner {
    display: flex;
    width: max-content;
    animation: carousel-slide 80s linear infinite;
    -webkit-animation: carousel-slide 80s linear infinite;
}

.services-carousel-inner:hover {
    animation-play-state: paused;
}

.carousel-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.carousel-nav-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-nav-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.carousel-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.carousel-nav-btn svg {
    width: 20px;
    height: 20px;
}

.service-card {
    background: #eff3ff;
    padding: 1rem 1rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 240px;
    flex-shrink: 0;
    height: 220px;
    position: relative;
    overflow: hidden;
    margin-right: 1rem;
}

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

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: none;
    box-shadow: none;
    background: #f7f9fd;
}

/* --- Card Flip Styles --- */
.service-card {
    perspective: 1000px; /* Adds 3D perspective */
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.service-card-inner.is-flipped {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.service-card-back {
    background-color: #5b6bb9;
    color: white;
    transform: rotateY(180deg);
    padding: 0.1rem 0.2rem;
}

.service-card-back h4 {
    margin-top: 0; /* Removes the top margin to make the content area taller */
    margin-bottom: 0.5rem; /* Adds a bit of space below the title */
    line-height: 1.2; /* Adjusts the space between lines of the title */
}

.service-card-back p {
    font-size: 0.9rem;
    color: #d6deff;
}

/* Keyframes for the continuous carousel animation */
@keyframes carousel-slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-1 * (12 * 180px + 12 * 2rem)));
    }
}

@media (max-width: 768px) {
    .services-carousel-inner {
        animation-duration: 80s;
    }
    
    .service-card {
        min-width: 170px; /* Increase width for more space */
        height: 220px; /* Increase height for more space */
    }

    .service-card h3 {
        font-size: 1rem; /* Adjust font size for smaller cards */
    }
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7e8bb4;
    font-size: 2rem;
}

.service-card h3 {
    color: #7e8bb4;
    font-weight: 600;
    font-size: 1.2rem;
}

.app-section {
    padding: 4rem 0;
}

.app-content {
    display: flex; 
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.job-professional-content {
    flex: 1;
    padding: 2.5rem;
    border-radius: 15px;
    min-width: 300px;
}

.app-text {
    text-align: left;
    max-width: 200px;
    padding: 2rem;
}

.app-text h2 {
    font-size: 2.5rem;
    color: #313886;
    margin-bottom: 2rem;
}

.app-features {
    background: transparent;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.app-store-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.app-store-button img {
    height: 50px;
    width: auto;
    transition: transform 0.2s ease-in-out;
}

.app-store-button img:hover {
    transform: scale(1.05);
}

.store-btn {
    background: #16c8dd;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.store-btn:hover {
    background: #6fb6e6;
}

.store-btn.apple {
    background: #4b85d2;
}

.store-btn.apple:hover {
    background: #313886;
}

.phone-mockup {
    background-image: url('assets/images/home_mockup_a.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    max-width: 400px;
    height: 600px;
    flex-shrink: 0;
    width: 100%;
}

.how-it-works {
    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-left: 0;
    padding-right: 0;
    background: #ffffff;
}

.hire-section-bg {
    background: #eff3ff;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #313886;
    margin-bottom: 3rem;
}

.steps-container {
    margin-bottom: 1rem;
    margin-left: 15%;
    margin-right: 15%;
}

.steps-title {
    text-align: center;
    font-size: 2rem;
    color: #16c8dd;
    margin-bottom: 3rem;
}

.steps-title-2 {
    text-align: center;
    font-size: 2rem;
    color: #313886;
    margin-bottom: 3rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.step-card:hover .step-description {
    opacity: 1;
    /* transform: translateY(0); */
    transform: scale(1.02);
}

.step-description {
    color: #5b6bb9;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 400;
    /* position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: translateY(10px); */
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    line-height: 1.4;

}

.step-label {
    font-size: 14px;
    color: #5b6bb9;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-icon {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.step-icon img {
    width: 200px;
    height: 200px;
    object-fit: cover;
}

/* Circular images for "Need to hire a professional?" section */
#hireSection .step-icon img {
    border-radius: 20px;
    object-fit: cover;
    border: 1px solid #5b6bb9; /* This adds a 4px solid blue border */
}

/* Circular images for "Want to grow your business and get more clients?" section */
#growBusinessSection .step-icon img {
    border-radius: 20px;
    object-fit: cover;
    border: 1px solid #16c8dd; /* This adds a 4px solid teal border */
}

.step-icon.has-image {
    background: transparent;
    border: 3px solid;
    border-image: linear-gradient(135deg, #313886, #16c8dd) 1;
}

.step-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #5b6bb9;
    margin-bottom: 0.5rem;
}

.steps-button-container {
    text-align: center;
    margin-top: 4rem;
}

.steps-button {
    background: #313886;
    color: white;
    padding: 1rem 1rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: auto;
    min-width: 300px;
    max-width: 300px;
    transition: background 0.3s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

.steps-button:hover {
    background: #4b85d2;
    transform: translateY(-2px);
}

.create-profile-btn {
    background: #16c8dd;
}

.create-profile-btn:hover {
    background: #4b85d2;
}

/* FAQ Section Styles */
.faq-section {
    padding: 4rem 0;
    background: #eff3ff;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #313886;
    margin-bottom: 3rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.faq-question {
    width: 100%;
    background: white;
    border: none;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #313886;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f7f9fd;
}

.faq-question span {
    flex: 1;
    padding-right: 1rem;
}

.faq-icon {
    flex-shrink: 0;
    color: #5b6bb9;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

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

.faq-answer.active {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-answer p {
    color: #5b6bb9;
    line-height: 1.6;
    margin: 0;
}

/* Dark mode FAQ styles */
body.dark-mode .faq-section {
    background: #2a2f3e;
}

body.dark-mode .faq-section h2 {
    color: #aab4ff;
}

body.dark-mode .faq-item {
    background: #2a2f3e;
}

body.dark-mode .faq-question {
    background: #2a2f3e;
    color: #aab4ff;
}

body.dark-mode .faq-question:hover {
    background: #3a3e50;
}

body.dark-mode .faq-answer p {
    color: #b7c1ff;
}

body.dark-mode .faq-icon {
    color: #7e8bb4;
}

.footer {
    background: #313886;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* --- MEDIA QUERIES FOR RESPONSIVENESS --- */
@media (max-width: 768px) {
    .app-content {
        flex-direction: column;
        gap: 2rem;
    }

    .job-professional-content {
        background-color: transparent;
        color: inherit;
        padding: 1.5rem;
    }
    
    .job-professional-content h2 {
        color: inherit;
        text-align: left;
    }
    
    .job-professional-content h3 {
        color: inherit;
        text-align: center;
    }

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

    .phone-mockup {
        height: 300px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .nav {
        padding: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem; /* Space between the rows */
    }
    
    .nav-group-left, .nav-group-right {
        flex-grow: 1;
        justify-content: center;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .nav-group-right {
        order: 2; /* Move the right group (icons) below the logo */
    }
    
    .search-card {
        padding: 1.5rem;
    }
    
    .hero-section {
        padding: 2rem 0;
        min-height: 500px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        margin-left: 0;
        margin-right: 0;
    }

    .steps-button {
        min-width: 280px; /* Adjust min-width for smaller screens */
        width: 90%; /* Allow button to be responsive */
    }
}