/* SEO Service Page Specific CSS */
.seo-service-page {
    --seo-primary: var(--lime-primary);
    --seo-dark: #0f172a;
    --seo-card-bg: rgba(255,255,255,0.02);
    --seo-border: rgba(255,255,255,0.05);
}

/* Hero Modifications */
.seo-hero-visual {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.seo-hero-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(146,244,37,0.15) 0%, rgba(15,23,42,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 0;
    animation: pulse-glow 6s infinite alternate;
}
@keyframes pulse-glow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.abstract-serp-ui {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.floating-search-icon {
    position: absolute;
    top: -20px;
    right: -60px;
    width: 300px;
    height: 300px;
    z-index: 10;
    pointer-events: none;
    animation: float-search 12s ease-in-out infinite alternate;
    filter: drop-shadow(0 10px 30px rgba(146, 244, 37, 0.15));
}
.floating-search-icon svg { 
    width: 100%; 
    height: 100%; 
    stroke: var(--lime-primary, #92f425) !important; 
}
.search-glass-lens {
    fill: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px) saturate(150%) brightness(1.1);
    -webkit-backdrop-filter: blur(4px) saturate(150%) brightness(1.1);
}
@keyframes float-search {
    0% { transform: translate(0, 0) rotate(-10deg) scale(1); }
    100% { transform: translate(-30px, 40px) rotate(15deg) scale(1.1); }
}

.serp-search-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}
.serp-search-bar svg {
    width: 20px;
    height: 20px;
    color: #64748b;
}
.typing-text {
    color: #0f172a;
    font-family: monospace;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    border-right: 2px solid var(--seo-primary);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 2s steps(15, end) forwards, blink-caret 0.75s step-end infinite;
}
@keyframes typing { from { width: 0 } to { width: calc(15ch + 6px); } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--seo-primary); } }

.serp-browser-window {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
    overflow: hidden;
    width: 100%;
    z-index: 1;
}
.browser-header {
    background: #f8fafc;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
}
.browser-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.browser-header .dot.red { background: #ff5f56; }
.browser-header .dot.yellow { background: #ffbd2e; }
.browser-header .dot.green { background: var(--lime-primary); }
.browser-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #f1f5f9; /* Slightly darker than header for contrast */
}

.serp-results-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.serp-card {
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}
.serp-card.rank-1 {
    border-color: rgba(146,244,37,0.3);
    background: rgba(15,23,42,0.9);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), inset 0 0 20px rgba(146,244,37,0.05);
    transform: scale(1.02);
    z-index: 2;
}
.serp-card.rank-2 { opacity: 0.6; transform: scale(0.98); }
.serp-card.rank-3 { opacity: 0.3; transform: scale(0.95); }

.card-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--seo-primary);
    margin-bottom: 12px;
}
.card-badge.subtle { color: #64748b; }

.card-skeleton-title {
    height: 12px;
    width: 70%;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    margin-bottom: 16px;
}
.rank-1 .card-skeleton-title { background: var(--seo-primary); width: 85%; }

.card-skeleton-desc {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    margin-bottom: 8px;
}
.card-skeleton-desc.line-1 { width: 100%; }
.card-skeleton-desc.line-2 { width: 60%; }

.metrics-overlay {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 16px;
}
.m-box {
    background: rgba(146,244,37,0.1);
    color: var(--seo-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.up-arrow { font-size: 14px; line-height: 1; }

.serp-chart-card {
    position: absolute;
    bottom: -20px;
    right: -40px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 16px;
    width: 220px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 5;
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    animation: float-chart 6s ease-in-out infinite alternate;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
@keyframes float-chart {
    0% { transform: perspective(1000px) rotateY(-10deg) rotateX(5deg) translateY(0); }
    100% { transform: perspective(1000px) rotateY(-10deg) rotateX(5deg) translateY(-10px); }
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.chart-title {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.chart-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--seo-primary);
}
.line-chart-svg {
    width: 100%;
    height: 40px;
    overflow: visible;
}
.chart-grid {
    stroke: rgba(255,255,255,0.05);
    stroke-width: 1;
    fill: none;
}
.chart-line {
    fill: none;
    stroke: var(--seo-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: draw-line 3s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.5s;
}
@keyframes draw-line {
    to { stroke-dashoffset: 0; }
}

/* ==========================================================================
   02. DIRECT ANSWER
   ========================================================================== */
.lime-section-seo-direct-answer {
    padding: 140px 0;
    background: #ffffff;
}

.direct-answer-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    margin-bottom: 100px;
}

.answer-heading {
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.horizontal-search-system {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.h-node {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.h-node-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #334155;
}

.h-node-accent {
    background: #0f172a;
    border-color: #0f172a;
}

/* ==========================================================================
   03. WHAT WE OPTIMIZE
   ========================================================================== */
.seo-system-architecture {
    position: relative;
    width: 100%;
    height: 700px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.02);
    overflow: hidden;
}

.system-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    background: #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 0 0 10px rgba(15,23,42,0.05);
}

.core-label {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-align: center;
}

.core-label span {
    color: var(--seo-primary);
    display: block;
}

.s-node {
    position: absolute;
    width: 220px;
    z-index: 5;
}

.s-node-box {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 20px;
    border-radius: 12px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.s-node-box h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #0f172a;
}

.s-node-box p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.system-connections {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.system-connections line {
    stroke: var(--seo-primary);
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
    opacity: 0.6;
}

@media (max-width: 1024px) {
    .seo-system-architecture {
        height: auto;
        padding: 40px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .system-connections { display: none; }
    .system-core {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 200px;
        height: 200px;
        margin-bottom: 20px;
    }
    .system-nodes {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        width: 100%;
    }
    .s-node {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: 100%;
    }
}
@media (max-width: 600px) {
    .system-nodes {
        grid-template-columns: 1fr;
    }
}

.h-node-accent .h-node-text {
    color: var(--seo-primary);
}

.h-line {
    flex-grow: 1;
    height: 2px;
    background: #e2e8f0;
    position: relative;
    margin: 0 16px;
}

.h-line::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 4px 0 4px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #94a3b8;
    animation: arrowMoveX 1.5s infinite ease-in-out;
}

@keyframes arrowMoveX {
    0%, 100% { transform: translate(0, -50%); }
    50% { transform: translate(6px, -50%); }
}

@media (max-width: 1024px) {
    .direct-answer-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 60px;
    }
    .answer-heading {
        font-size: 2.5rem;
    }
    .horizontal-search-system {
        flex-direction: column;
        gap: 24px;
    }
    .h-line {
        width: 2px;
        height: 30px;
        flex-grow: 0;
        margin: 0;
    }
    .h-line::after {
        right: 50%;
        top: auto;
        bottom: -4px;
        transform: translateX(50%);
        border-width: 6px 4px 0 4px;
        border-color: #94a3b8 transparent transparent transparent;
        animation: arrowMoveY 1.5s infinite ease-in-out;
    }
    
    @keyframes arrowMoveY {
        0%, 100% { transform: translate(50%, 0); }
        50% { transform: translate(50%, 6px); }
    }
}

@media (max-width: 1024px) {
    .seo-tech-layout, .seo-content-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .seo-why-grid {
        grid-template-columns: 1fr;
    }
}

/* MOTION PASS */
@media (prefers-reduced-motion: no-preference) {
    .seo-reveal {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .seo-reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    svg path {
        transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
    }
    
    .seo-draw-path {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    .seo-draw-path.is-visible {
        stroke-dashoffset: 0;
    }
    
    .seo-pop-node {
        opacity: 0;
        transform: scale(0.8);
        transform-origin: center;
        transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
    }
    .seo-pop-node.is-visible {
        opacity: 1;
        transform: scale(1);
    }
    
    .process-step {
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    .process-step.is-visible {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (min-width: 1025px) {
    .system-core {
        width: 280px;
        height: 280px;
    }
    .s-node {
        width: 250px;
    }
    .seo-system-architecture {
        height: 800px;
    }
    .seo-why-line-desktop {
        display: block !important;
    }
}

/* 14. Final CTA Background Image Update */
.lime-section-seo-cta {
    position: relative;
    background-image: url('../../images/services/seo/seo-final-cta-background.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
}

.lime-section-seo-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.73);
    z-index: 1;
}

.lime-section-seo-cta .lime-container {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .lime-section-seo-cta {
        background-position: 60% center !important;
    }
}

/* ========================================================================= */
/* DESKTOP GRID FALLBACKS (Removed from inline styles)
/* ========================================================================= */

.seo-tech-layout, .seo-content-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.seo-content-wide {
    grid-template-columns: 1.2fr 1fr;
}

/* ========================================================================= */
/* MOBILE RESPONSIVE OPTIMIZATIONS
/* ========================================================================= */

@media (max-width: 1024px) {
    .lime-container {
        padding-left: 24px;
        padding-right: 24px;
        box-sizing: border-box;
    }
    
    .seo-tech-layout, .seo-content-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .seo-tech-layout > *, .seo-content-layout > * {
        min-width: 0;
    }
    
    .seo-content-visual, .seo-authority-visual, .intent-funnel-ui {
        order: 2;
    }
    
    .lime-service-hero {
        padding: 60px 0;
    }
    
    .lime-hero-content {
        display: flex;
        flex-direction: column;
    }
    
    .lime-h1 {
        font-size: clamp(38px, 6vw, 48px);
        line-height: 1.05;
        text-wrap: balance;
        max-width: 14ch;
    }
    
    .horizontal-search-system {
        flex-direction: column;
        align-items: center;
        position: relative;
        gap: 24px;
    }
    
    .h-node {
        position: relative;
        width: 100%;
        max-width: 100%;
    }
    
    .seo-why-grid, .seo-process-grid, .faq-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .seo-feature-card, .seo-why-card, .faq-card {
        padding: 24px;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .lime-h1 {
        font-size: clamp(36px, 8vw, 42px);
    }
    .lime-h2 {
        font-size: clamp(28px, 6vw, 36px);
        text-wrap: balance;
    }
    
    .lime-btn-primary, .lime-btn-secondary {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        box-sizing: border-box;
    }
    
    .seo-reveal {
        transform: none !important;
        opacity: 1 !important;
    }
    
    .lime-header-logo img {
        max-width: 140px;
        height: auto;
    }
    .lime-menu-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .lime-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    .lime-h1 {
        max-width: none;
    }
}
