﻿/* ======================================
 * 1. VARIÁVEIS E CONFIGURAÇÕES GLOBAIS
 * ====================================== */
:root {
    /* Cores base */
    --white: #ffffff;
    --gray-100: #f5f5f7;
    --gray-200: #e8e8ed;
    --gray-300: #d2d2d7;
    --gray-400: #bcbcc3;
    --gray-500: #8e8e93;
    --gray-600: #6e6e73;
    --gray-700: #4d4d53;
    --gray-800: #3a3a3c;
    --gray-900: #1d1d1f;
    --black: #000000;
    /* Esquema de cores personalizado */
    --orange: #EB5912;
    --orange-dark: #CF4700;
    --orange-light: #FF7842;
    --orange-subtle: #FFEEE8;
    /* Cores funcionais */
    --green: #34c759;
    --red: #ff3b30;
    --blue: #5ac8fa;
    --yellow: #ffcc00;
    --purple: #5856d6;
    --pink: #ff2d55;
    /* Mapeamento para Bootstrap */
    --primary: var(--orange);
    --secondary: var(--gray-500);
    --success: var(--green);
    --info: var(--blue);
    --warning: var(--yellow);
    --danger: var(--red);
    --light: var(--gray-100);
    --dark: var(--gray-900);
    /* Border radius */
    --border-radius: 10px;
    --border-radius-lg: 12px;
    --border-radius-sm: 8px;
    --border-radius-pill: 50rem;
    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    /* Focus */
    --focus-ring-width: 4px;
    --focus-ring-color: rgba(235, 89, 18, 0.25);
    /* Transições */
    --transition-base: all 0.2s ease;
    --transition-transform: transform 0.3s ease;
    --transition-shadow: box-shadow 0.3s ease;
    --facebook: #4267B2;
    --instagram: #C13584;
    --whatsapp: #25D366;
    --twitter: #1DA1F2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--gray-900);
    background-color: var(--gray-100);
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
}

    a:hover {
        color: var(--orange-dark);
    }

p {
    line-height: 1.6;
}

.section-title,
.section-header {
    margin-bottom: 2rem;
}

.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-subtle-primary {
    background-color: var(--orange-subtle) !important;
}

.bg-light {
    background-color: var(--light) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* --- Navegação --- */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    min-height: 80px; /* Altura mínima para acomodar logo de 68px + padding */
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    height: 68px; /* Altura específica para a logo */
    padding: 0;
}

    .navbar-brand img {
        height: 68px;
        width: auto;
    }

.nav-link {
    color: var(--gray-800);
    font-weight: 500;
    transition: var(--transition-base);
    padding: 0.5rem 1rem;
}

    .nav-link:hover {
        color: var(--primary);
    }

    .nav-link.active {
        color: var(--primary);
        font-weight: 600;
    }

.navbar-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

    .navbar-toggler:focus {
        box-shadow: none;
        outline: none;
    }

/* --- Botões --- */
.btn {
    font-weight: 500;
    letter-spacing: -0.01em;
    border-radius: var(--border-radius);
    padding: 0.6rem 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

    .btn:active {
        transform: scale(0.98);
    }

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

    .btn-primary:hover {
        background-color: var(--orange-dark);
        border-color: var(--orange-dark);
    }

    .btn-primary:focus,
    .btn-primary:active,
    .btn-primary.active,
    .btn-primary:not(:disabled):not(.disabled):active {
        background-color: var(--orange-dark) !important;
        border-color: var(--orange-dark) !important;
        box-shadow: 0 0 0 var(--focus-ring-width) var(--focus-ring-color) !important;
    }

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

    .btn-outline-primary:hover {
        background-color: var(--primary);
        border-color: var(--primary);
    }

    .btn-outline-primary:focus,
    .btn-outline-primary:active,
    .btn-outline-primary.active {
        background-color: var(--primary) !important;
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 var(--focus-ring-width) var(--focus-ring-color) !important;
    }

/* --- Formulários --- */
.form-control {
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 var(--focus-ring-width) var(--focus-ring-color);
    }

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-text {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    color: var(--gray-600);
}

/* --- Input Group --- */
.input-group {
    position: relative;
    border-radius: var(--border-radius);
    transition: box-shadow 0.2s ease;
}

    .input-group:focus-within {
        box-shadow: 0 0 0 var(--focus-ring-width) var(--focus-ring-color);
    }

        .input-group:focus-within .form-control,
        .input-group:focus-within .input-group-text,
        .input-group:focus-within .btn {
            border-color: var(--primary);
            box-shadow: none;
            z-index: 1;
        }

    .input-group .form-control:focus {
        box-shadow: none;
    }

    .input-group .form-control {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .input-group .btn {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

.input-group-text {
    background-color: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-700);
    transition: var(--transition-base);
}

.input-group:hover .form-control,
.input-group:hover .input-group-text,
.input-group:hover .btn {
    border-color: var(--gray-400);
}

/* --- Cards --- */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    overflow: hidden;
    height: 100%;
}

    .card:hover {
        box-shadow: var(--shadow);
        transform: translateY(-3px);
    }

.card-title {
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.card-img-top {
    position: relative;
    overflow: hidden;
}

    .card-img-top img {
        transition: transform 0.3s ease;
        width: 100%;
        height: auto;
        max-height: 340px;
        object-fit: cover;
        display: block;
    }

.card:hover .card-img-top img {
    transform: scale(1.03);
}

/* --- Badges --- */
.badge {
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 0.35em 0.65em;
}

/* --- Carrossel --- */
.carousel {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 300px;
}

.carousel-inner,
.carousel-item {
    height: 100%;
    position: relative;
}

    .carousel-item img {
        height: 300px;
        object-fit: cover;
        width: 100%;
    }

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--gray-400);
    opacity: 0.5;
    margin: 0 6px;
    transition: all 0.2s ease;
}

.carousel-indicators .active {
    background-color: var(--orange-light);
    opacity: 1;
    transform: scale(1.2);
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
    opacity: 0.7;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--orange-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    background-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-caption {
    bottom: 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 0;
}

    .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

/* --- Links --- */
.view-all {
    color: var(--primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

    .view-all i {
        margin-left: 0.5rem;
        transition: transform 0.2s ease;
    }

    .view-all:hover i {
        transform: translateX(3px);
    }

.read-more {
    color: var(--primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

    .read-more i {
        margin-left: 0.5rem;
        font-size: 0.8rem;
        transition: transform 0.2s ease;
    }

    .read-more:hover i {
        transform: translateX(3px);
    }

/* ======================================
 * 4. COMPONENTES PERSONALIZADOS
 * ====================================== */

/* --- Carrossel de Texto --- */
.text-carousel-section {
    background-color: var(--gray-200);
    padding: 2rem 0 4rem;
}

.text-carousel {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: var(--white);
    height: 300px;
}

.text-carousel-content {
    text-align: center;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.text-carousel-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.text-carousel-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
    font-weight: 700;
}

.text-carousel-content p {
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 1.25rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    /* Limitar a quantidade de linhas para evitar overflow */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Seção de Categorias --- */
.categories-section {
    background-color: var(--gray-200);
    padding: 3rem 0;
}

.category-item {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

    .category-item:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow);
    }

.icon-container {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.category-item h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.category-item .small {
    color: var(--gray-500);
}

/* --- Seção de Notícias --- */
.news-section {
    padding: 3rem 0;
}

/* Notícia em Destaque */
.news-featured {
    border: none;
    box-shadow: var(--shadow);
}

    .news-featured .card-title {
        font-size: 1.4rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .news-featured .card-text {
        margin-bottom: 1.5rem;
    }

/* Notícias Secundárias */
.news-secondary {
    margin-bottom: 0;
    transition: transform 0.2s ease;
}

    .news-secondary:hover {
        transform: translateX(5px);
    }

    .news-secondary .card-title {
        margin-bottom: 0.5rem;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 1.05rem;
        line-height: 1.3;
    }

    .news-secondary .card-body {
        padding: 1rem;
    }

    .news-secondary .read-more {
        font-size: 0.85rem;
    }

/* Componentes das Notícias */
.card-img {
    position: relative;
    overflow: hidden;
}

.category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.7rem;
    background: var(--gray-700);
    color: var(--white);
    float: right;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-date {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

/* --- Footer com Fundo Claro --- */
.footer-light {
    background-color: var(--gray-700);
    color: var(--white);
    padding: 3rem 0;
}

    .footer-light .footer-title {
        font-weight: 600;
        letter-spacing: -0.02em;
        color: var(--white);
        margin-bottom: 1.5rem;
    }

    .footer-light .footer-subtitle {
        font-weight: 600;
        color: var(--white);
        margin-bottom: 1.25rem;
    }

    .footer-light .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .footer-light .footer-links li {
            margin-bottom: 0.75rem;
        }

        .footer-light .footer-links a {
            color: var(--white);
            text-decoration: none;
            transition: color 0.2s ease;
            display: inline-flex;
            align-items: center;
        }

            .footer-light .footer-links a i {
                margin-right: 0.5rem;
                color: var(--primary);
            }

            .footer-light .footer-links a:hover {
                color: var(--primary);
            }

    .footer-light .social-icons {
        display: flex;
        gap: 0.75rem;
    }

    .footer-light .social-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background-color: var(--gray-200);
        color: var(--gray-700);
        transition: all 0.3s ease;
        text-decoration: none;
    }

        .footer-light .social-icon:hover {
            background-color: var(--primary);
            color: var(--white);
            transform: translateY(-3px);
        }

    .footer-light .footer-divider {
        border-color: var(--gray-200);
        margin: 2rem 0;
    }

    .footer-light .copyright {
        font-size: 0.9rem;
        color: var(--white);
        margin-bottom: 0;
    }

    .footer-light .legal-links {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        justify-content: flex-end;
        gap: 1.5rem;
    }

        .footer-light .legal-links li {
            display: inline-block;
        }

        .footer-light .legal-links a {
            color: var(--gray-600);
            text-decoration: none;
            font-size: 0.9rem;
            transition: color 0.2s ease;
        }

            .footer-light .legal-links a:hover {
                color: var(--primary);
            }

/* ======================================
 * 5. RESPONSIVIDADE
 * ====================================== */
@media (max-width: 767.98px) {
    .text-carousel-content {
        padding: 2rem 1.5rem;
    }

    .text-carousel-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .text-carousel-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .text-carousel-content p {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }

    .carousel-caption h2 {
        font-size: 1.2rem;
    }

    .carousel-caption p {
        display: none;
    }

    .carousel-caption .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .section-title {
        margin-bottom: 1.5rem;
    }

    .category-badge {
        display: inline-block;
        padding: 0.2rem 0.5rem;
        border-radius: 50px;
        font-size: 0.7rem;
        font-weight: 500;
        margin-left: 0.5rem;
    }

    .category-item {
        padding: 1rem;
    }

    .news-featured {
        margin-bottom: 1.5rem;
    }

        .news-featured .card-title {
            font-size: 1.25rem;
        }

    .news-secondary {
        margin-bottom: 0.5rem;
    }

        .news-secondary .card-title {
            font-size: 0.95rem;
        }

    .footer-light .footer-title,
    .footer-light .footer-subtitle {
        margin-bottom: 1rem;
    }

    .footer-light .legal-links {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 0.5rem;
    }

    .navbar-nav {
        padding-top: 0.5rem;
    }

    .navbar .btn {
        margin-top: 0.5rem;
    }

    .news-featured {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .carousel-caption h2 {
        font-size: 1.2rem;
    }

    .carousel-caption p {
        display: none;
    }

    .carousel-caption .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

.search-section {
    background-color: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.search-container {
    position: relative;
}

.search-input {
    height: 50px;
    padding-left: 48px;
    border-color: var(--gray-300);
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

    .search-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 0.25rem rgba(244, 128, 62, 0.25);
    }

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    z-index: 10;
}

.search-btn {
    height: 50px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    margin-left: 0.5rem;
    box-shadow: 0 2px 5px rgba(244, 128, 62, 0.2);
    transition: all 0.2s ease;
}

    .search-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(244, 128, 62, 0.3);
    }

.quick-links {
    margin-top: 1rem;
}

.quick-links-title {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.quick-link {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

    .quick-link:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

@media (max-width: 767.98px) {
    .search-btn {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}
