/* ==========================================================================
   SERVICE DETAILS PAGE CSS (Apple-inspired Premium Dark Mode)
   ========================================================================== */

/* Page Level Adjustments */
body.service-page {
    background-color: var(--color-secondary);
    /* Removido o padding-top para que o hero encoste no topo da tela, atrás do header */
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.sd-hero {
    position: relative;
    width: 100%;
    min-height: 65vh; /* Aumentado um pouco para dar mais presença à foto */
    display: flex;
    align-items: flex-end;
    padding-top: 120px; /* Para o texto não conflitar com o header */
    padding-bottom: 4rem;
    overflow: hidden;
    margin-bottom: 0; /* Removido para colar na próxima sessão */
}

.sd-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Mudando de -1 para 1 para garantir que apareça, mas fique atrás do texto */
}

.sd-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.05); /* Slight scale for parallax effect */
    display: block; /* Garante que a tag img se comporte como bloco e preencha o espaço */
}

.sd-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradiente que começa leve no topo e vai para 100% preto no final, conectando com a sessão abaixo */
    background: linear-gradient(to bottom, rgba(7,7,7,0.3) 0%, rgba(7,7,7,0.8) 70%, var(--color-secondary) 100%);
    z-index: 2; /* Garante que fique exatamente sobre a imagem */
}

.sd-hero-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.03;
    pointer-events: none;
    z-index: 3;
}

.sd-hero-content {
    position: relative;
    z-index: 4; /* Texto principal deve ficar acima de tudo */
}

.sd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.sd-back-link:hover {
    color: var(--color-primary);
}

.sd-label {
    display: inline-block;
    color: var(--color-primary);
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.sd-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--color-white);
    line-height: 1.1;
    margin-bottom: 1rem;
    max-width: 800px;
}

.sd-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.5;
}

/* ==========================================================================
   DETAILS GRID & BENTO
   ========================================================================== */
.sd-details {
    padding: 2rem 0 6rem 0;
}

.sd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.sd-text-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sd-description-card {
    padding: 3rem;
}

.sd-description-card h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.sd-divider {
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin-bottom: 1.5rem;
}

.sd-description-card p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

.sd-cta-inline {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.primary-glow {
    position: relative;
    overflow: hidden;
}

.primary-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(242, 192, 31, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.sd-cta-inline h3 {
    font-size: 1.5rem;
    margin: 0;
}

.sd-cta-inline p {
    color: var(--text-muted);
    margin: 0 0 1rem 0;
}

.sd-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-primary);
    color: var(--color-secondary);
    padding: 12px 24px;
    border-radius: 100px;
    font-family: var(--font-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sd-btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(242, 192, 31, 0.3);
}

.sd-features-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.sd-feature-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.feature-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(242, 192, 31, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1.5rem;
}

.sd-feature-card h4 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.sd-feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   PROCESS TIMELINE
   ========================================================================== */
.sd-process {
    padding: 4rem 0 6rem 0;
}

.sd-section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.sd-section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.sd-section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.sd-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.sd-timeline-item {
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.sd-step-number {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(242, 192, 31, 0.2);
    position: absolute;
    top: 10px;
    right: 20px;
    line-height: 1;
}

.sd-step-content {
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
}

.sd-step-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.sd-step-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   GALLERY & CTA
   ========================================================================== */
.sd-gallery-cta {
    padding: 0 0 6rem 0;
}

.sd-gallery-wrapper {
    position: relative;
    width: 100%;
    min-height: 400px;
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-gallery-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    opacity: 0.4; /* Opacity down to make text readable */
}

.sd-gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sd-gallery-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem;
}

.sd-gallery-overlay h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 2rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.sd-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--color-white);
    color: var(--color-secondary);
    padding: 16px 36px;
    border-radius: 100px;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.sd-btn-primary:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE FIRST OPTIMIZATION)
   ========================================================================== */
@media (max-width: 1024px) {
    .sd-grid {
        grid-template-columns: 1fr;
    }
    
    .sd-timeline {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body.service-page {
        /* Padding top removido no mobile também */
    }

    .sd-hero {
        min-height: 50vh;
        padding-top: 100px;
        padding-bottom: 2rem;
    }

    .sd-description-card {
        padding: 2rem 1.5rem;
    }

    .sd-features-col {
        grid-template-columns: 1fr;
    }

    .sd-timeline {
        grid-template-columns: 1fr;
    }

    .sd-gallery-grid {
        grid-template-columns: 1fr;
    }

    .sd-gallery-img:nth-child(2) {
        display: none; /* Hide second image on mobile to focus on the CTA */
    }

    .sd-gallery-wrapper {
        min-height: 300px;
        border-radius: 20px;
    }

    .sd-btn-primary {
        padding: 14px 28px;
        font-size: 1rem;
    }
}
