/* =========================================================================
   PROCIV LAMEGO - PREMIUM CORPORATE THEME (JOOMLA 5 CASSIOPEIA)
   ========================================================================= */

:root {
  --prociv-navy: #15294a; /* Deeper, more premium navy */
  --prociv-blue: #004d99;
  --prociv-orange: #e65c00;
  --prociv-red: #cc2929;
  --prociv-grey-light: #f8f9fa;
  --prociv-text: #4a4a4a;
  --prociv-heading: #1e293b;
  --font-family-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --cassiopeia-font-family-body: var(--font-family-sans-serif);
}

body {
    background-color: var(--prociv-grey-light);
    color: var(--prociv-text);
    font-family: var(--font-family-sans-serif);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}


/* --- 1. TOPBAR (Dark Navy Strip) --- */
.container-topbar {
    background: linear-gradient(90deg, #112240 0%, #1a365d 100%) !important;
    background-image: linear-gradient(90deg, #112240 0%, #1a365d 100%) !important;
    color: #e2e8f0;
    padding: 0.6rem 0;
    font-size: 0.85rem;
     border-bottom: 3px solid var(--prociv-orange);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.container-topbar a {
    color: #cbd5e1;
    text-decoration: none;
    margin-right: 1.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.container-topbar a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

/* --- 2. MAIN HEADER (Premium White Background) --- */
.container-header {
    background-color: #ffffff !important;
    background-image: none !important;
    padding: 1.2rem 0;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08); /* Soft, elegant shadow */
    border-bottom: 1px solid #f1f5f9;
    
    top: 0;
    z-index: 1000;
}
.brand-logo img {
    max-height: 90px;
    transition: transform 0.3s ease;
}

.brand-logo img:hover {
    transform: scale(1.02);
}

/* Hide default site title if logo exists to avoid clutter */
.site-title {
    display: none;
}

/* --- 3. NAVIGATION MENU --- */
.container-header .mod-menu > li > a,
.container-header .nav > li > a {
    color: var(--prociv-navy) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0.8rem 1.2rem;
    margin: 0 0.2rem;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.container-header .mod-menu > li > a:hover,
.container-header .nav > li > a:hover {
    background-color: #f1f5f9;
    color: var(--prociv-blue) !important;
}

/* Dropdown Menu Styling */
.metismenu.mod-menu .mm-collapse {
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0;
    min-width: 220px;
}

.metismenu.mod-menu .mm-collapse > li > a {
    color: var(--prociv-text) !important;
    font-weight: 500;
    text-transform: none;
    padding: 0.6rem 1.5rem;
}

.metismenu.mod-menu .mm-collapse > li > a:hover {
    background-color: #f8fafc;
    color: var(--prociv-blue) !important;
    padding-left: 1.8rem;
}

/* --- 4. OCORRÊNCIAS BUTTON (Highlight) --- */
a[href*='ocorrencia'], a[href*='Ocorrencia'], a[title*='ocorrencia' i], li.item-438 > a {
    background: linear-gradient(135deg, #0D2B5E 0%, #E85D04 100%) !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    padding: 0.8rem 1.8rem !important;
    font-weight: 800 !important;
}

a[href*='ocorrencia']:hover, a[href*='Ocorrencia']:hover, li.item-438 > a:hover {
    background: linear-gradient(135deg, #E85D04 0%, #0D2B5E 100%) !important;
    color: #ffffff !important;
}


/* --- 5. HOMEPAGE ARTICLES & CARDS (Corporate Look) --- */
.blog-featured .items-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.item-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    padding: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #e2e8f0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.item-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--prociv-blue), var(--prociv-navy));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.item-content:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.item-content:hover::before {
    opacity: 1;
}

.item-image {
    margin-bottom: 0;
    background: #f1f5f9;
}

/* Make images perfectly sized for cards */
.item-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid #e2e8f0;
    transition: transform 0.5s ease;
}

.item-content:hover .item-image img {
    transform: scale(1.03);
}

.article-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.item-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--prociv-heading);
    line-height: 1.4;
    margin-bottom: 1rem;
    font-family: var(--font-family-sans-serif);
}

.item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.item-title a:hover {
    color: var(--prociv-blue);
}

.article-info {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

/* Style the default Joomla intro text slightly */
.item-content p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Read More Button - Corporate Pill */
.readmore .btn {
    background-color: transparent;
    color: var(--prociv-blue);
    border: 2px solid var(--prociv-blue);
    font-weight: 700;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.readmore .btn:hover {
    background-color: var(--prociv-blue);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 77, 153, 0.2);
}

/* Fix broken images sizing in articles */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Basic Footer Upgrade */
.container-footer {
    background-color: var(--prociv-navy);
    color: #cbd5e1;
    padding: 4rem 0;
    margin-top: 5rem;
    border-top: 4px solid var(--prociv-orange);
}


/* --- 6. USER FEEDBACK FIXES (Top Menu Visibility & Dropdown Hover) --- */

/* Fix invisible text in Topbar by forcing White color on all links */
.container-topbar a,
.container-topbar .nav-link,
.container-topbar .mod-menu > li > a {
    color: #ffffff !important;
    opacity: 0.9;
    font-weight: 600;
}

.container-topbar a:hover,
.container-topbar .nav-link:hover,
.container-topbar .mod-menu > li > a:hover {
    color: var(--prociv-orange) !important;
    opacity: 1;
}

/* Enable hover submenus for the Main Menu (Desktop) */
@media (min-width: 992px) {
    .container-header .mod-menu .dropdown:hover > .dropdown-menu {
        display: block !important;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        animation: fadeIn 0.3s ease;
    }
    .container-header .mod-menu .dropdown > .dropdown-menu {
        display: none; /* Keep hidden until hover */
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Robust Hover Dropdowns for Cassiopeia */
@media (min-width: 992px) {
    .container-header .mod-menu li:hover > ul,
    .container-header .mod-menu li:hover > .dropdown-menu,
    .container-header .nav-item.dropdown:hover > .dropdown-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 0 !important;
    }
}
.container-footer {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

.container-footer .grid-child {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: center !important;
}

.container-footer .mod-custom {
  width: 100% !important;
  max-width: 1400px !important;
}


.container-below-top {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

.container-below-top .grid-child {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

.header.container-header {
  overflow: visible !important;
}

.grid-child.container-below-top {
  overflow: visible !important;
  min-height: 500px !important;
}