/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
    background: var(--bg-secondary);
    color: var(--text-primary);
    position: relative;
    width: 100%;
    overflow: visible;
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.5s, color 0.5s, border-color 0.5s;
}

@media (min-width: 1024px) {
    .services {
        min-height: 100vh;
        display: flex;
        align-items: center;
        padding: 0;
    }
}

.services__bg-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.03;
    pointer-events: none;
    background-image: linear-gradient(currentColor 1px, transparent 1px), linear-gradient(90deg, currentColor 1px, transparent 1px);
    background-size: 30px 30px;
    transition: opacity 0.5s;
}

.dark .services__bg-grid {
    opacity: 0.05;
}

.services__bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: rgba(124, 179, 66, 0.1);
    filter: blur(150px);
    border-radius: 50%;
    pointer-events: none;
    display: none;
    transition: background 0.5s;
}

.dark .services__bg-glow {
    background: rgba(124, 179, 66, 0.05);
}

@media (min-width: 1024px) {
    .services__bg-glow {
        display: block;
    }
}

.services__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 1024px) {
    .services__inner {
        grid-template-columns: 5fr 7fr;
        gap: 2.5rem;
        max-height: 700px;
        height: 100%;
    }
}

/* Right panel (nav) */
.services__nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.services__title {
    font-size: 2.25rem;
    font-weight: 900;
    margin-bottom: 3rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
    .services__title {
        font-size: 3rem;
    }
}

.services__menu {
    display: none;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
    padding: 0.5rem 0;
    width: 100%;
    max-width: 400px;
}

@media (min-width: 1024px) {
    .services__menu {
        display: flex;
    }
}

.services__menu-line {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 9999px;
    transition: background 0.5s;
}

.dark .services__menu-line {
    background: rgba(255, 255, 255, 0.1);
}

.services__menu-item {
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 2rem;
    cursor: default;
    height: 1.5rem;
}

.services__menu-progress {
    position: absolute;
    right: -1px;
    top: -10px;
    bottom: -10px;
    width: 4px;
    background: var(--primary-orange);
    border-radius: 9999px;
    box-shadow: 0 0 15px rgba(124, 179, 66, 0.4);
    z-index: 10;
    transform-origin: top;
}

.dark .services__menu-progress {
    box-shadow: 0 0 15px rgba(124, 179, 66, 0.8);
}

.services__menu-text {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    width: 100%;
    white-space: nowrap;
}

.services__menu-number {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: monospace;
    opacity: 0.5;
    color: rgba(0, 0, 0, 0.4);
}

.dark .services__menu-number {
    color: rgba(255, 255, 255, 0.4);
}

.services__menu-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

/* Left panel (detail cards) */
.services__details {
    display: none;
    position: relative;
    height: 100%;
}

@media (min-width: 1024px) {
    .services__details {
        display: block;
    }
}

.services__details-inner {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    transform: translateY(6px);
}

.service-detail {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 40px;
    padding: 4.5rem 3.5rem 3.5rem;
    margin-top: 1.5rem;
    backdrop-filter: blur(32px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
    transition: background-color 0.5s, border-color 0.5s, transform 0.5s;
}

.service-detail::before {
    content: '';
    position: absolute;
    top: 0;
    right: 2.5rem;
    width: 8rem;
    height: 8rem;
    background: radial-gradient(circle at center top, rgba(124, 179, 66, 0.25), transparent 70%);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 0;
}

.dark .service-detail::before {
    background: radial-gradient(circle at center top, rgba(124, 179, 66, 0.15), transparent 70%);
}

.service-detail:hover::before,
.service-detail.is-active::before {
    background: radial-gradient(circle at center top, rgba(124, 179, 66, 0.4), transparent 70%);
    transform: scale(1.2);
}

.dark .service-detail {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.service-detail__watermark {
    color: rgba(0, 0, 0, 0.03);
    font-weight: 900;
    font-size: 11.25rem;
    position: absolute;
    left: 3rem;
    top: 2.5rem;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    transition: color 0.5s;
}

.dark .service-detail__watermark {
    color: rgba(255, 255, 255, 0.04);
}

/* ── Creative Integrated Icon Overlap ────────────────────── */
.service-detail__icon {
    position: absolute;
    top: -3rem;
    /* Breaks out of the card boundary */
    right: 3.5rem;
    /* Aligns with the right inner padding */
    width: 6.5rem;
    height: 6.5rem;
    margin: 0;
    z-index: 20;
    isolation: isolate;
}

/* Inner glass shell */
.service-detail__icon-bg {
    position: absolute;
    inset: 0;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    z-index: 2;
    overflow: hidden;
    transform: rotate(8deg);
    /* Creative structural tilt */
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dark .service-detail__icon-bg {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.service-detail:hover .service-detail__icon-bg,
.service-detail.is-active .service-detail__icon-bg {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.8));
    border-color: rgba(124, 179, 66, 0.4);
    box-shadow:
        0 25px 50px rgba(124, 179, 66, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: rotate(0deg) scale(1.05) translateY(-5px);
}

.dark .service-detail:hover .service-detail__icon-bg,
.dark .service-detail.is-active .service-detail__icon-bg {
    background: linear-gradient(135deg, rgba(124, 179, 66, 0.2), rgba(124, 179, 66, 0.05));
    border-color: rgba(124, 179, 66, 0.5);
    box-shadow:
        0 25px 50px rgba(124, 179, 66, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Subtle inner glow / gradient */
.service-detail__icon-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(124, 179, 66, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
}

.service-detail:hover .service-detail__icon-bg::before,
.service-detail.is-active .service-detail__icon-bg::before {
    opacity: 1;
}

.dark .service-detail__icon-bg::before {
    background: radial-gradient(circle at top left, rgba(124, 179, 66, 0.2), transparent 70%);
}

/* The actual SVG inside */
.service-detail__icon-bg svg {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 34px;
    height: 34px;
    stroke-width: 1.5;
    stroke: var(--primary-green);
    transform: rotate(-8deg);
    /* Counter-rotate so the icon is straight while the box is tilted */
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 3;
}

.dark .service-detail__icon-bg svg {
    stroke: #fff;
}

.service-detail:hover .service-detail__icon-bg svg {
    transform: rotate(0deg) scale(1.1);
    stroke: var(--primary-orange);
}

.dark .service-detail:hover .service-detail__icon-bg svg {
    stroke: var(--primary-green);
}

/* Floating service number badge */
.service-detail__icon-num {
    position: absolute;
    top: -10px;
    left: -15px;
    /* Floats creatively off the left edge */
    right: auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--primary-green);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 8px 15px rgba(124, 179, 66, 0.4);
    border: 2px solid var(--bg-secondary, #fff);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dark .service-detail__icon-num {
    border-color: rgba(20, 30, 15, 1);
}

.service-detail:hover .service-detail__icon-num {
    transform: translate(-5px, -10px) scale(1.1);
    background: var(--primary-orange);
    box-shadow: 0 10px 25px rgba(245, 124, 0, 0.4);
}

/* Inline SVG gradient definition (hidden) */
.icon-gradient-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}


.service-detail__title {
    font-size: 2.25rem;
    font-weight: 900;
    margin-bottom: 2rem;
    line-height: 1.2;
    position: relative;
    z-index: 10;
}

@media (min-width: 1024px) {
    .service-detail__title {
        font-size: 3rem;
    }
}

.service-detail__desc {
    color: rgba(0, 0, 0, 0.7);
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    font-weight: 500;
    position: relative;
    z-index: 10;
    max-width: 36rem;
    transition: color 0.5s;
}

.dark .service-detail__desc {
    color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 1024px) {
    .service-detail__desc {
        font-size: 1.875rem;
    }
}

.service-detail__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.3s;
    width: fit-content;
    position: relative;
    z-index: 10;
}

.dark .service-detail__btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.service-detail__btn:hover {
    border-color: rgba(124, 179, 66, 0.5);
}

.service-detail__btn svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s;
}

.service-detail__btn:hover svg {
    transform: translate(2px, -2px);
    color: var(--primary-orange);
}

/* Mobile cards */
.services__mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 1024px) {
    .services__mobile {
        display: none;
    }
}

.mobile-service-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 30px;
    padding: 3.5rem 2rem 2rem;
    margin-top: 1.5rem;
    backdrop-filter: blur(4px);
    position: relative;
    overflow: visible;
    transition: all 0.5s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mobile-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 1.5rem;
    width: 5rem;
    height: 5rem;
    background: radial-gradient(circle at center top, rgba(124, 179, 66, 0.25), transparent 70%);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 0;
}

.dark .mobile-service-card::before {
    background: radial-gradient(circle at center top, rgba(124, 179, 66, 0.15), transparent 70%);
}

.mobile-service-card:hover::before {
    background: radial-gradient(circle at center top, rgba(124, 179, 66, 0.4), transparent 70%);
    transform: scale(1.2);
}

.dark .mobile-service-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.mobile-service-card:hover {
    border-color: rgba(124, 179, 66, 0.3);
}

.mobile-service-card__watermark {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: rgba(0, 0, 0, 0.05);
    font-weight: 900;
    font-size: 3.75rem;
    pointer-events: none;
    transition: color 0.5s;
}

.dark .mobile-service-card__watermark {
    color: rgba(255, 255, 255, 0.05);
}

/* ── Mobile Icon (Integrated Overlap) ── */
.mobile-service-card__icon {
    position: absolute;
    top: -2rem;
    right: 1.5rem;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    z-index: 10;
    transform: rotate(8deg);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dark .mobile-service-card__icon {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mobile-service-card:hover .mobile-service-card__icon {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.8));
    border-color: rgba(124, 179, 66, 0.4);
    box-shadow: 0 15px 35px rgba(124, 179, 66, 0.2), inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-4px) rotate(0deg) scale(1.05);
}

.dark .mobile-service-card:hover .mobile-service-card__icon {
    background: linear-gradient(135deg, rgba(124, 179, 66, 0.2), rgba(124, 179, 66, 0.05));
    border-color: rgba(124, 179, 66, 0.5);
    box-shadow: 0 15px 35px rgba(124, 179, 66, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Subtle inner glow */
.mobile-service-card__icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(124, 179, 66, 0.15), transparent 70%);
    opacity: 0;
    border-radius: inherit;
    transition: opacity 0.4s;
    pointer-events: none;
}

.mobile-service-card:hover .mobile-service-card__icon::before {
    opacity: 1;
}

.dark .mobile-service-card__icon::before {
    background: radial-gradient(circle at top left, rgba(124, 179, 66, 0.2), transparent 70%);
}

.mobile-service-card__icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--primary-green);
    stroke-width: 1.5;
    position: relative;
    z-index: 1;
    transform: rotate(-8deg);
    /* Counter tilt */
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dark .mobile-service-card__icon svg {
    stroke: #fff;
}

.mobile-service-card:hover .mobile-service-card__icon svg {
    transform: rotate(0deg) scale(1.1);
    stroke: var(--primary-orange);
}

.dark .mobile-service-card:hover .mobile-service-card__icon svg {
    stroke: var(--primary-green);
}


.mobile-service-card__title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.mobile-service-card__desc {
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-weight: 500;
    transition: color 0.5s;
}

.dark .mobile-service-card__desc {
    color: rgba(255, 255, 255, 0.6);
}

.mobile-service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-orange);
    font-weight: 700;
    transition: gap 0.3s;
    width: fit-content;
}

.mobile-service-card__link:hover {
    gap: 1rem;
}

@media (max-width: 480px) {
    .mobile-service-card {
        padding: 1.5rem;
    }

    .mobile-service-card__watermark {
        font-size: 2.5rem;
        top: 0.5rem;
        left: 0.5rem;
    }

    [dir="ltr"] .mobile-service-card__watermark {
        left: auto;
        right: 0.5rem;
    }
}

.mobile-service-card__link svg {
    width: 18px;
    height: 18px;
}