/* Web Agency Homepage – Frontend (light theme) */

:root {
    --agency-bg: #ffffff;
    --agency-surface: #f8f9fa;
    --agency-text: #1a1d21;
    --agency-muted: #5c6370;
    --agency-accent: #1282ff;
    --agency-accent-hover: #0a6ee6;
    --agency-border: rgba(0,0,0,0.08);
    --agency-font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --touch-min: 44px; /* minimum touch target size (WCAG) */
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--agency-bg);
    color: var(--agency-text);
    font-family: var(--agency-font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    padding: 8px 16px;
    background: var(--agency-accent);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 16px;
}

/* Header / Nav */
.frontend-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgb(0 0 0 / 15%);
    transition: background 0.3s, border-color 0.3s;
}

.frontend-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
}

.frontend-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.frontend-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--agency-text);
    font-weight: 700;
    font-size: 1.25rem;
}

.frontend-logo img {
    max-height: 100px;
    /* width: auto; */
    object-fit: contain;
}

.frontend-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.frontend-nav a {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-min);
    padding: 0.5rem 1rem;
    color: var(--agency-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.frontend-nav a:hover {
    color: var(--agency-text);
    background: rgba(0,0,0,0.04);
}

.frontend-nav .nav-cta {
    margin-left: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--agency-accent);
    color: #fff !important;
    border-radius: 8px;
}

.frontend-nav .nav-cta:hover {
    background: var(--agency-accent-hover);
    color: #fff !important;
}

/* Services mega menu */
.nav-item-with-mega {
    position: relative;
}

.nav-link-mega-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.mega-chevron {
    font-size: 0.65rem;
    opacity: 0.8;
    transition: transform 0.2s;
}

.nav-item-with-mega:hover .mega-chevron,
.nav-item-with-mega.mega-open .mega-chevron {
    transform: rotate(180deg);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: min(860px, calc(100vw - 2rem));
    max-width: 1000px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    border: 1px solid var(--agency-border);
    padding: 1.25rem 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1001;
    margin-top: 4px;
}

.nav-item-with-mega:hover .mega-menu,
.nav-item-with-mega.mega-open .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 1.5rem;
}

.mega-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 1.5rem;
    border-right: 1px solid var(--agency-border);
}
.mega-column:last-child {
    padding-right: 0;
    border-right: none;
}

.mega-column-title {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--agency-accent);
    margin-bottom: 0.2rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--agency-border);
    white-space: nowrap;
}

.mega-service-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 -0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.mega-service-item a.mega-service-link {
    display: block;
    min-height: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--agency-text);
    text-decoration: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
    transition: color 0.2s;
}

.mega-service-item .mega-service-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-service-item .mega-service-desc {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--agency-muted);
    padding: 0;
    margin: 5px 0 0 0;
    max-width: 100%;
    white-space: normal;
}

.mega-service-item:hover {
    background: rgba(18, 130, 255, 0.1);
}
.mega-service-item:hover .mega-service-link,
.mega-service-item .mega-service-link:hover {
    color: var(--agency-accent);
}
.mega-service-item:hover .mega-service-desc {
    color: var(--agency-muted);
}

@media (max-width: 991px) {
    .mega-menu {
        left: 0;
        right: 0;
        transform: translateY(4px);
        min-width: auto;
        max-width: none;
    }
    .nav-item-with-mega:hover .mega-menu,
    .nav-item-with-mega.mega-open .mega-menu {
        transform: translateY(0);
    }
    .mega-menu-inner {
        grid-template-columns: repeat(2, 1fr);
    }
    .mega-column:nth-child(2) {
        border-right: none;
        padding-right: 0;
    }
    .mega-column:nth-child(4) {
        border-right: none;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .mega-menu {
        position: static;
        transform: none;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0 1rem;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(0,0,0,0.02);
    }
    .nav-item-with-mega.mega-open .mega-menu {
        max-height: min(80vh, 480px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
        margin-top: 0.5rem;
        border: 1px solid var(--agency-border);
        border-radius: 8px;
    }
    .mega-menu-inner {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .mega-column {
        border-right: none;
        padding-right: 0;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--agency-border);
    }
    .mega-column:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }
    .mega-column-title {
        font-size: 0.85rem;
    }
    .mega-service-item {
        margin: 0;
        padding: 0.5rem 0.75rem;
    }
}

/* Hamburger – visible only on small viewports */
.frontend-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: var(--touch-min);
    min-width: var(--touch-min);
    height: var(--touch-min);
    min-height: var(--touch-min);
    padding: 0;
    background: transparent;
    border: 1px solid var(--agency-border);
    border-radius: 8px;
    color: var(--agency-text);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.frontend-nav-toggle:hover {
    background: rgba(0,0,0,0.04);
}

/* Main content wrapper */
.frontend-main {
    padding-top: 0;
}

/* Section common */
.agency-section {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.agency-section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.agency-section-subtitle {
    color: var(--agency-muted);
    font-size: 1.1rem;
    max-width: 1150px;
    margin-bottom: 2.5rem;
}

/* Hero */
.agency-hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 10rem 1.5rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.agency-hero-inner {
    width: 100%;
}

.agency-hero-inner .agency-hero-headline {
    font-size: clamp(2rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.agency-hero-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(18, 130, 255, 0.12);
    color: var(--agency-accent);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 100px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.agency-hero p.agency-hero-subtitle {
    font-size: 1.25rem;
    color: var(--agency-muted);
    max-width: 520px;
    margin-bottom: 2rem;
}

.agency-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.agency-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--touch-min);
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.agency-btn-primary {
    background: var(--agency-accent);
    color: #fff;
}

.agency-btn-primary:hover {
    background: var(--agency-accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

.agency-btn-secondary {
    background: var(--agency-surface);
    color: var(--agency-text);
    border: 1px solid var(--agency-border);
}

.agency-btn-secondary:hover {
    background: rgba(0,0,0,0.05);
    color: var(--agency-text);
    transform: translateY(-1px);
}

/* ---- Animations: hero stagger, scroll reveal, hovers (respects prefers-reduced-motion) ---- */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agency-hero-inner .hero-anim-item {
    opacity: 0;
    transform: translateY(24px);
}

.agency-hero-inner.hero-anim-ready .hero-anim-item {
    animation: heroFadeUp 0.55s ease-out forwards;
}

.agency-hero-inner.hero-anim-ready .agency-hero-headline { animation-delay: 0s; }
.agency-hero-inner.hero-anim-ready .agency-hero-subtitle { animation-delay: 0.12s; }
.agency-hero-inner.hero-anim-ready .agency-hero-buttons { animation-delay: 0.24s; }

@keyframes heroChatSlideUp {
    from {
        opacity: 0;
        transform: translateY(48px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agency-hero-inner .agency-hero-chat-prompt.hero-anim-item {
    opacity: 0;
    transform: translateY(48px);
}

.agency-hero-inner.hero-anim-ready .agency-hero-chat-prompt.hero-anim-item {
    animation: heroChatSlideUp 0.55s ease-out 0.5s forwards;
}

/* Hero chat prompt: "To better assist you..." + input (blinking cursor via native caret) */
.agency-hero-chat-prompt {
    margin-top: 2rem;
    max-width: 520px;
}

.agency-hero-chat-label {
    display: block;
    font-size: 1rem;
    color: var(--agency-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.agency-hero-chat-typewriter {
    display: inline;
}

@keyframes typewriterBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.agency-hero-chat-cursor {
    display: inline-block;
    margin-left: 1px;
    color: var(--agency-accent);
    font-weight: 300;
    animation: typewriterBlink 1s step-end infinite;
}

.agency-hero-chat-cursor.typewriter-done {
    display: none;
}

.agency-hero-chat-form {
    margin: 0;
}

.agency-hero-chat-input-wrap {
    position: relative;
}

.agency-hero-chat-input {
    width: 100%;
    min-height: 56px;
    padding: 0.85rem 3rem 0.85rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--agency-text);
    background: var(--agency-surface);
    border: 2px solid var(--agency-accent);
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
    caret-color: var(--agency-accent);
    box-shadow: 0 0 0 3px rgba(18, 130, 255, 0.15);
}

.agency-hero-chat-input::placeholder {
    color: var(--agency-muted);
}

.agency-hero-chat-input:hover {
    border-color: var(--agency-accent-hover);
    box-shadow: 0 0 0 3px rgba(18, 130, 255, 0.2);
}

.agency-hero-chat-input:focus {
    outline: none;
    border-color: var(--agency-accent);
    box-shadow: 0 0 0 3px rgba(18, 130, 255, 0.2);
}

.agency-hero-chat-send {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--agency-accent);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.agency-hero-chat-send:hover {
    color: var(--agency-accent-hover);
    background: rgba(18, 130, 255, 0.1);
}

.agency-hero-chat-send:focus {
    outline: none;
}

.agency-hero-chat-send .fas {
    font-size: 1.1rem;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.agency-services-category.scroll-reveal.is-visible:nth-child(1) { transition-delay: 0s; }
.agency-services-category.scroll-reveal.is-visible:nth-child(2) { transition-delay: 0.08s; }
.agency-services-category.scroll-reveal.is-visible:nth-child(3) { transition-delay: 0.16s; }
.agency-services-category.scroll-reveal.is-visible:nth-child(4) { transition-delay: 0.24s; }

/* Nav: underline slide-in on hover */
.frontend-nav > a:not(.nav-cta) {
    position: relative;
}

.frontend-nav > a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: 0.35rem;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--agency-accent);
    transition: width 0.25s ease, left 0.25s ease;
}

.frontend-nav > a:not(.nav-cta):hover::after {
    width: 80%;
    left: 10%;
}

.frontend-nav .nav-cta {
    transition: background 0.25s ease, color 0.2s ease, transform 0.2s ease;
}

.frontend-nav .nav-cta:hover {
    transform: translateY(-2px);
}

.frontend-nav .nav-cta-chat {
    margin-left: auto;
}

/* Service cards: lift + soft glow, icon micro-interaction */
.agency-service-card {
    transition: border-color 0.25s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.agency-service-card:hover {
    border-color: rgba(18, 130, 255, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(18, 130, 255, 0.12);
}

.agency-service-card .icon {
    transition: transform 0.35s ease;
}

.agency-service-card:hover .icon {
    transform: scale(1.08) rotate(-4deg);
}

/* Selected work: image zoom on hover */
.agency-work-card .thumb.agency-work-card-thumb-wrap {
    overflow: hidden;
}

.agency-work-card .thumb .agency-work-card-thumb-img {
    transition: transform 0.45s ease-out;
}

.agency-work-card:hover .thumb .agency-work-card-thumb-img {
    transform: scale(1.08);
}

.agency-work-card {
    transition: border-color 0.25s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.agency-work-card:hover {
    border-color: rgba(18, 130, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* Chat bubble: smooth micro-interaction */
.chat-float-bubble {
    transition: background 0.25s ease, color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.chat-float-bubble:hover {
    box-shadow: 0 4px 20px rgba(18, 130, 255, 0.4);
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .agency-hero-inner .hero-anim-item,
    .agency-hero-inner.hero-anim-ready .hero-anim-item {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    .scroll-reveal.is-visible {
        transform: none;
    }
    .frontend-nav > a:not(.nav-cta)::after {
        transition: none;
    }
    .frontend-nav .nav-cta:hover,
    .agency-service-card:hover .icon,
    .agency-work-card:hover .thumb .agency-work-card-thumb-img,
    .portfolio-card:hover .portfolio-card-image {
        transform: none;
    }
}

/* Services grid – What we do section: full-bleed blue, content contained */
.agency-services {
    background: #1282ff;
    max-width: none;
    width: 100%;
    padding: 0;
}

.agency-services-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.agency-services .agency-section-title {
    color: #fff;
}

.agency-services .agency-section-subtitle {
    color: rgba(255, 255, 255, 1);
}

.agency-services-by-category {
    margin-top: 2rem;
}

.agency-services-category {
    margin-bottom: 3.5rem;
}

.agency-services-category:last-child {
    margin-bottom: 0;
}

.agency-services-category-title {
    font-size: clamp(2rem, 8vw, 2rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin: 0 0 1.25rem;
    color: var(--agency-text);
    text-align: center;
    text-transform: none;
}

.agency-services .agency-services-category-title {
    color: #fff;
}

.agency-services-category .agency-services-grid {
    margin-top: 0;
}

.agency-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.agency-service-card {
    padding: 1.75rem;
    background: #fff;
    border: 1px solid var(--agency-border);
    border-radius: 16px;
    transition: border-color 0.25s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.agency-service-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.agency-service-card-link:hover {
    color: inherit;
}

.agency-service-card .icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 130, 255, 0.12);
    color: var(--agency-accent);
    border-radius: 12px;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.agency-service-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.agency-service-card p {
    color: var(--agency-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* About / Why us – 3 horizontal blocks + centered tagline */
.agency-about-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
    .agency-about-blocks {
        grid-template-columns: 1fr;
    }
}

.agency-about-block {
    padding: 1.5rem;
    background: var(--agency-surface, #fff);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.agency-about-block-dot {
    width: 24px;
    height: 24px;
    background: var(--agency-accent);
    border-radius: 50%;
    margin-bottom: 1rem;
}

.agency-about-block-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--agency-heading, #1a1a1a);
}

.agency-about-block-text {
    color: var(--agency-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.agency-about-tagline {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    padding-bottom: 1.5rem;
    color: var(--agency-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Legacy about list (if used elsewhere) */
.agency-about-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.agency-about-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.agency-about-list li::before {
    content: '';
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--agency-accent);
    border-radius: 50%;
    margin-top: 0.15rem;
}

.agency-about-list li strong {
    display: block;
    margin-bottom: 0.2rem;
}

.agency-about-list li span {
    color: var(--agency-muted);
    font-size: 0.95rem;
}

.agency-about-cta {
    text-align: center;
}

.agency-about-blue-banner {
    background: #dcecff;
    color: #0a0a0a;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0 2.5rem 0;
    border-radius: 12px;
    text-align: center;
}

/* Portfolio / Work */
.agency-work {
    background: var(--agency-surface);
}

.agency-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.agency-work-card {
    background: #fff;
    border: 1px solid var(--agency-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.agency-work-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.agency-work-card-link:hover {
    color: inherit;
}

.agency-work-view-all {
    text-align: center;
    margin: 2rem 0 0;
}

.agency-work-view-all .agency-btn {
    display: inline-flex;
    align-items: center;
}

.agency-work-card .thumb {
    height: 200px;
    background: linear-gradient(135deg, rgba(18,130,255,0.12) 0%, rgba(248,249,250,0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 3rem;
    color: rgba(18, 130, 255, 0.55);
}
.agency-work-card .thumb .agency-work-card-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.agency-work-card .body {
    padding: 1.25rem 1.5rem;
}

.agency-work-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.agency-work-card p {
    color: var(--agency-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Portfolio page */
.portfolio-page {
    padding-bottom: 2rem;
}

.portfolio-hero {
    padding: clamp(5rem, 12vw, 7rem) 1.5rem 3rem;
    text-align: center;
    background: linear-gradient(180deg, var(--agency-surface) 0%, var(--agency-bg) 100%);
}

.portfolio-hero-inner {
    max-width: 640px;
    margin: 0 auto;
}

.portfolio-hero-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--agency-accent);
    margin-bottom: 0.75rem;
}

.portfolio-hero h1 {
    font-size: clamp(2rem, 8vw, 7rem);
    font-weight: 800;
    margin: 0 0 1rem;
    line-height: 1;
}

.portfolio-hero-lead {
    color: var(--agency-muted);
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

.portfolio-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.portfolio-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 2rem;
}

.portfolio-filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--agency-muted);
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--agency-font);
    color: var(--agency-muted);
    background: #fff;
    border: 1px solid var(--agency-border);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.portfolio-filter-btn:hover {
    color: var(--agency-text);
    border-color: rgba(0,0,0,0.15);
}

.portfolio-filter-btn.active {
    color: #fff;
    background: var(--agency-accent);
    border-color: var(--agency-accent);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
    gap: 1.75rem;
}

.portfolio-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--agency-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    border-color: rgba(18, 130, 255, 0.25);
}

.portfolio-card-image-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--agency-surface);
}

.portfolio-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease-out;
}

.portfolio-card:hover .portfolio-card-image {
    transform: scale(1.08);
}

.portfolio-card-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255,255,255,0.95);
    color: var(--agency-text);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.portfolio-card-body {
    padding: 1.5rem 1.5rem 1.75rem;
}

.portfolio-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.portfolio-card-desc {
    color: var(--agency-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.55;
}

.portfolio-cta {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--agency-surface);
}

.portfolio-cta-inner {
    max-width: 520px;
    margin: 0 auto;
}

.portfolio-cta h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.portfolio-cta p {
    color: var(--agency-muted);
    margin-bottom: 1.5rem;
}

.portfolio-cta .agency-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Service landing page – conversion-focused */
.agency-btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.service-landing {
    padding-bottom: 0;
}

/* Hero – gradient, icon, primary CTA */
.service-hero-v2 {
    position: relative;
    padding: clamp(5rem, 14vw, 8rem) 1.5rem clamp(3rem, 8vw, 4rem);
    text-align: center;
    overflow: hidden;
}

.service-hero-v2-bg {
    position: absolute;
    inset: 0;
    /* Darker gradient for WCAG AAA contrast (white text ≥ 7:1) */
    background: linear-gradient(135deg, #0a3d91 0%, #0d47a1 25%, #1565c0 55%, #1976d2 85%);
    opacity: 0.98;
}

.service-hero-v2-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.service-hero-v2-inner {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    color: #fff;
    height: 650px;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
}

.service-hero-v2-inner .agency-hero-chat-prompt {
    margin-top: auto;
    margin-bottom: 3rem;
    margin-left: auto;
    margin-right: auto;
}

.service-hero-v2-inner .agency-hero-chat-label {
    color: #fff;
}

/* Service hero: form only appears after typewriter completes, slides in from bottom */
.service-hero-v2-inner .agency-hero-chat-form-wrap {
    visibility: hidden;
    opacity: 0;
    transform: translateY(24px);
    transition: visibility 0s linear 0.35s, opacity 0.35s ease-out, transform 0.35s ease-out;
}

.service-hero-v2-inner .agency-hero-chat-form-wrap.hero-chat-form-visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.service-hero-v2-pill {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.service-hero-v2 h1 {
    font-size: clamp(2rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin: 0 0 0.75rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.service-hero-v2-headline {
    font-size: clamp(1.2rem, 2.5vw, 1.4rem);
    font-weight: 700;
    opacity: 0.95;
    margin: 0 0 1.75rem;
    line-height: 1.4;
}

.service-hero-v2-cta .agency-btn-primary {
    background: #fff;
    color: var(--agency-accent);
    border: none;
}

.service-hero-v2-cta .agency-btn-primary:hover {
    background: rgba(255,255,255,1);
    color: var(--agency-accent-hover);
}

.service-hero-v2-trust {
    margin: 1.25rem 0 0;
    font-size: 0.9rem;
    opacity: 0.95;
}

/* Hero decoration for custom web dev: subtle code/UI feel */
.service-hero-v2--dev .service-hero-v2-inner {
    position: relative;
}
.service-hero-v2--dev .service-hero-v2-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.06) 0%, transparent 40%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 35%);
    pointer-events: none;
}
.service-hero-v2--dev .service-hero-v2-inner::after {
    content: '</>';
    position: absolute;
    right: 8%;
    bottom: 15%;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    opacity: 0.08;
    font-family: ui-monospace, monospace;
    letter-spacing: -0.05em;
    pointer-events: none;
}

/* Hero with background image: full-width image, text on top, overlay for readability */
.service-hero-v2-with-image .service-hero-v2-img-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
}

.service-hero-v2-with-image .service-hero-v2-img-wrap picture,
.service-hero-v2-with-image .service-hero-v2-img-wrap img.service-hero-v2-img,
.service-hero-v2-with-image .service-hero-v2-img-wrap video.service-hero-v2-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-hero-v2-with-image .service-hero-v2-overlay {
    position: absolute;
    inset: 0;
    z-index: 0.5;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* Service hero: mobile only, service pages – full viewport, no white; content 15% from top */
@media (max-width: 768px) {
    .service-hero-v2 {
        min-height: 100dvh;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: max(15vh, 5rem);
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 2rem;
        box-sizing: border-box;
    }
    .service-hero-v2-inner {
        height: auto;
        min-height: 0;
        margin-top: 0;
    }
    .service-hero-v2-inner .agency-hero-chat-prompt {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .service-hero-v2 h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    .service-hero-v2-headline {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    .service-hero-v2-trust {
        margin-top: 0.75rem;
        font-size: 0.85rem;
    }
    .service-landing .service-trusted-by {
        padding: 1rem 1rem;
    }
    .service-landing .service-intro-v2 {
        padding-top: 1.5rem;
    }
}

/* Trust strip */
.service-trust-strip {
    background: var(--agency-text);
    color: #fff;
    padding: 0.85rem 1.5rem;
}

.service-trust-strip-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 2rem;
}

.service-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.service-trust-item i {
    color: #4caf50;
}

/* Trusted By ribbon (client logos) */
.service-trusted-by {
    background: var(--agency-surface);
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid var(--agency-border);
}
.service-trusted-by-inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}
.service-trusted-by-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--agency-muted);
    margin: 0 0 1rem;
}
.service-trusted-by-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem 2.5rem;
}
.service-trusted-by-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}
.service-trusted-by-item img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.8;
    transition: filter 0.2s, opacity 0.2s;
}
.service-trusted-by-item img:hover {
    filter: grayscale(0);
    opacity: 1;
}
.service-trusted-by-placeholder {
    font-size: 1rem;
    font-weight: 600;
    color: var(--agency-muted);
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.04);
    border-radius: 8px;
}

/* Testimonials */
.service-testimonials {
    background: var(--agency-bg);
    padding: clamp(3rem, 8vw, 5rem) 1.5rem;
}
.service-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}
.service-testimonial-card {
    margin: 0;
    padding: 1.75rem;
    background: var(--agency-surface);
    border-radius: 16px;
    border-left: 4px solid var(--agency-accent);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.service-testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.service-testimonial-quote {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--agency-text);
    margin: 0 0 0.75rem;
    font-style: italic;
}
.service-testimonial-author {
    font-size: 0.9rem;
    color: var(--agency-muted);
    font-style: normal;
}

/* Tech stack chips */
.service-tech-stack {
    background: var(--agency-surface);
    padding: clamp(3rem, 8vw, 4rem) 1.5rem;
}
.service-tech-stack-intro {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 1.5rem;
    color: var(--agency-muted);
    font-size: 1rem;
}
.service-tech-stack-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}
.service-tech-chip {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: #fff;
    color: var(--agency-accent);
    border: 1px solid rgba(18, 130, 255, 0.3);
    border-radius: 999px;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.service-tech-chip:hover {
    background: rgba(18, 130, 255, 0.08);
    border-color: var(--agency-accent);
    transform: translateY(-1px);
}

/* Content blocks */
.service-block {
    padding: clamp(3rem, 8vw, 5rem) 1.5rem;
}

.service-block-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.service-block-title {
    text-align: center;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 2rem;
}

/* Intro with icon */
.service-intro-v2 {
    background: var(--agency-bg);
}

.service-intro-v2 .service-block-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: start;
}

.service-intro-v2-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(18,130,255,0.15) 0%, rgba(18,130,255,0.06) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--agency-accent);
}

.service-intro-v2-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.service-intro-v2-text {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--agency-text);
    margin: 0 0 1rem;
}

.service-inline-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--agency-accent);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s;
}

.service-inline-cta:hover {
    gap: 0.75rem;
}

/* Benefits grid – cards with check icons */
.service-benefits-v2 {
    background: var(--agency-surface);
}

.service-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
}

.service-benefit-card {
    background: #fff;
    padding: 1.75rem;
    border-radius: 16px;
    border: 1px solid var(--agency-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.service-benefit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border-color: rgba(18, 130, 255, 0.2);
}

.service-benefit-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(18, 130, 255, 0.1);
    color: var(--agency-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.service-benefit-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
}

.service-benefit-card p {
    font-size: 0.95rem;
    color: var(--agency-muted);
    margin: 0;
    line-height: 1.55;
}

/* Why it matters – scroll-style fade-in (runs on load with stagger) */
@keyframes serviceBenefitReveal {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.service-benefits-reveal .service-benefit-card {
    animation: serviceBenefitReveal 0.5s ease-out both;
}
.service-benefits-reveal .service-benefit-card:nth-child(1) { animation-delay: 0.1s; }
.service-benefits-reveal .service-benefit-card:nth-child(2) { animation-delay: 0.2s; }
.service-benefits-reveal .service-benefit-card:nth-child(3) { animation-delay: 0.3s; }
.service-benefits-reveal .service-benefit-card:nth-child(4) { animation-delay: 0.4s; }
.service-benefits-reveal .service-benefit-card:nth-child(5) { animation-delay: 0.5s; }

/* How we work */
.service-process {
    background: linear-gradient(180deg, var(--agency-bg) 0%, #e8f4fd 100%);
    padding: clamp(3rem, 8vw, 5rem) 1.5rem;
}

.service-process-inner {
    max-width: 900px;
    margin: 0 auto;
}

.service-process h2 {
    text-align: center;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 2rem;
}

.service-process-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-process-step {
    text-align: center;
    padding: 1.5rem 1rem;
}

.service-process-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--agency-accent);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.service-process-step h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.service-process-step p {
    font-size: 0.9rem;
    color: var(--agency-muted);
    margin: 0;
    line-height: 1.5;
}

/* How we work – horizontal timeline with connecting line */
.service-process-timeline .service-process-steps {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}
.service-process-timeline .service-process-steps::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, var(--agency-accent), rgba(18, 130, 255, 0.4));
    border-radius: 2px;
    z-index: 0;
}
@media (max-width: 768px) {
    .service-process-timeline .service-process-steps::before {
        display: none;
    }
}
.service-process-timeline .service-process-step {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 180px;
}
.service-process-timeline .service-process-num {
    box-shadow: 0 0 0 4px var(--agency-bg), 0 0 0 6px var(--agency-accent);
}

/* Mid CTA */
.service-cta-mid {
    background: var(--agency-accent);
    color: #fff;
    padding: clamp(3rem, 8vw, 4.5rem) 1.5rem;
    text-align: center;
}

.service-cta-mid-inner {
    max-width: 560px;
    margin: 0 auto;
}

.service-cta-mid h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-cta-mid p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.service-cta-mid .agency-btn-primary {
    background: #fff;
    color: var(--agency-accent);
    border: none;
}

.service-cta-mid .agency-btn-primary:hover {
    background: rgba(255,255,255,1);
    color: var(--agency-accent-hover);
}

/* Related services – cards */
.service-related-v2 {
    padding: clamp(3rem, 8vw, 5rem) 1.5rem;
    background: var(--agency-surface);
}

.service-related-v2 h2 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.service-related-v2-intro {
    font-size: 0.95rem;
    color: var(--agency-muted);
    margin-bottom: 1.5rem;
}

.service-related-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.25rem;
}

.service-related-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--agency-border);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.service-related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
    border-color: rgba(18, 130, 255, 0.3);
}

.service-related-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(18, 130, 255, 0.1);
    color: var(--agency-accent);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.service-related-card-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.service-related-card-desc {
    font-size: 0.9rem;
    color: var(--agency-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-related-card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--agency-accent);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.service-related-card:hover .service-related-card-link {
    text-decoration: underline;
}

/* Final CTA */
.service-cta-final {
    background: var(--agency-text);
    color: #fff;
    padding: clamp(3.5rem, 10vw, 5rem) 1.5rem;
    text-align: center;
}

.service-cta-final-inner {
    max-width: 600px;
    margin: 0 auto;
}

.service-cta-final h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-cta-final p {
    margin-bottom: 1.5rem;
    opacity: 1;
}

.service-cta-final-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-cta-final .agency-btn-primary {
    background: var(--agency-accent);
    border: none;
}

.service-cta-final .agency-btn-primary:hover {
    background: var(--agency-accent-hover);
}

.service-cta-final .agency-btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}

.service-cta-final .agency-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    color: #fff;
}

.service-cta-final .agency-btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.7);
    color: #fff;
}
.service-cta-final .agency-btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

.service-cta-final-note {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0;
}

@media (max-width: 768px) {
    .service-intro-v2 .service-block-inner {
        grid-template-columns: 1fr;
    }
    .service-process-steps,
    .service-process-timeline .service-process-steps {
        grid-template-columns: 1fr;
    }
    .service-trust-strip-inner {
        flex-direction: column;
        align-items: center;
    }
    .service-trusted-by-logos {
        gap: 1.5rem;
    }
    .service-cta-final-buttons {
        flex-direction: column;
    }
    .service-cta-final-buttons .agency-btn {
        width: 100%;
        justify-content: center;
    }
}

/* CTA strip */
.agency-cta {
    text-align: center;
    padding: 4rem 1.5rem;
}

.agency-cta h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.agency-cta p {
    color: var(--agency-muted);
    margin-bottom: 1.5rem;
}

/* Contact */
.agency-contact {
    background: var(--agency-surface);
}

.agency-contact-inner {
    max-width: 560px;
    margin: 0 auto;
}

.agency-contact form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.agency-contact label {
    font-weight: 600;
    font-size: 0.9rem;
}

.agency-contact input {
    width: 100%;
    min-height: var(--touch-min);
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--agency-border);
    border-radius: 10px;
    color: var(--agency-text);
    font-family: inherit;
    font-size: 16px; /* prevents iOS zoom on focus */
    transition: border-color 0.2s;
}

.agency-contact input::placeholder,
.agency-contact textarea::placeholder {
    color: var(--agency-muted);
}

.agency-contact input:focus,
.agency-contact textarea:focus {
    outline: none;
    border-color: var(--agency-accent);
}

.agency-contact textarea {
    width: 100%;
    min-height: 140px;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--agency-border);
    border-radius: 10px;
    color: var(--agency-text);
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.2s;
    resize: vertical;
}

.agency-contact button[type="submit"] {
    align-self: flex-start;
    margin-top: 0.5rem;
}

/* Footer – dark */
.frontend-footer {
    background: #1c1e22;
    color: rgba(255, 255, 255, 0.88);
    padding: 2.5rem 1.5rem 2rem;
    border-top: none;
}

.frontend-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.frontend-footer-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem 3rem;
    margin-bottom: 2rem;
    text-align: left;
}

.frontend-footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    padding: 0 1rem;
}

.frontend-footer-col:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding-right: 1.5rem;
    margin-right: 0.5rem;
}

.frontend-footer-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.25rem;
}

.frontend-footer a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.95rem;
}

.frontend-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.frontend-footer-copy {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ========== Responsive: tablet and below ========== */
@media (max-width: 768px) {
    .frontend-header-inner {
        padding: 0 0.5rem;
    }
    .frontend-logo {
        font-size: 1.1rem;
    }
    .frontend-logo img {
        max-height: 48px;
    }
    .frontend-nav-toggle {
        display: flex;
    }
    .frontend-nav {
        display: none;
    }
    .frontend-nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.75rem 1rem;
        background: var(--agency-bg);
        border-bottom: 1px solid var(--agency-border);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .frontend-nav.mobile-open a {
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }
    .frontend-nav.mobile-open .nav-cta {
        margin-left: 0;
        margin-top: 0.25rem;
    }
    .agency-hero {
        min-height: auto;
        padding: 6rem 1rem 3rem;
    }
    .agency-hero-inner .agency-hero-headline {
        font-size: clamp(1.75rem, 7vw, 4rem);
    }
    .agency-hero p.agency-hero-subtitle {
        font-size: 1.05rem;
    }
    .agency-hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .agency-hero-buttons .agency-btn {
        width: 100%;
    }
    .agency-hero-chat-prompt {
        margin-top: 1.5rem;
    }
    .agency-hero-chat-input {
        min-height: 48px;
    }
    .agency-section {
        padding: 3rem 1rem;
    }
    .agency-services-inner {
        padding: 3rem 1rem;
    }
    .agency-section-subtitle {
        margin-bottom: 1.5rem;
    }
    .agency-services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .agency-work-grid {
        grid-template-columns: 1fr;
    }
    .agency-cta {
        padding: 3rem 1rem;
    }
    .agency-contact {
        padding: 3rem 1rem;
    }
    .frontend-footer {
        padding: 1.5rem 1rem;
    }
    .frontend-footer-links {
        grid-template-columns: 1fr;
        align-items: center;
        gap: 1.5rem;
        text-align: center;
    }
    .frontend-footer-col {
        align-items: center;
    }
    .frontend-footer-col:first-child {
        border-right: none;
        margin-right: 0;
        padding-right: 1rem;
    }
    .chat-float-bubble-wrapper {
        bottom: 1rem;
        right: 1rem;
    }
    .frontend-chat-panel {
        top: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    .frontend-chat-panel:not(.open) {
        transform: translateX(100vw);
    }
    .frontend-chat-panel.chat-position-focussed {
        left: 50%;
        top: 50%;
        right: auto;
        width: 92%;
        max-width: 100%;
        height: 80vh;
        max-height: 80vh;
        border-radius: 12px;
        transform: translate(-50%, -50%) scale(0.95);
    }
    .frontend-chat-panel.chat-position-focussed:not(.open) {
        transform: translate(-50%, -50%) scale(0.95);
    }
    .frontend-chat-panel.chat-position-focussed.open {
        transform: translate(-50%, -50%) scale(1);
    }
    /* Back-to-top below and left of chat on small screens */
    .back-to-top {
        bottom: 0.5rem;
        right: 4.5rem;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* ========== Responsive: small phones ========== */
@media (max-width: 480px) {
    .agency-hero {
        padding: 6rem 0.75rem 2.5rem;
    }
    .agency-section {
        padding: 2.5rem 0.75rem;
    }
    .agency-services-inner {
        padding: 2.5rem 0.75rem;
    }
    .agency-section-title {
        font-size: clamp(1.5rem, 5vw, 1.75rem);
    }
    .agency-service-card {
        padding: 1.25rem;
    }
    .agency-work-card .thumb {
        height: 160px;
        font-size: 2.5rem;
    }
    .agency-work-card .body {
        padding: 1rem 1.25rem;
    }
}

/* Chat bubble – frontend (keep in frontend folder) */
.chat-float-bubble-wrapper {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1050;
}
.chat-float-bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    border-radius: 50%;
    background: var(--agency-accent);
    color: #fff !important;
    border: 2px solid var(--agency-accent-hover);
    box-shadow: 0 2px 12px rgb(252 252 252);
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
}
.chat-float-bubble:hover {
    background: var(--agency-accent-hover);
    color: #fff !important;
    transform: scale(1.05);
}
.chat-float-bubble i {
    font-size: 1.4rem;
}

/* Periodic double-bounce reminder (triggered every 15s via JS .animate class) */
@keyframes chat-bubble-double-bounce {
    0%, 100% { transform: translateY(0); }
    25%      { transform: translateY(-10px); }
    50%      { transform: translateY(0); }
    65%      { transform: translateY(-6px); }
    80%, 100% { transform: translateY(0); }
}
.chat-float-bubble.animate {
    animation: chat-bubble-double-bounce 1s ease-out both;
}
.chat-float-bubble.animate:hover {
    transform: translateY(0) scale(1.05);
}

.frontend-chat-panel {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 100%;
    max-width: 380px;
    max-height: 85vh;
    height: 520px;
    background: #fff;
    border: 1px solid var(--agency-border);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    z-index: 1060;
    display: flex;
    flex-direction: column;
    transform: translateX(calc(100% + 1rem));
    transition: transform 0.25s ease, visibility 0.25s ease;
    visibility: hidden;
    pointer-events: none;
}
.frontend-chat-panel.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* Chat backdrop: dim and blur background when chat is open */
.frontend-chat-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 1055;
    pointer-events: auto;
}

/* Focussed (centered) position: wider, centered modal-like window */
.frontend-chat-panel.chat-position-focussed {
    left: 50%;
    top: 50%;
    right: auto;
    width: 90%;
    max-width: 560px;
    height: 75vh;
    max-height: 640px;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
}
.frontend-chat-panel.chat-position-focussed:not(.open) {
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
}
.frontend-chat-panel.chat-position-focussed.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.frontend-chat-panel .chat-panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--agency-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}
.frontend-chat-panel .chat-panel-header-text {
    flex: 1;
    min-width: 0;
    padding-right: 0.5rem;
}
.frontend-chat-panel .chat-panel-header-tagline {
    font-weight: normal;
    line-height: 1.35;
}
.frontend-chat-panel .chat-panel-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.frontend-chat-panel .chat-panel-footer {
    padding: 1rem;
    border-top: 1px solid var(--agency-border);
    flex-shrink: 0;
}

/* Back to top – frontend: under (below) chat icon, left of it so it never covers chat; slightly transparent */
.back-to-top {
    position: fixed;
    /* Below and left of chat: chat at right 1.5rem / bottom 1.5rem; back-to-top under it, no overlap */
    bottom: 0.5rem;
    right: 5.25rem;
    width: 44px;
    height: 44px;
    background: rgba(18, 130, 255, 0.82);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 1040;
    box-shadow: 0 2px 10px rgba(18, 130, 255, 0.25);
    transition: background 0.2s, transform 0.2s, opacity 0.2s;
    opacity: 0;
    transform: translateY(12px);
}
.back-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}
.back-to-top:hover {
    background: rgba(10, 110, 230, 1);
    transform: translateY(-2px);
}

/* Payment page */
.payment-page {
    max-width: 600px;
    margin: 6rem auto 4rem;
    padding: 0 1rem;
}
.payment-page-inner {
    background: #fff;
    border: 1px solid var(--agency-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.payment-page-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}
.payment-form .form-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.payment-amount-row {
    margin-bottom: 1rem;
}
.payment-fee-summary {
    background: var(--agency-surface);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.payment-agree-row {
    margin-bottom: 1.25rem;
}
.payment-agree-row .form-check-label a {
    color: var(--agency-accent);
    text-decoration: underline;
}
.payment-agree-row .form-check-label a:hover {
    color: var(--agency-accent-hover);
}
.payment-email-row {
    margin-bottom: 1rem;
}
.payment-card-fields {
    margin-bottom: 1rem;
}
.payment-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.payment-submit {
    width: 100%;
    border-radius: 999px;
}

/* Terms and conditions page */
.terms-page {
    max-width: 720px;
    margin: 4rem auto 4rem;
    padding: 0 1rem;
}
.terms-page-inner {
    background: #fff;
    border: 1px solid var(--agency-border);
    border-radius: 16px;
    padding: 5rem 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.terms-page-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}
.terms-section {
    margin-bottom: 2rem;
}
.terms-section:last-child {
    margin-bottom: 0;
}
.terms-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.terms-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}
.terms-section p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--agency-text);
}
.terms-section ul {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

@media (min-width: 768px) {
    .p-md-5 {
        /* padding: 1rem !important; */
    }
}

.ai-style-change-1.rounded-4 {
    margin-top: 3rem;
}
