/*
Theme Name: BESOIN.MA
Theme URI: https://besoin.ma
Author: BESOIN Team
Description: Marketplace moderne pour services, jobs et business au Maroc
Version: 1.0.0
Text Domain: besoin
*/

:root {
    --besoin-orange: #d56022;
    --besoin-orange-dark: #b94811;
    --besoin-orange-soft: #f3dfd2;

    --besoin-blue: #738bb9;
    --besoin-blue-soft: #748cba;
    --besoin-blue-dark: #172358;

    --besoin-brown: #894928;
    --besoin-white: #ffffff;
    --besoin-surface: #f5f8ff;
    --besoin-border: #d9e2f2;
    --besoin-text: #132041;
    --besoin-muted: #56627e;

    --radius-lg: 18px;
    --radius-md: 12px;
    --section-padding: 88px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--besoin-text);
    background: var(--besoin-white);
    line-height: 1.6;
}

a {
    color: inherit;
}

.section-title {
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--besoin-blue-dark);
}

/* Header */
.besoin-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(9px);
    border-bottom: 1px solid rgba(115, 139, 185, 0.2);
    box-shadow: 0 8px 26px rgba(23, 35, 88, 0.08);
}

.besoin-navbar {
    padding: 11px 0;
}

.besoin-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.besoin-logo {
    flex-shrink: 0;
}

.besoin-logo .logo-img {
    width: auto;
    height: clamp(56px, 4.8vw, 72px);
    display: block;
    object-fit: contain;
}

.besoin-nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.besoin-nav-links a {
    text-decoration: none;
    color: var(--besoin-blue-dark);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.besoin-nav-links a:hover {
    color: var(--besoin-orange-dark);
}

.besoin-search-wrapper {
    flex: 1;
    min-width: 320px;
    max-width: 690px;
}

.besoin-search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 5px 5px 5px 8px;
    border-radius: 999px;
    border: 1.5px solid var(--besoin-border);
    background: var(--besoin-white);
    box-shadow: 0 4px 15px rgba(115, 139, 185, 0.14);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.besoin-search-bar:focus-within {
    border-color: var(--besoin-orange);
    box-shadow: 0 8px 20px rgba(213, 96, 34, 0.2);
}

.besoin-drop-btn {
    border: 0;
    outline: 0;
    background: transparent;
    border-radius: 999px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--besoin-blue-dark);
    font-size: 13px;
    font-weight: 700;
}

.besoin-drop-btn:hover {
    background: #f2f6ff;
}

.drop-label {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.besoin-divider {
    width: 1px;
    height: 24px;
    background: var(--besoin-border);
}

.besoin-input {
    flex: 1;
    border: 0;
    outline: 0;
    min-width: 0;
    background: transparent;
    padding: 8px 14px;
    color: var(--besoin-text);
    font-size: 14px;
    font-weight: 500;
}

.besoin-input::placeholder {
    color: #8f9ab3;
}

.besoin-dropdown-menu {
    border: 1px solid #e5ebf8;
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(23, 35, 88, 0.15);
    padding: 8px;
}

.besoin-dropdown-menu .dropdown-item {
    font-size: 14px;
    font-weight: 600;
    color: var(--besoin-blue-dark);
    border-radius: 10px;
    padding: 9px 12px;
}

.besoin-dropdown-menu .dropdown-item:hover {
    color: var(--besoin-orange-dark);
    background: #fff3ec;
}

.besoin-search-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--besoin-orange), var(--besoin-orange-dark));
    box-shadow: 0 8px 18px rgba(213, 96, 34, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.besoin-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(213, 96, 34, 0.37);
}

.besoin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.besoin-action-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 13px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-sign-in {
    color: var(--besoin-blue-dark);
    border-color: rgba(23, 35, 88, 0.3);
    background: #fff;
}

.btn-sign-in:hover {
    color: #fff;
    background: var(--besoin-blue-dark);
    border-color: var(--besoin-blue-dark);
}

.btn-add-business,
.btn-deal-list {
    color: #fff;
    background: linear-gradient(135deg, var(--besoin-blue), var(--besoin-blue-dark));
}

.btn-add-business:hover,
.btn-deal-list:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(23, 35, 88, 0.26);
}

/* Hero */
.hero-section {
    position: relative;
    min-height: 72vh;
    padding: 86px 0 62px;
    background:
        radial-gradient(circle at 80% 20%, rgba(115, 139, 185, 0.2), transparent 45%),
        radial-gradient(circle at 20% 90%, rgba(213, 96, 34, 0.16), transparent 45%),
        linear-gradient(125deg, #ffffff 0%, #eef3ff 58%, #ffffff 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    margin-bottom: 18px;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-size: clamp(2.2rem, 4.8vw, 5rem);
    line-height: 1.03;
    color: var(--besoin-blue-dark);
}

.highlight-orange {
    color: var(--besoin-orange);
}

.highlight-blue {
    color: #284b93;
}

.hero-subtitle {
    margin-bottom: 28px;
    max-width: 640px;
    color: var(--besoin-muted);
    font-size: 1.45rem;
    line-height: 1.48;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 13px 26px;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, var(--besoin-orange), var(--besoin-orange-dark)) !important;
    box-shadow: 0 10px 22px rgba(213, 96, 34, 0.35);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(213, 96, 34, 0.4);
}

.btn-outline-orange {
    color: var(--besoin-orange-dark);
    border: 2px solid rgba(213, 96, 34, 0.85);
    background: transparent;
}

.btn-outline-orange:hover {
    color: #fff;
    background: var(--besoin-orange);
}

.btn-outline-primary {
    border: 2px solid rgba(23, 35, 88, 0.7);
    color: var(--besoin-blue-dark);
    background: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background: var(--besoin-blue-dark);
    border-color: var(--besoin-blue-dark);
}

.hero-stats {
    margin-top: 34px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    min-width: 110px;
}

.stat-number {
    display: block;
    margin-bottom: 3px;
    color: var(--besoin-orange-dark);
    font-size: clamp(1.9rem, 2.6vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.stat-label {
    color: var(--besoin-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.hero-visual {
    position: relative;
    min-height: 430px;
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(116, 140, 186, 0.28), rgba(255, 255, 255, 0.85));
    border: 1px solid rgba(116, 140, 186, 0.35);
    box-shadow: 0 22px 44px rgba(23, 35, 88, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.hero-visual img {
    width: 100%;
    max-width: 520px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 18px 36px rgba(23, 35, 88, 0.22);
}

/* Override specifically for the floating screen images inside the hero
   Prevent the generic .hero-visual img rule from stretching them */
.hero-visual img.hero-screen,
.hero-visual .hero-screen {
    width: auto;
    max-width: none;
    height: auto;
    object-fit: contain;
}

.hero-floating-card {
    position: absolute;
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 16px 28px rgba(23, 35, 88, 0.16);
    border: 1px solid rgba(115, 139, 185, 0.25);
    min-width: 210px;
    animation: floating 3.3s ease-in-out infinite;
}

.hero-floating-card small {
    font-size: 13px;
}

.hero-floating-card-left {
    left: -18px;
    top: 10%;
}

.hero-floating-card-right {
    right: -18px;
    bottom: 12%;
    animation-delay: 0.8s;
}

@keyframes floating {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Categories */
.categories-section {
    padding: var(--section-padding) 0;
    background: var(--besoin-white);
}

.category-card {
    height: 100%;
    border: 1px solid var(--besoin-border);
    border-radius: var(--radius-lg);
    padding: 26px 18px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 8px 20px rgba(115, 139, 185, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-7px);
    border-color: rgba(213, 96, 34, 0.42);
    box-shadow: 0 20px 34px rgba(23, 35, 88, 0.16);
}

.category-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
}

.category-card h3 {
    margin: 0 0 6px;
    color: var(--besoin-blue-dark);
    font-size: 1.2rem;
    font-weight: 800;
}

.category-card p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--besoin-muted);
    font-weight: 600;
}

/* Listings */
.listings-section {
    padding: var(--section-padding) 0;
    background: linear-gradient(180deg, #f4f8ff 0%, #ffffff 100%);
}

.listing-card {
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce5f6;
    box-shadow: 0 10px 22px rgba(23, 35, 88, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.listing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 34px rgba(23, 35, 88, 0.18);
}

.listing-image {
    height: 196px;
    position: relative;
    background: #eef3ff;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--besoin-orange), var(--besoin-orange-dark));
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
}

.listing-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    background: #fff;
    color: var(--besoin-blue-dark);
    box-shadow: 0 6px 14px rgba(23, 35, 88, 0.15);
}

.listing-content {
    padding: 16px;
}

.listing-category {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--besoin-blue-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.listing-title {
    margin: 0 0 8px;
    font-size: 1.06rem;
    line-height: 1.35;
    font-weight: 800;
    color: var(--besoin-text);
}

.listing-location {
    margin: 0 0 10px;
    color: var(--besoin-muted);
    font-size: 14px;
}

.listing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #e5ecfa;
    padding-top: 10px;
}

.listing-price {
    color: var(--besoin-brown);
    font-weight: 800;
    font-size: 1rem;
}

.listing-rating {
    color: #d79a35;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
}

/* Process */
.how-it-works {
    position: relative;
    overflow: hidden;
    padding: var(--section-padding) 0;
    background: linear-gradient(140deg, #172358 0%, #263a7f 60%, #738bb9 100%);
    color: #fff;
}

.how-it-works::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 38%);
}

.step-card {
    position: relative;
    z-index: 1;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    padding: 28px 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(4px);
}

.step-number {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    color: #fff;
    background: linear-gradient(135deg, var(--besoin-orange), var(--besoin-brown));
    box-shadow: 0 8px 18px rgba(137, 73, 40, 0.45);
}

.step-card h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 800;
}

.step-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

/* CTA */
.cta-section {
    position: relative;
    overflow: hidden;
    padding: var(--section-padding) 0;
    background: linear-gradient(125deg, #cf5718 0%, #e37231 45%, #a14417 100%);
}

.cta-section::before {
    content: "";
    position: absolute;
    right: -180px;
    top: -160px;
    width: 480px;
    height: 480px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.cta-content h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cta-content p {
    margin: 0 auto 26px;
    max-width: 740px;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.92);
}

.btn-white {
    background: #fff;
    color: var(--besoin-orange-dark);
}

.btn-white:hover {
    background: var(--besoin-blue-dark);
    color: #fff;
}

/* Trust strip */
.trust-strip {
    background: #ffffff;
    border-top: 1px solid #ecf1fb;
    border-bottom: 1px solid #ecf1fb;
}

.trust-item {
    color: var(--besoin-blue-dark);
}

.trust-item i {
    color: var(--besoin-orange-dark);
}

/* Footer */
.main-footer {
    background: linear-gradient(180deg, #111d49, #0a1335);
    color: #fff;
    padding: 68px 0 0;
}

.footer-brand {
    font-size: 2rem;
    font-weight: 800;
}

.footer-brand span {
    color: var(--besoin-orange);
}

.footer-desc {
    color: rgba(255, 255, 255, 0.75);
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: var(--besoin-orange);
}

.footer-title {
    margin-bottom: 14px;
    font-size: 1.05rem;
    font-weight: 800;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.74);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 34px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding: 16px 0 22px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
}

/* Utility */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.skeleton {
    background: linear-gradient(90deg, #e9effb 25%, #dbe5f7 50%, #e9effb 75%);
    background-size: 200% 100%;
    animation: loading 1.4s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive */
@media (max-width: 1399px) {
    .besoin-nav-links {
        display: none;
    }
}

@media (max-width: 1199px) {
    .besoin-container {
        gap: 12px;
    }

    .besoin-search-wrapper {
        max-width: 560px;
    }

    .besoin-action-btn span {
        display: none;
    }

    .hero-subtitle {
        font-size: 1.16rem;
    }

    .hero-visual {
        min-height: 360px;
    }
}

@media (max-width: 991px) {
    .besoin-container {
        flex-wrap: wrap;
    }

    .besoin-search-wrapper {
        order: 3;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .besoin-search-bar {
        border-radius: 14px;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }

    .besoin-divider {
        display: none;
    }

    .besoin-drop-btn {
        border: 1px solid var(--besoin-border);
        border-radius: 10px;
    }

    .besoin-input,
    .besoin-search-btn {
        width: 100%;
        border-radius: 10px;
    }

    .besoin-input {
        border: 1px solid var(--besoin-border);
    }

    .besoin-actions {
        width: 100%;
        justify-content: center;
    }

    .besoin-action-btn span {
        display: inline;
    }

    .hero-section {
        min-height: auto;
        padding: 64px 0 48px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 28px;
    }

    .hero-floating-card-left {
        left: 8px;
    }

    .hero-floating-card-right {
        right: 8px;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .besoin-logo .logo-img {
        height: 56px;
    }

    .hero-title {
        font-size: 2.05rem;
    }

    .hero-subtitle {
        font-size: 1.02rem;
    }

    .hero-visual {
        min-height: 280px;
        padding: 14px;
    }

    .hero-floating-card {
        position: static;
        margin: 12px 0 0;
        animation: none;
    }

    .category-card {
        padding: 18px 14px;
    }

    .cta-content p {
        font-size: 1rem;
    }
}

@media (max-width: 575px) {
    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-ctas {
        width: 100%;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat-item {
        min-width: 92px;
    }

    .section-title {
        font-size: 1.75rem;
    }
}
