﻿/* ================================================
   AGENCIES SHOWCASE - SLIDER & MODAL STYLES
   ================================================ */

.page {
    position: relative;
    background: transparent;
}

.page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 12% 22%, rgba(0, 123, 255, 0.09), transparent 36%),
        radial-gradient(circle at 88% 14%, rgba(77, 171, 247, 0.07), transparent 38%),
        radial-gradient(circle at 50% 85%, rgba(10, 17, 40, 0.2), transparent 46%);
}

.page > * {
    position: relative;
    z-index: 1;
}

/* Hero background tuned to match index visual language */
.hero-agencies-section {
    min-height: 90vh;
    padding: 5rem 0;
    background: transparent;
    border-bottom-right-radius: 15vw;
    overflow: hidden;
    position: relative;
}

.hero-agencies-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 28%, rgba(77, 171, 247, 0.1), transparent 45%),
        radial-gradient(circle at 82% 18%, rgba(10, 17, 40, 0.3), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.hero-agencies-section::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.18) 0%, rgba(5, 5, 5, 0.56) 100%);
}

/* Agencies Swiper Container */
.agencies-hero-copy {
    max-width: 860px;
    margin-inline: auto;
}

.agencies-hero-title {
    font-size: clamp(2.3rem, 5.2vw, 4.1rem);
    color: #ffffff;
    margin-bottom: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
}

.agencies-hero-title .word-span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: agenciesFadeInUp 0.8s ease-out forwards;
}

@keyframes agenciesFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.agencies-hero-subtitle {
    color: #ffffff !important;
    font-size: clamp(1.05rem, 1.9vw, 1.35rem);
    max-width: 760px;
    margin: 0 auto 0.85rem;
    line-height: 1.85;
}

.agencies-hero-hint {
    color: #cfe7ff;
    font-size: 1rem;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
}

.agencies-swiper {
    padding: 2rem 0 3rem;
    overflow: visible !important;
    margin: 0 80px;
}

@media (max-width: 992px) {
    .agencies-swiper {
        margin: 0 40px;
    }
}

@media (max-width: 768px) {
    .agencies-swiper {
        margin: 0;
    }
}

.agencies-swiper .swiper-slide {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.agencies-swiper .swiper-slide:hover {
    z-index: 20;
}

/* Agency Logo Cards */
.agency-logo-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.25rem 1.75rem;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 220px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.agency-logo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.agency-logo-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: #233b76;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 1;
}

.agency-logo-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(77, 171, 247, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 10;
    position: relative;
}

.agency-logo-card:hover::before {
    opacity: 1;
}

.agency-logo-card img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 2;
}

.agency-logo-card:hover img {
    transform: scale(1.05);
}

.agency-tagline {
    color: #e0e0e0;
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0;
    text-align: center;
    line-height: 1.4;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

.agency-logo-card:hover .agency-tagline {
    color: rgba(255, 255, 255, 0.9);
}


/* Swiper Navigation Buttons */
.agencies-swiper .swiper-button-next,
.agencies-swiper .swiper-button-prev {
    color: #ffffff;
    background: rgba(74, 171, 247, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.agencies-swiper .swiper-button-next {
    right: -60px;
}

.agencies-swiper .swiper-button-prev {
    left: -60px;
}

.agencies-swiper .swiper-button-next:after,
.agencies-swiper .swiper-button-prev:after {
    font-size: 20px;
}

.agencies-swiper .swiper-button-next:hover,
.agencies-swiper .swiper-button-prev:hover {
    background: rgba(74, 171, 247, 0.4);
    transform: scale(1.1);
}

/* Swiper Pagination */
.agencies-swiper .swiper-pagination {
    position: relative;
    margin-top: 2rem;
}

.agencies-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    transition: all 0.3s ease;
}

.agencies-swiper .swiper-pagination-bullet-active {
    background: #4dabf7;
    width: 30px;
    border-radius: 6px;
}

/* ================================================
   AGENCY MODAL STYLES
   ================================================ */

.agency-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.agency-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.4s ease;
}

.modal-content-wrapper {
    position: relative;
    width: 90%;
    max-width: 1400px;
    height: 85vh;
    max-height: 800px;
    z-index: 10;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 30px;
    overflow: hidden;
}

.modal-content {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    background: rgba(8, 14, 28, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45);
    padding: 0;
}

/* Image Side Styles */
.modal-image-side {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #000;
}

.modal-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.modal-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Gradient Overlay on Image Side */
.modal-image-side::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, rgba(35, 59, 118, 0.45) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* Text Side Styles */
.modal-text-side {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.modal-text-container {
    padding: 4rem 3rem;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

/* Custom Scrollbar for Text Side */
.modal-text-side::-webkit-scrollbar {
    width: 6px;
}

.modal-text-side::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-text-side::-webkit-scrollbar-thumb {
    background: rgba(74, 171, 247, 0.5);
    border-radius: 10px;
}

.modal-close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-close-btn svg {
    color: #ffffff;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-title {
    color: #ffffff;
    font-size: clamp(2rem, 3.2vw, 2.7rem);
    font-weight: bold;
    margin-bottom: 1rem;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    animation: fadeInRight 0.6s ease 0.3s both;
    line-height: 1.25;
}

.modal-description {
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.08rem;
    line-height: 1.85;
    margin-bottom: 2rem;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    animation: fadeInRight 0.6s ease 0.4s both;
}

.modal-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #233b76;
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(35, 59, 118, 0.3);
    animation: fadeInRight 0.6s ease 0.5s both;
    width: fit-content;
}

.modal-cta-btn:hover {
    background-color: #1a2c5a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(35, 59, 118, 0.5);
    color: #ffffff;
}

.modal-cta-btn svg {
    transition: transform 0.3s ease;
}

.modal-cta-btn:hover svg {
    transform: translate(3px, -3px) scale(1.1);
}

/* Base Responsive */
@media (max-width: 768px) {
    .agency-logo-card {
        padding: 2rem 1.5rem;
        min-height: 150px;
    }

    .agency-logo-card img {
        max-height: 100px;
    }

    /* Hide navigation arrows on mobile */
    .agencies-swiper .swiper-button-next,
    .agencies-swiper .swiper-button-prev {
        display: none;
    }

}

/* ================================================
   AGENCY JOURNEY TIMELINE
   ================================================ */

.agency-journey-section {
    position: relative;
    padding: 110px 0 150px;
    background: linear-gradient(to bottom, transparent 0%, rgba(5, 5, 5, 0.45) 64%, #050505 100%);
    overflow: hidden;
    height: auto !important;
    min-height: auto !important;
}

.agency-journey-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(77, 171, 247, 0.05), transparent 44%),
        radial-gradient(circle at 85% 15%, rgba(10, 17, 40, 0.16), transparent 50%);
    opacity: 0.85;
    pointer-events: none;
}

.agency-journey-section::after {
    content: none;
}

.journey-header {
    position: relative;
    z-index: 2;
    margin-bottom: 50px;
}

.journey-title {
    color: #ffffff;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-family: 'Almarai', sans-serif;
}

.journey-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.08rem;
    margin: 0 auto;
    max-width: 760px;
    line-height: 1.8;
}

.journey-timeline {
    position: relative;
    padding: 30px 0 30px;
    display: grid;
    gap: 32px;
    z-index: 2;
    min-height: 720px;
}

.journey-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 140px;
    transform: translateX(-50%) rotate(-4deg);
    transform-origin: top;
    pointer-events: none;
    z-index: 1;
}

.journey-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.72);
    background: rgba(9, 16, 33, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.journey-marker-start {
    top: -18px;
}

.journey-marker-end {
    bottom: -18px;
}

.journey-path {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: block;
}

.journey-path-base {
    fill: none;
    stroke: rgba(255, 255, 255, 0.24);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-dasharray: 6 12;
    filter: drop-shadow(0 0 4px rgba(77, 171, 247, 0.1));
}

.journey-path-glow {
    fill: none;
    stroke: rgba(77, 171, 247, 0.95);
    stroke-width: 4.8;
    stroke-linecap: round;
    stroke-dasharray: 0 9999;
    stroke-dashoffset: 0;
    filter: drop-shadow(0 0 12px rgba(77, 171, 247, 0.78)) drop-shadow(0 0 24px rgba(77, 171, 247, 0.4));
    transition: stroke-dashoffset 0.2s ease-out;
    animation: glowPulse 3.4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%,
    100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.journey-step {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 70px 1fr;
    align-items: center;
    gap: 20px;
    z-index: 2;
    cursor: pointer;
}

.journey-node {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(8, 15, 30, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 12px rgba(77, 171, 247, 0.2);
    position: relative;
    justify-self: center;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.journey-node::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(77, 171, 247, 0.35), transparent 60%);
    opacity: 0.35;
    filter: blur(2px);
}

.journey-node::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(77, 171, 247, 0.25);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.journey-card {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 20px;
    padding: 2rem 1.8rem 1.9rem;
    min-height: 190px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.journey-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.journey-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: #233b76;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 1;
}

.journey-card > * {
    position: relative;
    z-index: 2;
}

.journey-card h3 {
    color: #ffffff;
    font-size: 1.35rem;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.journey-card p {
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    line-height: 1.75;
    font-size: 0.97rem;
    max-width: 44ch;
}

.journey-watermark {
    position: absolute;
    top: 12px;
    left: 18px;
    font-size: 3.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.06);
    letter-spacing: 2px;
    pointer-events: none;
}

.journey-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(77, 171, 247, 0.9);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.6px;
}

.journey-step.is-left .journey-card {
    grid-column: 1;
    text-align: right;
}

.journey-step.is-right .journey-card {
    grid-column: 3;
    text-align: right;
}

.journey-step.is-left .journey-node,
.journey-step.is-right .journey-node {
    grid-column: 2;
}

.journey-step.is-active .journey-node {
    border-color: rgba(77, 171, 247, 0.9);
    box-shadow: 0 0 18px rgba(77, 171, 247, 0.9), 0 0 34px rgba(77, 171, 247, 0.45), 0 0 44px rgba(255, 255, 255, 0.25);
    transform: scale(1.35);
}

.journey-step.is-active .journey-node::after {
    opacity: 1;
}

.journey-step.is-current .journey-node {
    border-color: rgba(77, 171, 247, 1);
    box-shadow: 0 0 20px rgba(77, 171, 247, 1), 0 0 38px rgba(77, 171, 247, 0.55), 0 0 52px rgba(255, 255, 255, 0.28);
    transform: scale(1.48);
}

.journey-step.is-current .journey-node::before {
    opacity: 0.7;
}

.journey-step.is-active .journey-card {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.journey-step.is-current .journey-card {
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.36);
}

.journey-step.is-current .journey-watermark {
    color: rgba(77, 171, 247, 0.28);
}

.journey-step:hover .journey-card {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.journey-step:hover .journey-card::before,
.journey-step.is-active .journey-card::before {
    opacity: 1;
}

.journey-step.is-final .journey-node {
    width: 28px;
    height: 28px;
    border-color: rgba(77, 171, 247, 0.95);
    box-shadow: 0 0 16px rgba(77, 171, 247, 0.75), 0 0 30px rgba(255, 255, 255, 0.24);
}

.journey-cta {
    margin-top: 56px;
    text-align: center;
}

.journey-cta .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 1.12rem 2.6rem;
    font-size: 1.18rem;
    border-radius: 14px;
}

.journey-cta-note {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.03rem;
    font-weight: 500;
}

@media (max-width: 992px) {
    .journey-step {
        grid-template-columns: 1fr 60px 1fr;
    }
}

@media (max-width: 768px) {
    .journey-timeline {
        gap: 28px;
        padding: 20px 0 0;
        min-height: auto;
    }

    .journey-line {
        left: 18px;
        width: 90px;
        transform: rotate(-3deg);
    }

    .journey-marker {
        left: 18px;
        transform: translateX(-8%);
    }

    .journey-step {
        grid-template-columns: 40px 1fr;
    }

    .journey-step.is-left .journey-card,
    .journey-step.is-right .journey-card {
        grid-column: 2;
        text-align: right;
        min-height: auto;
        padding: 1.55rem 1.2rem 1.45rem;
    }

    .journey-step.is-left .journey-node,
    .journey-step.is-right .journey-node {
        grid-column: 1;
        justify-self: start;
    }

    .journey-card h3 {
        font-size: 1.16rem;
    }

    .journey-card p {
        font-size: 0.93rem;
    }

    .journey-cta .cta-button {
        padding: 0.94rem 1.7rem;
        font-size: 1.03rem;
    }

    .journey-cta-note {
        font-size: 0.95rem;
    }
}

/* Agencies Footer: make it a direct visual continuation of journey section */
.page > footer.container {
    position: relative;
    width: 100%;
    max-width: 100% !important;
    margin-top: 0 !important;
    padding-top: 18px;
    padding-bottom: 16px;
    padding-left: 0;
    padding-right: 0;
    background:
        radial-gradient(
            ellipse 62% 44px at 50% 100%,
            rgba(77, 171, 247, 0.1) 0%,
            rgba(77, 171, 247, 0.045) 38%,
            rgba(77, 171, 247, 0.012) 60%,
            rgba(77, 171, 247, 0) 82%
        ),
        #050505;
    z-index: 2;
}

.page > footer.container::before {
    content: none;
}

.page > footer.container .main-footer {
    margin-top: 0 !important;
    max-width: 1320px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}
