/* ==========================================================================
   HERO SECTION - FIXING EMPTY BOTTOM SPACE & DESKTOP-SITE (980px) SUPPORT
   ========================================================================== */

.hero-agency-saas {
    background-color: #000B33 !important;
    position: relative;
    width: 100%;
    /* Fixed: min-height auto with padding so huge blank space is eliminated */
    min-height: auto;
    padding-top: 110px;
    padding-bottom: 70px;
    color: #FFFFFF !important;
    overflow-x: hidden !important;
}

/* Background Ambient Glow */
.bg-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.5;
    pointer-events: none;
}

.hero-glow-accent {
    position: absolute;
    top: 30%;
    left: 45%;
    transform: translate(-50%, -50%);
    width: 520px;
    height: 400px;
    background: radial-gradient(circle, rgba(242, 121, 21, 0.22) 0%, rgba(2, 132, 199, 0.12) 60%, transparent 100%);
    filter: blur(110px);
    pointer-events: none;
}

/* 
   DESKTOP & MOBILE-DESKTOP-MODE BASELINE (>= 768px):
   Ensures Android Chrome "Desktop site" (980px) and PC/Laptop get 50/50 side-by-side
*/
@media (min-width: 768px) {
    .hero-agency-saas {
        padding-top: 120px;
        padding-bottom: 70px;
    }
    .hero-left-col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        text-align: left !important;
    }
    .hero-right-col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 0 !important;
    }
}

/* Left Column Styling */
.agency-clean-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #E2E8F0;
    backdrop-filter: blur(8px);
}

.hero-agency-title {
    font-size: clamp(1.8rem, 2.8vw, 2.8rem) !important;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.text-gradient-marketing {
    background: linear-gradient(135deg, #F27915 0%, #FFA24C 45%, #38BDF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-agency-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 540px;
}

/* Buttons */
.btn-agency-glow {
    background: linear-gradient(135deg, #F27915 0%, #E06300 100%);
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 11px 24px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(242, 121, 21, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-agency-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(242, 121, 21, 0.65);
}

.btn-agency-glass {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 11px 22px;
    border-radius: 50px;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-agency-glass:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Minimal Metric Counters */
.hero-clean-metrics {
    max-width: 480px;
}

.metric-clean-num {
    font-size: 1.35rem;
    line-height: 1.1;
}

.metric-clean-lbl {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   3D CYLINDER CAROUSEL (DEFAULT / DESKTOP / >= 768px)
   ========================================================================== */

.carousel-3d-stage {
    position: relative;
    width: 100%;
    max-width: 460px;
    height: 380px;
    perspective: 750px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    user-select: none;
    touch-action: pan-y;
}

.carousel-3d-cylinder {
    position: relative;
    width: 142px;
    height: 245px;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
    cursor: grab;
}

.carousel-3d-cylinder:active {
    cursor: grabbing;
}

.carousel-3d-card {
    position: absolute;
    inset: 0;
    width: 142px;
    height: 245px;
    transform: rotateY(calc(var(--card-index) * 36deg)) translateZ(250px);
    border-radius: 16px;
    background: #00124D;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    backface-visibility: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.card-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.4s ease;
}

.card-gradient-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg, 
        rgba(0, 11, 51, 0.25) 0%, 
        rgba(0, 11, 51, 0.72) 50%, 
        rgba(0, 11, 51, 0.98) 100%
    );
    z-index: 2;
}

.card-inner-box {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-badge {
    align-self: flex-start;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 12px;
    text-transform: uppercase;
}

.bg-orange { background-color: #F27915 !important; color: #fff; }
.bg-blue   { background-color: #0284C7 !important; color: #fff; }
.bg-purple { background-color: #9333EA !important; color: #fff; }
.bg-danger { background-color: #E11D48 !important; color: #fff; }
.bg-success { background-color: #10B981 !important; color: #fff; }
.bg-info   { background-color: #06B6D4 !important; color: #000; }

.card-body-content {
    text-align: left;
    margin-top: auto;
    margin-bottom: 6px;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 1px;
    line-height: 1.15;
}

.card-tagline {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0;
}

.card-arrow-btn {
    align-self: flex-end;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.65rem;
    transition: all 0.3s ease;
}

.card-arrow-btn:hover {
    background: #F27915;
    color: #FFFFFF;
}

/* Indicators */
.carousel-footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}

.carousel-indicators-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-dot.active {
    width: 18px;
    border-radius: 10px;
    background: #F27915;
}

/* Desktop Hover Zoom (Only on fine-pointer mouse) */
@media (hover: hover) and (pointer: fine) {
    .carousel-3d-card:hover {
        border-color: #F27915;
        box-shadow: 0 0 25px rgba(242, 121, 21, 0.5);
        transform: rotateY(calc(var(--card-index) * 36deg)) translateZ(262px);
    }
    .carousel-3d-card:hover .card-bg-img {
        transform: scale(1.08);
    }
}

/* ==========================================================================
   REAL MOBILE ONLY (< 768px): STACKED CLEAN LAYOUT & NO HOVER ZOOM
   ========================================================================== */

@media (max-width: 767.98px) {
    .hero-agency-saas {
        padding-top: 85px !important;
        padding-bottom: 40px !important;
        min-height: auto !important; /* Eliminates tall empty space on mobile */
    }

    .hero-left-col {
        width: 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .hero-right-col {
        width: 100%;
        max-width: 100%;
        margin-top: 15px !important;
    }

    .hero-agency-title {
        font-size: 1.75rem !important;
        line-height: 1.22 !important;
    }

    .hero-agency-desc {
        font-size: 0.88rem;
        max-width: 100%;
    }

    .btn-agency-glow,
    .btn-agency-glass {
        padding: 9px 18px !important;
        font-size: 0.82rem !important;
    }

    /* Mobile Contained Cylinder Stage (No overflow, centered, clear spacing) */
    .carousel-3d-stage {
        height: 270px;
        width: 100%;
        max-width: 300px;
        perspective: 440px;
        margin: 0 auto;
        overflow: visible;
    }

    .carousel-3d-cylinder {
        width: 86px;
        height: 165px;
    }

    .carousel-3d-card {
        width: 86px;
        height: 165px;
        transform: rotateY(calc(var(--card-index) * 36deg)) translateZ(150px);
        border-radius: 12px;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
    }

    .card-inner-box {
        padding: 8px 6px;
    }

    .card-badge {
        font-size: 0.42rem;
        padding: 1px 5px;
        border-radius: 8px;
    }

    .card-title {
        font-size: 0.66rem;
        margin-bottom: 0;
        line-height: 1.15;
    }

    .card-tagline {
        display: none;
    }

    .card-arrow-btn {
        width: 20px;
        height: 20px;
        font-size: 0.52rem;
    }

    .carousel-footer-nav {
        margin-top: 10px !important;
    }

    .indicator-dot {
        width: 5px;
        height: 5px;
    }

    .indicator-dot.active {
        width: 14px;
    }

    /* Touch Devices: Strictly disable zoom */
    .carousel-3d-card:hover,
    .carousel-3d-card:focus,
    .carousel-3d-card:active {
        transform: rotateY(calc(var(--card-index) * 36deg)) translateZ(150px) !important;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6) !important;
        border-color: rgba(255, 255, 255, 0.16) !important;
    }

    .carousel-3d-card:hover .card-bg-img,
    .carousel-3d-card:focus .card-bg-img,
    .carousel-3d-card:active .card-bg-img {
        transform: scale(1) !important;
    }
}