/* =========================================================================
   SERVICE PAGE (service.html) — page-scoped styles, loaded only on the
   page-service.php template. Section background/text color is driven by
   the bg-light/bg-dark theme_mode classes (defined in style.css); defaults
   below match each block's registered default so the page renders
   pixel-identical to the original static service.html out of the box.
   ========================================================================= */

body.page-template-page-service section { padding: 90px 0; position: relative; }

h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; letter-spacing: -0.04em; margin-bottom: 30px; line-height: 1.1; }
.section-lead { font-size: 20px; max-width: 800px; margin-bottom: 60px; line-height: 1.6; }

.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.split-grid.align-top { align-items: flex-start; }

/* HERO */
.hero { height: 85vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; padding: 0; }
/* z-index was -1 — see home.css for why that breaks video compositing. */
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero .container { position: relative; z-index: 1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; filter: grayscale(0.2); }
/* Identical treatment to the header nav-pill's .header-bg-video (the
   confirmed-working implementation) — see home.css for the full rationale. */
.hero-bg-video-file { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.hero-bg-video-overlay { position: absolute; inset: 0; background: rgba(15, 15, 15, 0.72); z-index: 1; pointer-events: none; }
.hero-bg-video-poster { display: none; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; filter: grayscale(0.2); }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(8,8,8,0.2) 0%, var(--bg-dark) 100%); }

/* Mobile: never attempt the video, show the static poster instead — see
   .hero-bg-video-poster above for why. */
@media (max-width: 900px) {
    .hero-bg-video-file, .hero-bg-video-overlay { display: none; }
    .hero-bg-video-poster { display: block; }
}

/* Optional YouTube background video (service-hero.php bg_video_id) */
.hero-video-embed { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 1s ease; }
.hero-video-embed.is-loaded { opacity: 1; }
.hero-video-embed iframe {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100vw; height: 56.25vw;
    min-height: 100%; min-width: 177.78%;
}

.hero-container { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 1200px; padding: 0 20px; }

.hero h1 { font-size: clamp(36px, 5.5vw, 72px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 20px 0; line-height: 1.1; color: #fff; max-width: 1200px; word-wrap: break-word; }

@media (min-width: 768px) {
    .heading-nowrap { white-space: nowrap; }
}

.hero-subtext { font-size: clamp(14px, 1.5vw, 16px); font-weight: 400; color: rgba(255, 255, 255, 0.9); max-width: 600px; margin: 0 auto 40px auto; line-height: 1.6; }

.hero-btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 32px; border-radius: 4px;
    background: var(--accent); color: #fff; text-decoration: none;
    font-size: 15px; font-weight: 600; transition: all 0.3s ease; border: 1px solid var(--accent);
}
.hero-btn-primary:hover { background: transparent; color: var(--accent); }

.hero-btn-outline {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 32px; border-radius: 4px;
    border: 1px solid #ffffff; color: #ffffff; text-decoration: none;
    font-size: 15px; font-weight: 600; transition: all 0.3s ease; background: transparent;
}
.hero-btn-outline:hover { background: #ffffff; color: #000000; }

.btn-outline {
    display: inline-flex; align-items: center; justify-content: center; padding: 14px 36px; border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: rgba(255, 255, 255, 0.02); backdrop-filter: var(--glass);
    position: relative; z-index: 10;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(255, 255, 255, 0.05); transform: translateY(-3px); }

.btn-outline-dark {
    display: inline-flex; align-items: center; justify-content: center; padding: 14px 36px; border-radius: 100px;
    border: 1px solid rgba(0, 0, 0, 0.2); color: #000; text-decoration: none; font-size: 14px; font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: transparent; position: relative; z-index: 10;
}
.btn-outline-dark:hover { border-color: var(--accent); color: #fff; background: var(--accent); transform: translateY(-3px); }

/* Used with justify-content/gap inline overrides on the CTA parallax two-button row;
   display:flex wasn't declared in the original stylesheet, so add it here to make
   those inline properties actually take effect (matches index.html's own .hero-btns-wrapper). */
.hero-btns-wrapper { display: flex; gap: 15px; align-items: center; }

/* SLIDER & IMAGES */
.slideshow-container {
    position: relative; overflow: hidden; border-radius: var(--radius-lg); width: 100%; height: 100%; aspect-ratio: 4/5;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3); -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.slideshow-container .slide, .slideshow-container img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease-in-out; z-index: 1;
}
.slideshow-container .slide.active, .slideshow-container img { opacity: 1; z-index: 2; }

/* LISTS, GRIDS, TAGS */
.numbered-list { display: flex; flex-direction: column; gap: 24px; counter-reset: custom-counter; }
.list-item { position: relative; padding-left: 40px; }
.list-item::before {
    counter-increment: custom-counter; content: counter(custom-counter) "."; position: absolute; left: 0; top: 0;
    color: var(--accent); font-weight: 900; font-size: 18px;
}
.list-item h4 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.list-item p { font-size: 16px; line-height: 1.6; }

.hover-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 50px 0; }
.hover-card {
    aspect-ratio: 16/9;
    position: relative; overflow: hidden; border-radius: 0;
    cursor: pointer; background: var(--bg-card);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.2, 0, 0.2, 1);
    display: block;
}
.bg-light .hover-card { border: 1px solid rgba(0,0,0,0.1); }

.hover-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1); }
.hover-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.4s ease;
}
.hover-title {
    font-size: 28px; font-weight: 900; color: #fff; text-transform: uppercase; letter-spacing: 2px;
    transform: translateY(20px); transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1); text-align: center; padding: 20px;
}

.hover-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(233,157,177,0.15);
}
.hover-card:hover img { transform: scale(1.05); }
.hover-card:hover .hover-overlay { opacity: 1; }
.hover-card:hover .hover-title { transform: translateY(0); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; justify-content: center; }
.tag-pill {
    padding: 12px 24px; border-radius: 100px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; transition: 0.3s ease;
}
.tag-pill:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }

/* CASE STUDY VIDEO CARD & FADE SLIDER */
.video-card-section { padding: 60px 0 100px; position: relative; }

.cs-slider-container {
    position: relative; max-width: 1100px; margin: 0 auto;
    width: calc(100% - 160px);
}

.cs-slides-wrapper { position: relative; width: 100%; }

.video-card {
    background: var(--bg-card-solid); border-radius: var(--radius-lg); overflow: hidden; width: 100%; margin: 0 auto;
    box-shadow: 0 40px 80px rgba(0,0,0,0.15); color: #ffffff; border: 1px solid rgba(255,255,255,0.05);
}

.cs-slide {
    opacity: 0; position: absolute; top: 0; left: 0; width: 100%; pointer-events: none;
    transition: opacity 0.6s ease-in-out;
}
.cs-slide.active { opacity: 1; position: relative; pointer-events: auto; z-index: 2; }

.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; background: #000; }
.video-wrapper iframe, .video-wrapper img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }

.video-card-content { padding: clamp(30px, 5vw, 60px) clamp(20px, 6vw, 8%); }
.video-tags { display: flex; gap: 20px; margin-bottom: 20px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; }
.tag-accent { color: var(--accent); }
.tag-white { color: #ffffff; }
.video-card h3 { font-size: clamp(24px, 4vw, 36px); font-weight: 800; margin-bottom: 16px; color: #ffffff; letter-spacing: -0.02em; }
.video-card p { color: #a1a1a6; font-size: clamp(14px, 2.5vw, 18px); line-height: 1.6; max-width: 100%; }
.card-divider { border: none; border-top: 1px solid rgba(255, 255, 255, 0.1); margin: 30px 0; }

.cs-nav-btn {
    position: absolute;
    transform: translateY(-50%);
    width: 60px; height: 60px; border-radius: 50%;
    background: #0f0f11; color: #fff; border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: 0.3s; font-size: 24px; flex-shrink: 0; z-index: 10;
}
.cs-nav-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-50%) scale(1.1); }
.cs-prev { left: -80px; }
.cs-next { right: -80px; }

/* PROCESS GRID (service variant) */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 60px; }
.process-grid.flex-center { display: flex; flex-wrap: wrap; justify-content: center; }
.process-grid.flex-center > div { flex: 1 1 calc(33.333% - 24px); min-width: 300px; max-width: 400px; }

.process-card { border-radius: var(--radius-lg); padding: 40px; transition: 0.4s ease; }

.bg-light .process-card { background: #ffffff; border: 1px solid rgba(0,0,0,0.15); color: #1a1a1a; box-shadow: none; }
.bg-light .process-card:hover { transform: translateY(-10px); border-color: var(--accent); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.bg-light .process-card h3 { color: #000000; }
.bg-light .process-card p, .bg-light .process-card .text-muted { color: #4a4a4a; }

.bg-dark .process-card { background: var(--bg-card-solid); border: 1px solid rgba(255,255,255,0.05); color: #fff; }
.bg-dark .process-card:hover { transform: translateY(-10px); border-color: var(--accent); background: #151518; }

.process-card.dark-card {
    background: var(--bg-card-solid) !important; border: 1px solid rgba(255,255,255,0.05) !important; color: #fff !important; box-shadow: 0 20px 40px rgba(0,0,0,0.2) !important;
}
.process-card.dark-card:hover {
    transform: translateY(-10px) !important; border-color: var(--accent) !important; background: #151518 !important;
}
.process-card.dark-card h3 { color: #fff !important; }
.process-card.dark-card p, .process-card.dark-card .text-muted { color: rgba(255,255,255,0.7) !important; }

.process-icon {
    width: 50px; height: 50px; background: rgba(233, 157, 177, 0.1); color: var(--accent);
    border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px;
}
.process-icon svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.process-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 15px; }
.process-card p { font-size: 15px; line-height: 1.6; }

/* PRICING GRID */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 60px; align-items: stretch; }
.pricing-card {
    border-radius: var(--radius-lg); padding: 50px 40px; border: 1px solid rgba(0,0,0,0.1); background: #fff; color: #1a1a1a;
    display: flex; flex-direction: column; position: relative; overflow: hidden; transition: all 0.4s ease;
}
.pricing-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-color: var(--accent); }
.pricing-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; color: #1a1a1a; }
.pricing-card .price { font-size: 42px; font-weight: 900; margin-bottom: 20px; letter-spacing: -1px; color: #000; }
.pricing-card .price span { font-size: 20px; font-weight: 500; color: #666; }
.pricing-card .desc { font-size: 15px; color: #666; line-height: 1.6; margin-bottom: 30px; min-height: 50px; }
.pricing-divider { height: 1px; background: rgba(0,0,0,0.1); margin: 0 0 30px 0; width: 100%; }

.pricing-card.highlight { background: #0f0f11; color: #fff; border: none; transform: scale(1.05); box-shadow: 0 30px 60px rgba(0,0,0,0.2); z-index: 2; }
.pricing-card.highlight:hover { transform: scale(1.05) translateY(-10px); box-shadow: 0 40px 80px rgba(0,0,0,0.3); border-color: transparent; }
.pricing-card.highlight h3, .pricing-card.highlight .price { color: #fff; }
.pricing-card.highlight .price span, .pricing-card.highlight .desc { color: rgba(255,255,255,0.8); }
.pricing-card.highlight .pricing-divider { background: rgba(255,255,255,0.1); }

.pricing-list { list-style: none; padding: 0; margin: 0 0 40px 0; flex-grow: 1; }
.pricing-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; font-size: 15px; font-weight: 500; }
.pricing-list svg { width: 20px; height: 20px; flex-shrink: 0; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.pricing-card:not(.highlight) svg { stroke: var(--accent); }
.pricing-card.highlight svg { stroke: var(--accent); }

.pricing-card .btn-pricing {
    display: inline-block; width: 100%; text-align: center; padding: 16px; border-radius: 12px;
    font-size: 15px; font-weight: 700; text-decoration: none; transition: 0.3s ease; border: 2px solid;
}
.pricing-card:not(.highlight) .btn-pricing { background: transparent; color: var(--accent); border-color: var(--accent); }
.pricing-card:not(.highlight) .btn-pricing:hover { background: var(--accent); color: #fff; }
.pricing-card.highlight .btn-pricing { background: transparent; color: var(--accent); border-color: var(--accent); }
.pricing-card.highlight .btn-pricing:hover { background: var(--accent); color: #000; border-color: var(--accent); }

/* BENTO GRID FOR INSIGHTS (service sizing) */
.insights-grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: 280px; gap: 20px; }
.bento-card {
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius-lg);
    position: relative; overflow: hidden; padding: 30px; text-decoration: none; color: inherit; transition: 0.4s cubic-bezier(0.2, 0, 0.2, 1);
    z-index: 1; display: block;
}
.bento-card:hover { transform: translateY(-10px); border-color: var(--accent); background: rgba(255,255,255,0.06); }
.bento-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: 0.4; transition: 0.6s; }
.bento-card:hover .bento-img { opacity: 0.5; transform: scale(1.05); }
.bento-content { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; z-index: 2; pointer-events: none; }
.bento-title { font-size: 20px; font-weight: 800; margin: 0; line-height: 1.2; overflow-wrap: break-word; color: #fff; }

/* SERVICES — Blog-card-style caption (dark bar, white title, gray subtext, no pink). Used by both the homepage Services grid and the Services page overview grid. */
.services-card {
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius-lg);
    position: relative; overflow: hidden; text-decoration: none; color: inherit; transition: 0.4s cubic-bezier(0.2, 0, 0.2, 1);
    display: block;
}
.services-card:hover { transform: translateY(-10px); border-color: var(--accent); }
.services-card.wide { grid-column: span 2; }
.services-card.tall { grid-row: span 2; }

.services-card-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.services-card:hover .services-card-media { transform: scale(1.05); }

.services-card-caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 22px 20px;
    background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0.85) 20%, rgba(10,10,10,0.97) 42%, rgba(10,10,10,0.97) 100%);
}
.services-card-title { font-size: 20px; font-weight: 800; color: #fff; margin: 0 0 6px; line-height: 1.2; }
.services-card-subtext { font-size: 13px; color: rgba(255,255,255,0.6); margin: 0; line-height: 1.5; }

/* CONTACT — centered layout (Contact page): dark section, light form card, everything stacked/centered */
/* Widened 20% (640->768 / 480->576 / 560->672) so the block reads less cramped on the Contact page. */
.contact-centered-inner { max-width: 768px; margin: 0 auto; text-align: center; }
.contact-centered-head h2 { margin-bottom: 16px; }
.contact-centered-subtext { color: var(--text-muted); font-size: 18px; line-height: 1.6; max-width: 576px; margin: 0 auto; }

.contact-centered-card {
    background: #f7f5f2; border: none; padding: 48px; margin: 48px auto 0; max-width: 672px;
    text-align: left; z-index: 1;
}
.contact-centered-card:hover { transform: none; }
#contact .contact-centered-card label { color: #6b6b6b; }
.contact-centered-card select,
.contact-centered-card input,
.contact-centered-card textarea {
    background-color: #fff; color: #1a1a1a; border: 1px solid rgba(0,0,0,0.1);
}
.contact-centered-card select:focus,
.contact-centered-card input:focus,
.contact-centered-card textarea:focus { border-color: var(--accent); background-color: #fff; }
#contact .contact-centered-card input::placeholder,
#contact .contact-centered-card textarea::placeholder { color: rgba(26,26,26,0.4); }

.contact-centered-info { margin-top: 48px; }
.contact-centered-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.contact-centered-info ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 17px; color: var(--text-muted); }
.contact-centered-info a { color: var(--accent); text-decoration: none; font-weight: 600; }

@media (max-width: 600px) {
    .contact-centered-card { padding: 28px; }
}

/* FAQ SMOOTH ACCORDION */
.faq-item {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
    transition: all 0.3s ease;
}
.faq-item:hover { background: rgba(255,255,255,0.05); }
.faq-item.active { border-color: var(--accent); background: rgba(255,255,255,0.04); }
.faq-question {
    padding: 24px 30px; font-size: 20px; font-weight: 700; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; color: #ffffff; user-select: none;
}
.faq-icon { color: var(--accent); font-size: 28px; font-weight: 400; transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1); }
.faq-item.active .faq-icon { transform: rotate(45deg); }

.faq-answer-wrapper { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s cubic-bezier(0.2, 0, 0.2, 1); }
.faq-item.active .faq-answer-wrapper { grid-template-rows: 1fr; }
.faq-answer { overflow: hidden; }
.faq-answer p { padding: 0 30px 24px 30px; margin: 0; color: rgba(255,255,255,0.7); line-height: 1.6; }

/* PRE-FOOTER CTA (service variant: 100px + explicit dark text color) */
.pre-footer-cta { padding: 100px 0; color: #080808; }
.testi-arrow-wrapper { position: absolute; top: -50px; left: 50%; transform: translateX(-120%); width: 80px; height: 120px; z-index: 10; }
.testi-arrow-wrapper path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawArrow 2s cubic-bezier(0.4, 0, 0.2, 1) forwards; animation-delay: 0.5s; }

/* UTILITIES FOR MOBILE REORDER */
.sg-img { order: 0; }
.sg-text { order: 0; }

/* CTA PARALLAX SECTION */
.cta-parallax-section {
    position: relative; overflow: hidden; padding: 120px 0; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--bg-dark);
}
.parallax-bg { position: absolute; top: -30%; left: 0; width: 100%; height: 160%; z-index: 1; pointer-events: none; }
.parallax-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* CASES GALLERY — full-bleed edge-to-edge tile wall (Cases page) */
.cases-gallery { padding: 140px 0 0; background: var(--bg-dark); }

.cases-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 300px;
    grid-auto-flow: dense;
    gap: 4px;
}

.gallery-tile {
    position: relative;
    display: block;
    overflow: hidden;
    background: #000;
    grid-column: span 1;
    grid-row: span 1;
}
.gallery-tile.gt-2x2 { grid-column: span 2; grid-row: span 2; }
.gallery-tile.gt-1x2 { grid-column: span 1; grid-row: span 2; }
.gallery-tile.gt-2x1 { grid-column: span 2; grid-row: span 1; }

.gallery-tile-img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    filter: brightness(1) saturate(1);
    transition: filter 0.5s ease, transform 0.7s cubic-bezier(0.2, 0, 0.2, 1);
}
.gallery-tile-img--empty { background: linear-gradient(135deg, #1c1c1e, #0a0a0a); }

.gallery-tile-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
    padding: clamp(20px, 3vw, 40px);
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.25) 45%, transparent 75%);
    opacity: 0;
    transition: opacity 0.45s ease;
}

.gallery-tile-tag {
    color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
    transform: translateY(14px); transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}
.gallery-tile-title {
    color: #fff; font-size: clamp(18px, 2.2vw, 30px); font-weight: 900; letter-spacing: -0.01em; line-height: 1.15; margin: 0;
    transform: translateY(14px); transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1) 0.03s;
}

.gallery-tile:hover .gallery-tile-img { filter: brightness(0.4) saturate(0.9); transform: scale(1.045); }
.gallery-tile:hover .gallery-tile-overlay { opacity: 1; }
.gallery-tile:hover .gallery-tile-tag,
.gallery-tile:hover .gallery-tile-title { transform: translateY(0); }

/* Touch devices have no hover: keep a light permanent gradient + title so tiles stay identifiable. */
@media (hover: none) {
    .gallery-tile-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 60%);
    }
    .gallery-tile-tag, .gallery-tile-title { transform: translateY(0); }
    .gallery-tile-img { filter: brightness(0.75); }
}

.cases-gallery-empty { text-align: center; padding: 160px 20px; color: var(--text-muted); font-size: 18px; }

@media (max-width: 1100px) {
    .cases-gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; }
}

@media (max-width: 700px) {
    .cases-gallery { padding-top: 110px; }
    .cases-gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; gap: 3px; }
    .gallery-tile.gt-1x2 { grid-row: span 2; }
    .gallery-tile.gt-2x1 { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 480px) {
    .cases-gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
    .gallery-tile.gt-2x2, .gallery-tile.gt-2x1, .gallery-tile.gt-1x2 { grid-column: span 1; grid-row: span 1; }
}

/* SERVICES TILES — full-bleed editable bento grid (Services page). Grid
   mechanics ported from .cases-gallery-grid (dense, edge-to-edge, gt-*x*
   span classes); tile skin ported from .services-card (rounded corners,
   gradient caption, hover lift + accent border) instead of cases-gallery's
   square-edged hover-reveal treatment. */
.services-tiles { padding: 40px 0 0; background: var(--bg-dark); }
.services-tiles .container { padding-bottom: 60px; }

.services-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 300px;
    grid-auto-flow: dense;
    gap: 16px;
    padding: 0 clamp(20px, 4vw, 60px) 100px;
}

.services-tile {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    grid-column: span 1;
    grid-row: span 1;
    transition: 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}
.services-tile:hover { transform: translateY(-6px); border-color: var(--accent); }
.services-tile.gt-2x2 { grid-column: span 2; grid-row: span 2; }
.services-tile.gt-2x1 { grid-column: span 2; grid-row: span 1; }

.services-tile-media {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}
.services-tile:hover .services-tile-media { transform: scale(1.05); }
.services-tile-media--empty { background: linear-gradient(135deg, #1c1c1e, #0a0a0a); }

.services-tile-caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 22px 20px;
    background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0.85) 20%, rgba(10,10,10,0.97) 42%, rgba(10,10,10,0.97) 100%);
}
.services-tile-title { font-size: 20px; font-weight: 800; color: #fff; margin: 0 0 6px; line-height: 1.2; }
.services-tile-subtext { font-size: 13px; color: rgba(255,255,255,0.6); margin: 0; line-height: 1.5; }

@media (max-width: 1100px) {
    .services-tiles-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; }
}

@media (max-width: 700px) {
    .services-tiles-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; gap: 10px; padding: 0 20px 60px; }
    .services-tile-title { font-size: 17px; }
}

@media (max-width: 480px) {
    .services-tiles-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
    .services-tile.gt-2x2, .services-tile.gt-2x1 { grid-column: span 1; grid-row: span 1; }
}

/* BLOG PAGE — banner + category nav + infinite-scroll feed */
.blog-banner { padding: 160px 0 60px; }
.blog-banner-title { font-size: clamp(36px, 6vw, 68px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; margin: 10px 0 20px; }
.blog-banner-lead { font-size: 18px; color: var(--text-muted); max-width: 640px; margin: 0 auto; line-height: 1.6; }

.blog-feed-section { padding-top: 0; }

.blog-category-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 60px; }
.blog-category-pill {
    padding: 12px 26px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03); color: #fff; font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: 0.3s ease; font-family: inherit;
}
.bg-light .blog-category-pill { border-color: rgba(0,0,0,0.15); background: rgba(0,0,0,0.02); color: #1a1a1a; }
.blog-category-pill:hover { border-color: var(--accent); color: var(--accent); }
.blog-category-pill.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.blog-feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.blog-feed-card {
    display: block; text-decoration: none; color: inherit;
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius-lg);
    overflow: hidden; transition: 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}
.bg-light .blog-feed-card { background: #fff; border-color: rgba(0,0,0,0.08); box-shadow: 0 4px 20px rgba(0,0,0,0.04); }
.blog-feed-card:hover { transform: translateY(-8px); border-color: var(--accent); }

.blog-feed-card-img-wrap { aspect-ratio: 16/10; overflow: hidden; background: #000; }
.blog-feed-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.blog-feed-card-img--empty { background: linear-gradient(135deg, #1c1c1e, #0a0a0a); }
.blog-feed-card:hover .blog-feed-card-img { transform: scale(1.05); }

.blog-feed-card-body { padding: 26px; }
.blog-feed-card-tag { color: var(--accent); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; }
.blog-feed-card-title { font-size: 20px; font-weight: 800; line-height: 1.25; margin: 12px 0 10px; }
.blog-feed-card-excerpt { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0; }

.blog-feed-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 16px; }

.blog-feed-sentinel { display: flex; justify-content: center; padding: 60px 0 20px; min-height: 40px; }
.blog-feed-sentinel.is-done { padding: 20px 0; }
.blog-feed-spinner {
    width: 36px; height: 36px; border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--accent);
    border-radius: 50%; animation: bs-blog-spin 0.8s linear infinite;
}
.bg-light .blog-feed-spinner { border-color: rgba(0,0,0,0.1); border-top-color: var(--accent); }
@keyframes bs-blog-spin { to { transform: rotate(360deg); } }

@media (max-width: 1024px) {
    .blog-feed-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .blog-banner { padding: 130px 0 40px; }
    .blog-feed-grid { grid-template-columns: 1fr; }
    .blog-category-nav { gap: 8px; }
    .blog-category-pill { padding: 10px 18px; font-size: 12px; }
}

/* RESPONSIVE (service.html-specific breakpoints; header/footer handled globally) */
@media (max-width: 1300px) {
    .cs-prev { left: -50px; }
    .cs-next { right: -50px; }
}

@media (max-width: 1024px) {
    .split-grid { display: flex !important; flex-direction: column !important; gap: 40px !important; }
    .sg-img { order: 1 !important; margin-bottom: 0 !important; width: 100% !important; }
    .sg-text { order: 2 !important; text-align: left !important; width: 100% !important; }

    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-card.highlight { transform: none; box-shadow: none; grid-column: span 2; }
    .insights-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; }

    .cs-slider-container { width: calc(100% - 100px); }
    .cs-prev { left: -40px; }
    .cs-next { right: -40px; }
}

@media (max-width: 900px) {
    .hover-grid { grid-template-columns: 1fr; }
    .insights-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .cs-slider-container { width: calc(100% - 90px); }
    .cs-nav-btn { width: 40px; height: 40px; font-size: 18px; }
    .cs-prev { left: -45px; }
    .cs-next { right: -45px; }
}

@media (max-width: 600px) {
    .process-grid, .pricing-grid, .insights-grid { grid-template-columns: 1fr; gap: 40px; }
    .pricing-card.highlight { grid-column: auto; transform: none; }
    .process-grid.flex-center > div { flex: 1 1 100%; }
    .testi-arrow-wrapper { transform: translateX(-50%); top: -70px; }

    .cs-slider-container { width: calc(100% - 70px); }
    .cs-nav-btn { width: 36px; height: 36px; font-size: 16px; }
    .cs-prev { left: -35px; }
    .cs-next { right: -35px; }
}
