@layer pages {
    /* ==========================================================================
   SERVIÇOS WEB - PAGE SPECIFIC STYLES
   Extends: style-landingpage.css
   Version: 4.1 (Unified Wrapper & Deliverables)
   ========================================================================== */

    /* --------------------------------------------------------------------------
   1. CONFIGURAÇÃO BASE DAS SEÇÕES
   -------------------------------------------------------------------------- */
    .web-hero {
        min-height: 100vh;
        position: relative;
    }

    /* Transição suave/degradê do fundo do Hero (Paridade com index.html) */
    #main-content::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 200px;
        z-index: 5;
        background: linear-gradient(to bottom, rgba(244, 247, 249, 0) 0%, var(--bg-color) 100%);
        pointer-events: none;
    }

    html.dark-theme #main-content::after {
        background: linear-gradient(to bottom, rgba(26, 30, 38, 0) 0%, var(--bg-color) 100%);
    }

    .web-hero .hero-background-image {
        opacity: 0.8;
    }

    /* Seções Padrão (Fundo Sólido) */
    .web-benefits-section,
    .web-services-section,
    .web-anatomy-section,
    .deliverables-section {
        background-color: var(--bg-color);
        /* border-top removido para evitar divisão sólida (Paridade index.html) */
        position: relative;
        z-index: 1;
    }

    .web-benefits-section {
        border: none;
    }


    /* --------------------------------------------------------------------------
   2. INLINE STYLE REPLACEMENTS
   -------------------------------------------------------------------------- */

    /* margin-top inline do grid de benefits */
    .web-benefits-section .skills-grid-cards.high-end-grid {
        margin-top: 40px;
    }

    /* h4 e p dos benefit cards (substituem style inline) */
    .high-end-grid .skill-card h4 {
        margin-bottom: 10px;
    }

    .high-end-grid .skill-card p {
        font-size: 0.9rem;
        color: var(--secondary-text-color);
    }

    /* Lista de features nos service cards */
    .web-service-features {
        color: var(--secondary-text-color);
        margin-top: 15px;
        list-style: disc;
        padding-left: 20px;
    }

    /* margin-bottom inline do filters */
    .web-services-section .skills-filters {
        margin-bottom: 50px;
    }


    /* --------------------------------------------------------------------------
   3. PADRONIZAÇÃO DE CARDS
   -------------------------------------------------------------------------- */
    .web-benefits-section .skill-card {
        background-color: var(--container-bg-color) !important;
        border: 1px solid var(--border-color);
        box-shadow: var(--card-shadow);
        border-radius: 12px;
        padding: 30px 25px;
        height: 100%;
        transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 0;
    }

    .web-benefits-section .skill-card:hover {
        transform: translateY(-5px);
        border-color: var(--highlight-color);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .web-benefits-section .skill-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-bottom: 15px;
    }

    .web-benefits-section .skill-header h4 {
        margin: 0;
    }

    .web-benefits-section .skill-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: var(--highlight-color);
        margin: 0;
        width: auto;
    }

    /* Override do grid de .services-container para cards horizontais */
    .web-services-section .services-container {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .web-service-card {
        background-color: var(--container-bg-color);
        border: 1px solid var(--border-color);
        box-shadow: var(--card-shadow);
        border-radius: 12px;
        padding: 30px 25px;
        display: flex;
        flex-direction: row;
        gap: 30px;
        align-items: center;
        text-align: left;
        cursor: default;
        transition: transform 0.3s ease, border-color 0.3s ease;
        /* Reset de propriedades herdadas de .service-item (@layer components) */
        min-height: unset;
        justify-content: flex-start;
    }

    .web-service-card:hover {
        transform: translateY(-5px);
        border-color: var(--highlight-color);
    }

    .web-service-img-wrapper {
        flex: 0 0 200px;
        max-width: 200px;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .web-service-img-wrapper img {
        width: 100%;
        max-width: 180px;
        height: auto;
        border: none !important;
        border-radius: 0;
        opacity: 1;
        object-fit: contain;
        display: block;
        transition: transform 0.3s ease;
        background-color: transparent;
    }

    .web-service-card:hover .web-service-img-wrapper img {
        transform: scale(1.05);
    }

    html.dark-theme .web-service-card[data-category="lp"] .web-service-img-wrapper img {
        content: url('../../imagens/icons/lp-red.webp');
    }

    html.dark-theme .web-service-card[data-category="inst"] .web-service-img-wrapper img {
        content: url('../../imagens/icons/inst-red.webp');
    }

    html.dark-theme .web-service-card[data-category="sys"] .web-service-img-wrapper img {
        content: url('../../imagens/icons/sys-red.webp');
    }

    .web-service-content {
        flex: 1.5;
    }

    .web-service-card .service-header {
        justify-content: flex-start;
        align-items: flex-start;
    }

    @media (max-width: 768px) {
        .web-service-card {
            flex-direction: column !important;
            align-items: stretch;
        }

        .web-service-img-wrapper {
            width: 100%;
            max-width: none;
            margin: 0 auto 20px;
        }

        .web-service-img-wrapper img {
            height: auto;
            max-height: 200px;
            margin: 0 auto;
        }
    }


    /* --------------------------------------------------------------------------
   4. SEÇÃO ANATOMIA/ENGENHARIA
   -------------------------------------------------------------------------- */
    .web-anatomy-display {
        background-color: var(--container-bg-color);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        box-shadow: var(--card-shadow);
        position: relative;
        overflow: hidden;
        padding: 50px;
        min-height: 350px;
        display: flex;
        align-items: center;
        background-image: none !important;
    }

    .web-anatomy-display::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--highlight-color);
        opacity: 0.5;
        z-index: 0;
    }

    .web-anatomy-content {
        position: relative;
        z-index: 1;
        width: 100%;
    }

    .web-anatomy-content h3 {
        font-size: 2rem;
        margin-bottom: 0;
        color: var(--text-color);
    }

    .web-anatomy-content p {
        font-size: 1.1rem;
        line-height: 1.8;
        color: var(--secondary-text-color);
        text-align: center;
    }

    .web-anatomy-content .skill-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-bottom: 20px;
    }

    .web-anatomy-content .skill-icon {
        font-size: 2.2rem;
        margin-bottom: 0;
        color: var(--highlight-color);
    }

    .web-anatomy-section .process-nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }

    @media (max-width: 900px) {
        .web-anatomy-section .process-nav {
            flex-direction: row !important;
            flex-wrap: nowrap;
            justify-content: center !important;
            align-items: flex-start !important;
            width: 100%;
            gap: 15px;
            margin-bottom: 30px;
            overflow-x: auto;
            -ms-overflow-style: none;
            /* IE e Edge */
        }

        @supports (scrollbar-width: none) {
            .web-anatomy-section .process-nav {
                scrollbar-width: none;
            }
        }

        /* Fallback para Safari e versões do Chrome < 121 */
        .web-anatomy-section .process-nav::-webkit-scrollbar {
            display: none;
        }

        .web-anatomy-section .process-line {
            display: none;
        }

        .web-anatomy-section .process-step-btn {
            flex-direction: column;
            align-items: center;
            text-align: center;
        }
    }

    /* --------------------------------------------------------------------------
   5. SEÇÃO PRICING (Soluções & Escopo)
   -------------------------------------------------------------------------- */
    .pricing-section {
        background-color: var(--bg-color);
        border-top: 1px solid var(--border-color);
        position: relative;
        z-index: 1;
        padding: 80px 20px;
    }

    .pricing-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
        max-width: 900px;
        margin: 50px auto 0;
        align-items: stretch;
    }

    /* Card base */
    .pricing-card {
        background-color: var(--container-bg-color);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 32px 28px;
        display: flex;
        flex-direction: column;
        gap: 0;
        position: relative;
        transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        box-shadow: var(--card-shadow);
        overflow: hidden;
    }

    .pricing-card:hover {
        transform: translateY(-6px);
        border-color: var(--highlight-color);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    }

    /* Card destacado (Flow) */
    .pricing-card--featured {
        border-color: var(--highlight-color);
        box-shadow: 0 0 0 1px var(--highlight-color), 0 8px 30px rgba(var(--highlight-rgb), 0.15);
    }

    .pricing-card--featured:hover {
        box-shadow: 0 0 0 1px var(--highlight-color), 0 20px 50px rgba(var(--highlight-rgb), 0.25);
    }

    /* Card premium (Signature+) */
    .pricing-card--signature {
        background: linear-gradient(145deg, var(--container-bg-color) 0%, rgba(var(--highlight-rgb), 0.06) 100%);
    }

    /* Badge "Mais Popular" */
    .pricing-featured-badge {
        position: absolute;
        top: 0;
        right: 0;
        background: var(--highlight-color);
        color: #fff;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        padding: 5px 14px;
        border-bottom-left-radius: 10px;
    }

    /* Header do card */
    .pricing-card-header {
        margin-bottom: 24px;
    }

    .pricing-card-title {
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--text-color);
        margin: 0 0 8px;
        line-height: 1.2;
    }

    .pricing-card-subtitle {
        font-size: 0.88rem;
        color: var(--secondary-text-color);
        line-height: 1.6;
        margin: 0;
    }

    /* Checklist */
    .pricing-checklist {
        list-style: none;
        padding: 0 0 28px;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .pricing-checklist li {
        display: flex;
        align-items: baseline;
        gap: 8px;
        padding-left: 0;
        margin-bottom: 0;
        font-size: 0.9rem;
        color: var(--text-color);
        line-height: 1.4;
    }

    .pricing-checklist li i {
        flex-shrink: 0;
        color: #00c853;
        font-size: 0.75rem;
        margin-top: 0.15em;
    }

    .pricing-checklist li.inherited {
        color: var(--secondary-text-color);
        font-size: 0.8rem;
        font-style: italic;
        padding-bottom: 4px;
        border-bottom: 1px dashed var(--border-color);
        margin-bottom: 4px;
    }

    .pricing-checklist li.inherited i {
        color: var(--highlight-color);
        font-size: 0.75rem;
    }

    html.dark-theme .pricing-checklist li i {
        color: #00b341;
    }

    /* Bloco de preço + CTA */
    .pricing-footer {
        display: flex;
        flex-direction: column;
        gap: 16px;
        border-top: 1px solid var(--border-color);
        padding-top: 24px;
        margin-top: auto;
    }

    .pricing-price {
        display: flex;
        align-items: baseline;
        gap: 3px;
        line-height: 1;
    }

    .pricing-currency {
        font-size: 1rem;
        font-weight: 600;
        color: var(--secondary-text-color);
        margin-top: 4px;
    }

    .pricing-value {
        font-size: 2.4rem;
        font-weight: 800;
        color: var(--text-color);
        letter-spacing: -0.03em;
    }

    .pricing-cents {
        font-size: 1rem;
        font-weight: 500;
        color: var(--secondary-text-color);
        align-self: flex-end;
        margin-bottom: 4px;
    }

    .pricing-cta-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        background-color: var(--highlight-color);
        color: #fff;
        border-radius: 100px;
        padding: 12px 20px;
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
        box-sizing: border-box;
    }

    .pricing-cta-btn:hover {
        opacity: 0.9;
        transform: scale(1.02);
    }

    /* Responsivo */
    @media (max-width: 640px) {
        .pricing-grid {
            grid-template-columns: 1fr;
        }

        .web-stack-section {
            padding: 40px 20px;
        }
    }


    /* --------------------------------------------------------------------------
   6. SEÇÃO STACK / CTA (WRAPPER MODE)
   -------------------------------------------------------------------------- */
    /* Estilo base do Stack */
    .web-stack-section {
        text-align: center;
    }

    /* OVERRIDES PARA QUANDO ESTÁ DENTRO DO WRAPPER (Interactive) */
    .interactive-wrapper .web-stack-section,
    .interactive-wrapper .faq-section {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        position: relative;
        z-index: 5;
    }

    .interactive-wrapper .faq-section {
        padding-top: 80px;
        padding-bottom: 40px;
    }

    .interactive-wrapper .web-stack-section {
        padding-top: 40px;
        padding-bottom: 100px;
    }

    /* 7. UTILS & GRID */
    @media (min-width: 1024px) {
        .high-end-grid {
            grid-template-columns: repeat(4, 1fr) !important;
        }
    }

    /* --------------------------------------------------------------------------
   8. SEÇÃO: APLICAÇÕES WEB SOB MEDIDA
   -------------------------------------------------------------------------- */

    /* Wrapper reutiliza o padrão glassmorphism existente com ajuste de altura */
    .apps-section-wrapper {
        position: relative;
        z-index: 1;
        /* Gradiente de transição para fundir com a .pricing-section acima */
        padding-top: 2px;
    }

    .apps-section {
        position: relative;
        z-index: 5;
        padding: 80px 20px;
    }

    .apps-container {
        max-width: 1000px;
        margin: 0 auto;
        text-align: center;
    }

    /* Eyebrow monospace */
    .apps-eyebrow {
        font-family: 'Roboto Mono', monospace;
        font-size: 0.85rem;
        font-weight: 400;
        color: var(--highlight-color);
        letter-spacing: 0.05em;
        margin: 0 0 20px;
        opacity: 0.9;
    }

    /* Título */
    .apps-title {
        font-size: clamp(1.8rem, 4vw, 2.8rem);
        font-weight: 800;
        line-height: 1.25;
        color: var(--text-color);
        margin: 0 0 20px;
        letter-spacing: -0.02em;
    }

    .apps-title-highlight {
        color: var(--highlight-color);
    }

    /* Subtítulo */
    .apps-subtitle {
        font-size: 1rem;
        line-height: 1.7;
        color: var(--secondary-text-color);
        max-width: 640px;
        margin: 0 auto 60px;
    }

    /* Grid 2×2 */
    .apps-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        text-align: left;
        margin-bottom: 56px;
    }

    /* Card base */
    .app-card {
        background-color: var(--container-bg-color);
        border: 1px solid var(--border-color);
        border-radius: 14px;
        box-shadow: var(--card-shadow);
        overflow: hidden;
        display: flex;
        flex-direction: row;
        transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        position: relative;
    }

    .app-card:hover {
        transform: translateY(-5px);
        border-color: var(--highlight-color);
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
    }

    /* Barra vertical ciano (detalhe técnico) */
    .app-card-accent {
        flex: 0 0 4px;
        background: var(--highlight-color);
        opacity: 0.7;
        border-radius: 0;
        transition: opacity 0.3s ease;
    }

    .app-card:hover .app-card-accent {
        opacity: 1;
    }

    /* Corpo do card */
    .app-card-body {
        padding: 28px 24px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        flex: 1;
    }

    /* Ícone visual do card */
    .app-card-icon {
        color: var(--highlight-color);
        background-color: rgba(var(--highlight-rgb), 0.1);
        border: 1px solid rgba(var(--highlight-rgb), 0.2);
        border-radius: 8px;
        padding: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        margin-bottom: 4px;
    }

    .app-card-title {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-color);
        margin: 0;
        line-height: 1.35;
    }

    .app-card-desc {
        font-size: 0.875rem;
        color: var(--secondary-text-color);
        line-height: 1.6;
        margin: 0;
        flex: 1;
    }

    /* Tags de exemplo */
    .app-card-tags {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
        margin-top: 6px;
    }

    .app-tag {
        font-size: 0.72rem;
        color: var(--secondary-text-color);
        white-space: nowrap;
    }

    .app-tag-label {
        font-family: 'Roboto Mono', monospace;
        font-size: 0.65rem;
        color: var(--highlight-color);
        opacity: 0.8;
        margin-right: 3px;
    }

    .app-tag-sep {
        color: var(--border-color);
        font-size: 0.75rem;
        line-height: 1;
        margin: 0 1px;
        white-space: nowrap;
    }

    /* CTA Icon nos Cards */
    .app-card-cta-icon {
        position: absolute;
        bottom: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--surface-light);
        border: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--secondary-text-color);
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 1rem;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .app-card-cta-icon i {
        transition: transform 0.3s ease;
    }

    .app-card-cta-icon:hover {
        background: #25D366;
        /* WhatsApp Green */
        border-color: #25D366;
        color: white;
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    }

    .app-card-cta-icon:hover i {
        transform: scale(1.1);
    }

    /* Rodapé da seção */
    .apps-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 30px;
        border-top: 1px solid var(--border-color);
        padding-top: 36px;
        flex-wrap: wrap;
    }

    .apps-note {
        text-align: left;
        flex: 1;
        min-width: 200px;
    }

    .apps-note-title {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-color);
        margin: 0 0 4px;
    }

    .apps-note-desc {
        font-size: 0.875rem;
        color: var(--secondary-text-color);
        margin: 0;
        line-height: 1.5;
    }

    /* Responsivo: coluna única em mobile */
    @media (max-width: 640px) {
        .apps-grid {
            grid-template-columns: 1fr;
        }

        .apps-footer {
            flex-direction: column;
            align-items: flex-start;
            gap: 20px;
        }

        .apps-footer .cta-primary-pill {
            width: 100%;
            justify-content: center;
        }
    }
}