/* ==================================================
     servicos.css — Refactored for readability
     - Grouped sections: variables, layout, banner,
         streaming, highlights, icons, responsive
     - No visual behavior changed — only reformatting
 ================================================== */

/* -----------------------------
     Variables & container
     ----------------------------- */
:root {
    --max-width: 1200px;
    --accent: #0b5cff; /* original blue accent */
    --muted: #6b7280;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 18px;
}


/* -----------------------------
     Banner / Hero
     ----------------------------- */
.servicos-banner .banner-inner {
    position: relative; /* merged positioning and layout */
    display: flex;
    justify-content: center;
    align-items: center;
}

.servicos-banner img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.servicos-banner .banner-overlay {
    position: absolute;
    inset: 0;
}

.servicos-banner .banner-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.servicos-banner .banner-content h1 {
    color: #fff;
    font-size: 2rem;
    padding: 12px 18px;
}


/* -----------------------------
     Streaming section (cards)
     ----------------------------- */
.servicos-streaming h2 {
    font-size: 1.6rem;
    margin: 8px 0 16px;
    color: #111;
}

.streaming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

/* navigation buttons for streaming section (below the cards) */
.streaming-nav {
    margin-top: 18px;
}
.streaming-nav-inner{
    display:flex;
    justify-content:flex-end;
    gap:8px; /* reduced spacing */
    align-items:center;
}
.stream-nav-btn{
    background:transparent;
    border:0;
    padding:4px; /* small hit area */
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition:transform .12s ease, filter .12s ease;
    width:40px; /* smaller footprint */
    height:40px;
    border-radius:999px;
}
.stream-nav-btn:hover{transform:translateY(-2px);filter:brightness(.98)}
.stream-nav-btn svg{display:block;width:36px;height:36px}

/* visually indicate disabled state for nav buttons */
.stream-nav-btn[disabled], .stream-nav-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: default;
    transform: none !important;
    filter: none !important;
}

/* icons nav uses same layout as streaming nav */
.icons-nav {
    margin-top: 18px;
}
.icons-nav-inner{
    display:flex;
    justify-content:flex-end;
    gap:8px; /* match streaming spacing */
    align-items:center;
}
.icons-nav .stream-nav-btn{ /* reuse stream-nav-btn styles but scoped */
    background:transparent;
}

.stream-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    /* fluid height: the card will grow with the image inside */
}

/* image filling the card */
.stream-media {
    /* let the media element be in the normal flow so it determines
       the card height. Keep it positioned relative for overlays to
       align using absolute positioning inside the card. */
    position: relative;
    width: 100%;
    overflow: visible;
    display: block;
}

.stream-media img {
    /* don't crop images: scale to the card width and keep aspect ratio */
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* overlay content that sits on top of the image
     - uses pointer-events:none on the container so the
         button itself can still receive clicks via pointer-events:auto
*/
.stream-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 16px;
    pointer-events: none; /* allow children to opt-in */
}

.stream-category {
    align-self: flex-start;
    color: #111;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stream-title {
    margin: 0;
    color: #111;
    font-size: 1.15rem;
    font-weight: 800;
    padding: 8px 10px;
    border-radius: 8px;
    display: inline-block;
}

/* circular plus button (bottom-right) */
.btn-circle {
    position: absolute;
    right: 7%;
    bottom: 7%;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: #D9D9D9; /* requested color */
    color: #111; /* icon color via currentColor */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
    pointer-events: auto; /* enable clicks */
}

.btn-circle svg {
    display: block;
}

.btn-circle:hover {
    background: #CFCFCF;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* legacy / alternate small-button (kept for other sections) */
.btn-small {
    background: var(--accent);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(11, 92, 255, 0.18);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

/* kept selectors from previous layout in case other templates use them */
.stream-top {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 12px;
    font-weight: 700;
    color: #111;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
}

.stream-bottom {
    position: absolute;
    bottom: 12px;
    right: 12px;
    margin: 0;
}


/* -----------------------------
     Highlights section
     ----------------------------- */
.servicos-highlight {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.highlight-item {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.highlight-item.personalize{
    flex-direction: column-reverse;
}

.highlight-item.responsive{
    flex-direction: column;
}

.highlight-media {
    /* fluid sizing: allow the media column to scale with viewport
       clamp(min, preferred, max) keeps it within reasonable bounds */
    flex: 0 0 clamp(140px, 22vw, 320px);
}

.highlight-media img {
    /* scale fluidly with the container width while preserving aspect ratio */
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

.highlight-body{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 360px;
}

.highlight-body h3 {
    margin: 0 0 8px;
    font-size: 28px;
}

.highlight-body p {
    margin: 0 0 12px;
    color: var(--muted);
    text-align: center;
}

.btn-primary {
    border: solid 2px #FFBB00;
    padding: 10px 20px;
    border-radius: 5px;
    background: transparent;
    color: #FFBB00;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-primary:hover{
    background: #FFBB00;
    color: #ffffff;
}



/* -----------------------------
     Icons / Resources
     ----------------------------- */
.servicos-icons {
    margin-top: 40px;
}

.icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.icon-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    position: relative; /* allow absolutely positioned button */
}

.icon-svg {
    background: rgba(11, 92, 255, 0.06);
    padding: 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* fixed box so all icons appear same visual size */
    width: 72px;
    height: 72px;
}

/* Normalize svg size inside icon container so all svgs look consistent */
.icon-svg svg {
    width: 48px;
    height: 48px;
    display: block;
}

/* Align the small circular button to the right, vertically centered */
.icon-card .btn-small {
    width: 40px;
    height: 40px;
    margin-left: auto;
    background: #888888; /* requested background */
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

/* keep icon button svg sizing consistent */
.icon-card .btn-small svg {
    width: 20px;
    height: 20px;
}

/* Hover effect for icon-card small button: darker and slight lift */
.icon-card .btn-small:hover {
    background: #6f6f6f;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}

.icon-card h4 {
    margin: 0;
    font-size: 1rem;
}

.icon-card p {
    margin: 0;
    color: var(--muted);
    width: 250px;
}


/* -----------------------------
     Responsive tweaks
     ----------------------------- */
@media (max-width: 900px) {
    .servicos-highlight {
        grid-template-columns: 1fr;
    }

    .highlight-media img {
        /* at narrower breakpoints, image will still follow the flex-basis
           defined above (clamp), so keep img responsive */
        width: 100%;
        height: auto;
    }

    .stream-card {
        height: 320px;
    }

    .icons-nav{
        margin-top: 0;
    }

    .highlight-item{
        padding: 0;
    }
}

@media (max-width: 520px) {
    .stream-media {
        height: 120px;
    }

    .highlight-media {
        flex: 0 0 clamp(120px, 30vw, 220px);
    }

    .stream-card {
        height: 260px;
    }

    .stream-top {
        font-size: 0.95rem;
        padding: 6px 10px;
    }

    .btn-small {
        width: 36px;
        height: 36px;
    }
}

/* ==================================================
   Modal Styles
   ================================================== */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.service-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.service-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.service-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    z-index: 10000;
    transform: scale(0.96) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.service-modal.is-open .service-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.service-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 10001;
}

.service-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.service-modal-close svg {
    width: 20px;
    height: 20px;
    color: #333;
}

.service-modal-body {
    padding: 40px 32px;
}

.service-modal-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.3;
}

.service-modal-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 24px;
}

.service-modal-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.service-modal-link:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.service-modal-link:active {
    transform: translateY(0);
}

/* Blur no conteúdo de trás quando modal aberto */
body.modal-open {
    overflow: hidden;
}

body.modal-open main {
    filter: blur(4px);
    transition: filter 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .service-modal-content {
        max-width: 95%;
        margin: 20px;
    }
    
    .service-modal-body {
        padding: 32px 24px;
    }
    
    .service-modal-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
}

