/* Custom CSS Overrides for UTI dos Servidores - Branding Oficial & Grid Equalizer */
:root {
    --brand-blue: #0088FF;
    --brand-red: #D90429;
    --brand-dark-blue: #0A1128;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
}

body {
    background-color: var(--bg-white) !important;
    color: var(--text-dark) !important;
    font-family: 'Roboto', 'Inter', sans-serif !important;
    overflow-x: hidden !important;
}

/* Top Header Bar */
.top-header {
    background-color: #050814 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1000;
}

/* Original Cloudify Header Navigation Overlay behavior */
header.fixed {
    position: absolute !important;
    top: auto;
    left: 0;
    width: 100%;
    z-index: 999;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
}

/* When scrolling down, Cloudify JS adds .navbar-fixed-top to header */
header.fixed.navbar-fixed-top {
    position: fixed !important;
    top: 0 !important;
    background: #0A1128 !important; /* Brand Dark Blue Sticky Nav */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--brand-blue);
}

.navbar-brand {
    padding: 6px 0 !important;
    height: auto !important;
}

.navbar-brand img {
    max-height: 64px !important;
    width: auto !important;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .navbar-brand img {
        max-height: 52px !important;
    }
}

.nav > li > a {
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav > li > a:hover, .nav > li.active > a {
    color: var(--brand-blue) !important;
}

/* Flexbox Grid Fix to prevent float height misalignment */
.services-grid-row {
    display: flex !important;
    flex-wrap: wrap !important;
}

.services-grid-row > [class*='col-'] {
    display: flex !important;
    flex-direction: column !important;
}

/* Section Backgrounds */
.section-white {
    background-color: #FFFFFF !important;
    color: #1E293B !important;
    border-bottom: 1px solid #E2E8F0;
}

.section-brand-blue {
    background-color: #0088FF !important;
    color: #FFFFFF !important;
}

.section-light {
    background-color: #F1F5F9 !important;
    color: #1E293B !important;
    border-bottom: 1px solid #E2E8F0;
}

.section-dark {
    background-color: #0A1128 !important;
    color: #FFFFFF !important;
}

/* Buttons */
.btn-brand-red {
    background-color: var(--brand-red) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    padding: 12px 26px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-transform: uppercase !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-brand-red:hover {
    background-color: #b80322 !important;
    transform: translateY(-2px);
    color: #FFFFFF !important;
}

.btn-brand-blue {
    background-color: var(--brand-blue) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    padding: 12px 26px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-transform: uppercase !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 136, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-brand-blue:hover {
    background-color: #0070d6 !important;
    transform: translateY(-2px);
    color: #FFFFFF !important;
}

.btn-whatsapp-static {
    background-color: #25D366 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-transform: uppercase !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-whatsapp-static:hover {
    background-color: #1eb855 !important;
    transform: translateY(-2px);
    color: #FFFFFF !important;
}

/* Service Cards (Equal Height Flexbox) */
.service-card-white {
    background-color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 28px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
}

.service-card-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.service-card-white h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
    margin-top: 15px;
    margin-bottom: 12px;
}

.service-icon-wrapper-brand {
    width: 60px;
    height: 60px;
    background: rgba(0, 136, 255, 0.1);
    border: 1px solid rgba(0, 136, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--brand-blue);
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 32px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #FFF;
    background-color: #20ba5a;
}

/* Brand Logo Cards */
.brand-logo-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 15px 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    min-width: 140px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.brand-logo-card img {
    max-height: 38px;
    max-width: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.brand-logo-card:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 6px 20px rgba(0, 136, 255, 0.15);
    transform: translateY(-3px);
}

.brand-logo-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Video Player Formatting */
.video-wrapper-square {
    max-width: 480px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border: 1px solid #E2E8F0;
    background: #000;
}

.video-wrapper-square video {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* Mobile & Performance Optimizations */
@media (max-width: 768px) {
    /* Header & Navigation Mobile Fixes */
    header.fixed {
        position: relative !important;
        background: #0A1128 !important;
    }
    
    .navbar-collapse {
        background: #0A1128 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 10px;
        padding-bottom: 15px;
    }

    .navbar-collapse .nav > li > a {
        padding: 12px 20px !important;
        font-size: 15px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    /* Typography Scale for Mobile */
    h1 {
        font-size: 26px !important;
        line-height: 1.3 !important;
    }

    h2 {
        font-size: 22px !important;
        line-height: 1.3 !important;
    }

    h3 {
        font-size: 18px !important;
    }

    /* Hero Section Spacing on Mobile */
    .slider-content {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    .slider-content h2 {
        font-size: 26px !important;
    }

    .slider-content p {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    
    /* Buttons in Full Width on Mobile */
    .btn-brand-red, .btn-brand-blue, .btn-whatsapp-static, .btn-border, .btn-border-rev {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 16px !important;
        font-size: 13.5px !important;
        margin-bottom: 10px !important;
        display: flex !important;
        text-align: center !important;
    }

    /* Cards & Spacing */
    .service-card-white {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }

    .brand-logo-card {
        height: 60px !important;
        min-width: 110px !important;
        padding: 10px 15px !important;
    }

    .brand-logo-card img {
        max-height: 30px !important;
    }

    .video-wrapper-square {
        max-width: 100% !important;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 15px;
        right: 15px;
        font-size: 28px;
    }
}

/* Image Performance Rule */
img {
    max-width: 100%;
    height: auto;
    content-visibility: auto;
}

