﻿/* ==========================================================================
   Page Full - Public Services CSS (Full-Width Responsive Design)
   ========================================================================== */

/* Prevenir rolagem horizontal e definir cor de fundo continua na pagina de servicos */
body.sf-services-page-active {
    background-color: #ffffff !important;
    overflow-x: hidden;
}

/* Reset total de espacamento do tema na pagina de servicos */
body.sf-services-page-active .entry-content,
body.sf-services-page-active .wp-block-post-content,
body.sf-services-page-active main,
body.sf-services-page-active .wp-site-blocks,
body.sf-services-page-active article,
body.sf-services-page-active .wp-block-group {
    max-width: 100% !important;
    width: 100% !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
}

body.sf-services-page-active .sf-footer {
    margin-top: 0 !important;
}

/* Ocultar titulos, cabecalhos e rodapés nativos do tema quando na pagina de servicos */
body.sf-services-page-active .wp-block-post-title,
body.sf-services-page-active .entry-title,
body.sf-services-page-active .page-title,
body.sf-services-page-active header.entry-header,
body.sf-services-page-active .entry-header,
body.sf-services-page-active h1.single-title,
body.sf-services-page-active .wp-block-query-title,
body.sf-services-page-active footer.wp-block-template-part,
body.sf-services-page-active .wp-block-template-part-footer,
body.sf-services-page-active footer.site-footer,
body.sf-services-page-active .site-footer {
    display: none !important;
}

/* Secao de Servicos */
.sf-services-section {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    padding: 70px 20px;
    background: #ffffff;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
    overflow-x: clip;
}

.sf-services-section::before {
    content: "";
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.sf-services-section::after {
    content: "";
    position: absolute;
    bottom: -200px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.sf-services-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header da seção */
.sf-services-header {
    text-align: center;
    margin-bottom: 50px;
}

.sf-services-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    color: #6366f1;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 16px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.sf-services-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.sf-services-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.sf-services-header p {
    font-size: 17px;
    color: #64748b;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid de Cards */
.sf-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

@media (max-width: 600px) {
    .sf-services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Card */
.sf-service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

.sf-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.1), 0 10px 20px -5px rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Media (imagem ou icon) */
.sf-service-card__media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-service-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.sf-service-card:hover .sf-service-card__media img {
    transform: scale(1.04);
}

.sf-service-card__media--icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #6366f1;
    opacity: 0.85;
}

/* Body */
.sf-service-card__body {
    padding: 24px 24px 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sf-service-card__title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.sf-service-card__short {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 12px 0;
    line-height: 1.55;
}

.sf-service-card__desc {
    display: none;
    font-size: 14px;
    color: #475569;
    line-height: 1.65;
    margin: 0 0 12px 0;
}

.sf-service-card__desc > *:first-child {
    margin-top: 0;
}

.sf-service-card__desc > *:last-child {
    margin-bottom: 0;
}

/* Botao toggle ver mais / ver menos */
.sf-service-card__toggle {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #6366f1;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    align-self: flex-start;
    transition: all 0.2s ease;
}

.sf-service-card__toggle:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.sf-service-card__toggle .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}

/* Estado vazio */
.sf-services-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.sf-services-empty .dashicons {
    font-size: 56px;
    width: 56px;
    height: 56px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.sf-services-empty h3 {
    font-size: 20px;
    font-weight: 700;
    color: #475569;
    margin: 0 0 6px 0;
}

.sf-services-empty p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsividade do header */
@media (max-width: 600px) {
    .sf-services-section {
        padding: 50px 16px;
    }
    .sf-services-header h2 {
        font-size: 28px;
    }
    .sf-services-header p {
        font-size: 15px;
    }
}

/* ==========================================================================
   Services Carousel (Infinite Loop)
   ========================================================================== */

.sf-services-carousel-header {
    text-align: center;
    margin-bottom: 40px;
}

.sf-services-carousel-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.sf-services-carousel-header p {
    font-size: 16px;
    color: #64748b;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.sf-services-carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 60px;
    max-width: 1320px;
    margin: 0 auto;
    box-sizing: border-box;
}

.sf-services-carousel-track {
    display: flex;
    gap: 28px;
    will-change: transform;
    user-select: none;
    padding: 10px 0;
    /* Garante que os cards sejam visíveis mesmo antes do JS carregar */
    transform: translateX(0);
}

.sf-services-carousel-item {
    flex: 0 0 350px;
    width: 350px;
    min-width: 350px;
    max-width: 350px;
    box-sizing: border-box;
}

.sf-services-carousel-item .sf-service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sf-services-carousel-item .sf-service-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sf-services-carousel-item .sf-service-card__short {
    flex: 1;
}

/* Botões de navegação */
.sf-services-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    color: #6366f1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transition: all 0.2s ease;
    z-index: 10;
}

.sf-services-carousel-btn:hover {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.sf-services-carousel-btn:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.sf-services-carousel-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.sf-services-carousel-btn--prev {
    left: 0;
}

.sf-services-carousel-btn--next {
    right: 0;
}

/* Dots de navegação */
.sf-services-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 0 60px;
}

.sf-services-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sf-services-carousel-dot:hover {
    background: #94a3b8;
    transform: scale(1.2);
}

.sf-services-carousel-dot.active {
    background: #6366f1;
    width: 24px;
    border-radius: 100px;
}

/* Responsividade do Carrossel */
@media (max-width: 1024px) {
    .sf-services-carousel-wrapper {
        padding: 0 50px;
    }

    .sf-services-carousel-item {
        width: 320px;
        min-width: 320px;
    }

    .sf-services-carousel-dots {
        padding: 0 50px;
    }
}

@media (max-width: 768px) {
    .sf-services-carousel-wrapper {
        padding: 0 40px;
    }

    .sf-services-carousel-item {
        width: 280px;
        min-width: 280px;
    }

    .sf-services-carousel-btn {
        width: 40px;
        height: 40px;
    }

    .sf-services-carousel-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    .sf-services-carousel-dots {
        padding: 0 40px;
    }
}

@media (max-width: 480px) {
    .sf-services-carousel-wrapper {
        padding: 0 16px;
    }

    .sf-services-carousel-item {
        width: 260px;
        min-width: 260px;
    }

    .sf-services-carousel-btn {
        display: none;
    }

    .sf-services-carousel-dots {
        padding: 0 16px;
    }
}

/* Animação de entrada dos cards */
@keyframes sf-carousel-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sf-services-carousel-item {
    animation: sf-carousel-fade-in 0.5s ease forwards;
}

.sf-services-carousel-item:nth-child(1) { animation-delay: 0ms; }
.sf-services-carousel-item:nth-child(2) { animation-delay: 50ms; }
.sf-services-carousel-item:nth-child(3) { animation-delay: 100ms; }
.sf-services-carousel-item:nth-child(4) { animation-delay: 150ms; }
.sf-services-carousel-item:nth-child(5) { animation-delay: 200ms; }
.sf-services-carousel-item:nth-child(6) { animation-delay: 250ms; }
.sf-services-carousel-item:nth-child(7) { animation-delay: 300ms; }
.sf-services-carousel-item:nth-child(8) { animation-delay: 350ms; }
.sf-services-carousel-item:nth-child(9) { animation-delay: 400ms; }
