/* =================================
   Paleta de Cores (ROOT)
   ================================= */
:root {
    --color-bg: #f4f7fb;

    --color-primary: #002060;
    /* azul principal */
    --color-primary-light: #004080;
    /* azul degradê / claro */
    --color-primary-dark: #000f4d;
    /* azul bem escuro para hover */

    --color-accent-red: #920808;
    /* detalhe/borda SINDSEB */

    --color-text-main: #333333;
    --color-text-muted: #555555;
    --color-text-light: #ffffff;

    --color-link: #0d6efd;
    --color-link-hover: #004080;

    --color-border-soft: #f0f0f0;
    --color-border-light: #e0e0e0;

    --shadow-strong: 0 5px 15px rgba(0, 0, 0, 0.3);
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.07);

    --radius-base: 8px;
}

/* =================================
   General Styles
   ================================= */
html,
body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--color-bg);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-bg);
    font-size: 1rem;
    /* levemente menor que o padrão */
    color: var(--color-text-main);
}

main {
    flex: 1 0 auto;
    padding: 2%;
    margin-top: 120px;
    background-color: var(--color-bg);
}

/* =================================
   Header Styles
   ================================= */
/* Desktop Header (Original) */
.header-main-page {
    position: fixed;
    top: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 100px;
    padding: 1%;
    z-index: 1000;
    box-shadow: var(--shadow-strong);
    border-bottom: 3px solid var(--color-accent-red);
}

/* Mobile Header (New Responsive) */
.mobile-header {
    position: fixed;
    top: 0;
    width: 100%;
    min-height: 80px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    padding: 0.5rem 1rem;
    z-index: 1000;
    box-shadow: var(--shadow-strong);
    border-bottom: 3px solid var(--color-accent-red);
}

.header-title {
    text-align: center;
}

.header-title h4 {
    color: var(--color-text-light);
    font-weight: bold;
    font-size: 1.5em;
    /* menor que o 1.5 original */
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.image-sindseb {
    height: 80px;
    width: auto;
    transition: all 0.3s ease;
}

.image-sindseb:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

/* Menu */
/* Menu Desktop */
.ul-header {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0;
    margin: 10px 0;
    justify-content: center;
}

/* Mobile Menu */
.ul-header-mobile {
    gap: 10px;
    padding: 0;
    margin: 0;
}

/* Ensure Logo stays visible and sized correctly */
.navbar-brand {
    padding: 0;
    margin-right: 0;
}

.image-sindseb-mobile {
    height: 60px;
    width: auto;
    transition: all 0.3s ease;
}

.image-sindseb {
    height: 80px;
    width: auto;
    transition: all 0.3s ease;
}

@media (max-width: 991.98px) {

    /* Navbar styles for mobile */
    .mobile-header .navbar-collapse {
        background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
        padding-bottom: 20px;
    }

    .ul-header-mobile {
        margin-top: 15px;
        text-align: center;
        gap: 5px;
    }

    .ul-header-mobile a {
        display: block;
        width: 100%;
    }
}

.ul-header li {
    padding: 5px;
}

.ul-header a {
    color: var(--color-text-light);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.ul-header a:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    box-shadow: 0 5px 15px rgba(0, 15, 77, 0.4);
    transform: translateY(-2px);
}

/* Header compacto ao rolar */
.header-main-page.compact {
    height: 60px;
    padding: 5px 20px;
    gap: 20px;
    transition: all 0.3s ease-in-out;
}

/* Some elementos grandes */
.header-main-page.compact .image-sindseb,
.header-main-page.compact .title-sindseb {
    display: none;
}

/* Menu centralizado quando compacto */
.header-main-page.compact .ul-header a {
    font-size: 1rem;
    padding: 6px 14px;
}


/* =================================
   Footer (Versão Profissional)
   ================================= */
.footer {
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-text-light);
    padding: 40px 0;
    border-top: 3px solid var(--color-accent-red);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.25);
}

.footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-left {
    max-width: 350px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.3));
}

.footer h5 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer .list-unstyled li,
.footer .list-unstyled a {
    font-size: 0.85rem !important;
}

.footer-org-name {
    margin: 0 0 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

.footer-rights {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.8;
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-links,
.footer-social {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-primary-dark);
}

.footer-social a {
    font-size: 1.1rem;
    color: var(--color-text-light);
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* Mobile */
@media (max-width: 768px) {
    .footer-wrapper {
        text-align: left;
        justify-content: flex-start;
        padding-left: 15px;
        /* Add some padding for better readability */
        padding-right: 15px;
    }

    .footer-right {
        align-items: flex-start;
        margin-top: 20px;
        /* Add spacing between sections */
    }

    .footer-links,
    .footer-social {
        justify-content: flex-start;
        /* Ensure links align start */
    }
}

/* =================================
   Content and Link Styles
   ================================= */
.content-main-page {
    text-align: center;
    margin-bottom: 40px;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

/* Hover de itens de sidebar quando passa o mouse na card-link */
.card-link:hover .sidebar-post-title {
    color: var(--color-primary-dark);
}

/* =================================
   Main Page - Featured Post
   ================================= */
.main-featured-post {
    background-color: #ffffff;
    border-radius: var(--radius-base);
    overflow: hidden;
    height: 100%;
}

.featured-image {
    width: 90%;
    height: 350px;
    object-fit: cover;
}

.featured-content {
    padding: 25px;
    text-align: left;
}

.featured-title {
    text-align: center;
}

.featured-title a {
    font-size: 1.6rem;
    /* menor que 2rem original */
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-title a:hover {
    color: var(--color-primary-dark);
}

.featured-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 15px 0;
}

/* "Continue Reading" links */
.continue-reading {
    font-weight: bold;
    color: var(--color-link);
    text-decoration: none;
    transition: all 0.3s ease;
}

.continue-reading:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* =================================
   Main Page - "More News" Section
   ================================= */
.latest-news-section {
    text-align: left;
}

.section-title {
    font-size: 1.5rem;
    /* menor que 1.8rem */
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border-soft);
    text-align: center;
}

.news-grid-card {
    background-color: #ffffff;
    border-radius: var(--radius-base);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.news-grid-card .card-img-top {
    height: 200px;
    object-fit: contain;
}

.news-grid-card .card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta-card {
    font-size: 0.8rem;
    color: #888;
}

.card-title-grid a {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title-grid a:hover {
    color: var(--color-primary-dark);
}

.card-text-grid {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    flex-grow: 1;
    margin-top: 10px;
    margin-bottom: 15px;
}

/* =================================
   News Detail Page Styles
   ================================= */
.news-detail-article {
    background-color: #fff;
    padding: 25px;
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border-light);
    justify-content: center;
    text-align: center;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.news-image {
    width: 98%;
    height: auto;
    object-fit: cover;
}

.news-content {
    font-size: 1rem;
    /* antes 1.1rem */
    line-height: 1.7;
    color: var(--color-text-main);
    text-align: justify;
}

/* =================================
   Sidebar
   ================================= */
.sidebar-widget {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-soft);
    border-top: 4px solid var(--color-accent-red);
}

.sidebar-title {
    font-size: 1.3rem;
    /* menor que 1.5rem */
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border-soft);
    text-align: left;
}

.sidebar-post-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.sidebar-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-widget a.card-link:hover .sidebar-post-item {
    background-color: #f9f9f9;
}

.sidebar-post-item img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.sidebar-post-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.sidebar-post-date {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
}

.sidebar-post-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--color-primary);
    line-height: 1.3;
    margin-bottom: 5px;
}

.sidebar-post-readmore {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-link);
}

/* =================================
   Responsive Styles
   ================================= */
/* Mobile Content Styles (Restored) */
@media screen and (max-width: 991.98px) {
    main {
        margin-top: 0px;
        /* significantly reduced gap as requested */
    }

    .news-detail-title {
        font-size: 1.8rem;
    }

    .news-detail-article {
        padding: 15px;
    }

    .news-meta {
        gap: 10px;
        font-size: 0.8rem;
    }

    .sidebar-widget {
        margin-top: 30px;
    }
}

/* =================================
   Hero Section
   ================================= */
.hero-section {
    position: relative;
    background: url("../images/logo-sindseb.e4fcc922bd11.png") no-repeat bottom center;
    background-size: 80% auto;
    background-attachment: fixed;
    color: var(--color-text-light);
    border-radius: var(--radius-base);
    padding: 120px 20px;
    text-align: center;
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 32, 96, 0.6);
    border-radius: var(--radius-base);
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* =================================
   CTA Section
   ================================= */
.cta-section {
    position: relative;
    background: url("../images/logo-sindseb.e4fcc922bd11.png") no-repeat bottom center;
    background-size: 70% auto;
    background-attachment: fixed;
    padding: 120px 20px;
    border-radius: var(--radius-base);
}

.cta-section .overlay-cta {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 32, 96, 0.8);
    border-radius: var(--radius-base);
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

/* =================================
   Testimonial Form Section
   ================================= */
.testimonial-form-section {
    background: none !important;
}

.testimonial-form-section .form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ced4da;
}

.testimonial-form-section .btn-primary {
    background-color: #003087;
    border-color: #003087;
}

.testimonial-form-section .btn-primary:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* CSS Variables for Colors and Themes - ADDED */
:root {
    --primary-color: #0056b3;
    --secondary-color: #f1c40f;
    --text-color: #333333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --footer-bg: #343a40;
    --footer-text: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.2);
    /* Colors from original might be needed if they used hardcoded hexes, 
       but we will override where possible or just let them coexist. */
}


/* Base Body Update */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: 'Exo 2', sans-serif;
}

/* --- NEW COMPONENT STYLES --- */

/* Carousel Caption Overlays */
.carousel-item {
    position: relative;
}

.carousel-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.carousel-caption-custom {
    position: absolute;
    right: 5%;
    bottom: 20px;
    left: 5%;
    z-index: 10;
    padding-top: 20px;
    padding-bottom: 20px;
    color: #fff;
    text-align: left;
}

.carousel-caption-custom h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption-custom p {
    font-size: 1.1rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .carousel-item::after {
        height: 80%;
    }

    .carousel-caption-custom h3 {
        font-size: 1.3rem;
    }

    .carousel-caption-custom p {
        font-size: 0.9rem;
    }
}

/* Glassmorphism / Caption Styles (Refined) */
.glass-caption {
    background: var(--card-bg);
    border: none;
    color: var(--text-color);
    text-shadow: none;
    position: relative;
    width: 100%;
    margin-bottom: 0 !important;
    border-radius: 0 0 8px 8px !important;
    padding: 20px;
    left: auto;
    bottom: auto;
}


/* Featured Image Carousel */
.featured-image-carousel {
    height: 600px;
    object-fit: cover;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .featured-image-carousel {
        height: 350px;
    }
}

/* Cards (Overrides) */
.card,
.news-grid-card,
.sidebar-widget {
    background-color: var(--card-bg);
    border: none;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
}

.news-grid-card:hover {
    transform: translateY(-5px);
}

/* Links */
a {
    color: var(--primary-color);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Dark mode (Removed) */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: #fff;
    padding: 15px;
    text-align: center;
    z-index: 10000;
    display: none;
    /* Hidden by default, shown by JS if no consent */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner.show {
    display: flex;
}

.cookie-banner p {
    margin: 0;
    font-size: 14px;
}

.cookie-banner button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
}

.cookie-banner button:hover {
    background-color: #45a049;
}