:root {
    --primary: #32349b;
    --secondary: #f9f9f9;
    --text: #202020;
    --white: #ffffff;
    --muted: #6b7280;
}

@font-face {
    font-family: "Rubik";
    src: url("../fonts/Rubik/Rubik/static/Rubik-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Rubik";
    src: url("../fonts/Rubik/Rubik/static/Rubik-Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Rubik";
    src: url("../fonts/Rubik/Rubik/static/Rubik-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html,
body,
input,
button {
    margin: 0;
    font-family: "Rubik", Arial, sans-serif;
    font-synthesis-weight: none;
}

body {
    background: #ececec;
    color: var(--text);
    font-family: "Rubik", Arial, sans-serif;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6,
p, a, span, li, small, label,
input, button, textarea, select {
    font-family: "Rubik", Arial, sans-serif;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.topbar {
    background: var(--primary);
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.topbar-content {
    width: min(1280px, 80%);
    margin: 0 auto;
    height: 54px;
    padding: 0 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    gap: 0.8rem;
}

.brand-row {
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    height: 100%;
}

.brand-logo {
    width: 88px;
    height: 100%;
    border-radius: 0;
    background: transparent;
    display: grid;
    place-items: center;
    text-decoration: none;
    position: relative;
    transition: background-color 0.18s ease;
}

.brand-logo img {
    max-width: 98px;
    max-height: 32px;
    width: auto;
    object-fit: contain;
}

.brand-logo--fundec {
    width: 124px;
}

.brand-logo--anglo {
    width: 74px;
}

.brand-logo--maxi {
    width: 96px;
}

.brand-logo--cep {
    width: 146px;
}

.brand-logo--unifadra {
    width: 154px;
}

.brand-logo .logo-color {
    display: none;
}

.logo-white.is-filtered {
    filter: brightness(0) invert(1);
}

.brand-logo:hover,
.brand-logo:focus-visible,
.brand-logo.is-active {
    background: #ffffff;
}

.brand-logo:hover .logo-white,
.brand-logo:focus-visible .logo-white,
.brand-logo.is-active .logo-white {
    display: none;
}

.brand-logo:hover .logo-color,
.brand-logo:focus-visible .logo-color,
.brand-logo.is-active .logo-color {
    display: block;
}

.top-links {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-right: 6px;
}

.top-links a {
    color: #f4f4f5;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.top-links a:hover {
    opacity: 0.8;
}

.secondary-nav {
    background: #ffffff;
    border-bottom: 3px solid #ff0a7a;
}

.secondary-nav-content {
    width: min(1280px, 80%);
    height: 56px;
    margin: 0 auto;
    padding: 0 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
}

.main-menu {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.main-menu a {
    color: #2a2f3a;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0;
    transform-origin: center;
    will-change: transform;
    transition: color 0.2s ease, transform 0.24s ease;
}

.main-menu > a:hover,
.submenu-trigger:hover {
    color: #32349b;
    transform: translateY(-1px) scale(1.08);
}

.main-menu > a:focus-visible,
.submenu-trigger:focus-visible {
    transform: translateY(-1px) scale(1.08);
}

.has-submenu:hover .submenu-trigger,
.has-submenu:focus-within .submenu-trigger {
    transform: translateY(-1px) scale(1.08);
}

.menu-item {
    position: relative;
}

.submenu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0;
}

.caret {
    width: 5px;
    height: 5px;
    border-right: 1.6px solid #5d6475;
    border-bottom: 1.6px solid #5d6475;
    transform: rotate(45deg) translateY(-1px);
    transform-origin: center;
    display: inline-block;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    margin-left: 2px;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 246px;
    background: #f3f4f6;
    border: 1px solid #d6d8df;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(35, 39, 47, 0.2);
    padding: 0.45rem 0;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.has-submenu::after {
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 10px;
}

.submenu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.39rem 0.82rem;
    font-size: 0.66rem;
    font-weight: 500;
    color: #3f3f46;
    white-space: nowrap;
}

.submenu a:hover {
    background: rgba(50, 52, 155, 0.06);
    color: #1f2a56;
}

.submenu .bullet {
    color: #3bb4d9;
    font-weight: 700;
    font-size: 0.68rem;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-submenu:hover .caret,
.has-submenu:focus-within .caret {
    transform: rotate(-135deg) translateY(0);
}

.search-form {
    display: flex;
    align-items: center;
    border: 1px solid #c4c8d2;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.search-form input {
    width: 184px;
    border: 0;
    outline: none;
    padding: 0.42rem 0.6rem;
    font-family: inherit;
    font-size: 0.66rem;
}

.search-form button {
    border: 0;
    background: #fff;
    border-left: 1px solid #d0d4de;
    height: 30px;
    width: 32px;
    cursor: pointer;
    font-size: 0.8rem;
}

.hero {
    background: var(--white);
}

.hero-slider {
    position: relative;
    aspect-ratio: 1920 / 766;
    min-height: 300px;
    overflow: hidden;
}

.slide {
    display: none;
    position: relative;
}

.slide.is-active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

.slide-caption {
    position: absolute;
    left: 7%;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    max-width: 520px;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

.slide-badge {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    color: #fff;
    margin-bottom: 1rem;
}

.slide-title {
    margin: 0 0 1.4rem;
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: 0.01em;
    font-size: clamp(1.5rem, 2.6vw, 2.5rem);
    text-transform: uppercase;
}

.slide-title .hl {
    color: #ffd23f;
}

.slide-title .xl {
    font-size: clamp(2.6rem, 4.8vw, 4.6rem);
    font-weight: 700;
}

.slide-title .md {
    font-size: clamp(1.1rem, 1.8vw, 1.7rem);
    letter-spacing: 0.06em;
}

.slide-caption p {
    margin: 0 0 1rem;
    font-size: clamp(1rem, 1.3vw, 1.25rem);
}

.btn-hero {
    display: inline-block;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    padding: 0.55rem 1.7rem;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-hero:hover {
    background: #ffffff;
    color: #32349b;
}

.btn-primary {
    background: #1976d2;
    color: var(--white);
    text-decoration: none;
    border-radius: 999px;
    padding: 0.65rem 1.2rem;
    display: inline-block;
}

.slider-dots {
    position: absolute;
    bottom: 14px;
    width: 100%;
    text-align: center;
}

.slider-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.slider-dots button.active {
    background: var(--white);
}

.units-section {
    background: var(--primary);
    color: var(--white);
    padding: 2.2rem 0 0.2rem;
}

h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(4, 276px);
    justify-content: center;
    gap: 1rem;
    margin-bottom: -42px;
    position: relative;
    z-index: 2;
}

.units-title {
    margin: 0;
    font-size: clamp(2rem, 2.4vw, 2.85rem);
    font-weight: 400;
    letter-spacing: 0;
    font-family: "Rubik", Arial, sans-serif;
}

.units-title strong {
    font-weight: 700;
}

.units-title-line {
    display: block;
    width: 174px;
    height: 2px;
    background: #5ba5ff;
    margin: 0.85rem 0 1.15rem;
}

.unit-card {
    text-decoration: none;
    color: #1f2937;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.unit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.2);
}

.unit-logo-box {
    background: #dbe3ed;
    width: 276px;
    height: 286px;
    display: grid;
    place-items: center;
    padding: 0;
}

.unit-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.24s ease, transform 0.24s ease;
}

.unit-card:hover .unit-logo-box img {
    filter: brightness(0.78);
    transform: scale(1.015);
}

.unit-card span {
    display: block;
    padding: 0.8rem 0.7rem;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    font-family: "Rubik", Arial, sans-serif;
}

.news-section {
    background: #ececec;
    padding: 5.2rem 0 2.2rem;
}

.links-section {
    background: #ffffff;
    padding: 5.2rem 0 2.2rem;
}

.news-title {
    margin: 0;
    font-weight: 400;
}

.news-title strong {
    font-weight: 700;
}

.news-title-line {
    display: block;
    width: 84px;
    height: 2px;
    background: #5ba5ff;
    margin: 0.7rem 0 1.2rem;
}

.links-title {
    margin: 0;
    font-weight: 400;
}

.links-title strong {
    font-weight: 700;
}

.links-title-line {
    display: block;
    width: 84px;
    height: 2px;
    background: #5ba5ff;
    margin: 0.7rem 0 1.2rem;
}

.news-carousel {
    position: relative;
}

.news-track-wrapper {
    overflow: hidden;
}

.news-track {
    display: flex;
    gap: 1.2rem;
    transition: transform 0.35s ease;
}

.news-card {
    flex: 0 0 calc((100% - 2.4rem) / 3);
    text-decoration: none;
    background: #f3f4f6;
    border-radius: 16px;
    overflow: hidden;
    min-height: 510px;
    display: flex;
    flex-direction: column;
}

.news-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-body {
    padding: 0.9rem 1rem 1rem;
    min-height: 290px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: background-color 0.22s ease, color 0.22s ease;
}

.news-body small {
    color: #6b7280;
    font-size: 0.82rem;
}

.news-body h3 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.32;
    color: #222a63;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-body p {
    margin: 0;
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-read-more {
    margin-top: 0.45rem;
    font-size: 0.9rem;
    color: #596086;
}

.news-card:hover .news-body {
    background: #3b3f9c;
}

.news-card:hover .news-body h3,
.news-card:hover .news-body p,
.news-card:hover .news-body small,
.news-card:hover .news-read-more {
    color: #f5f7ff;
}

.news-nav {
    position: absolute;
    bottom: -54px;
    width: 38px;
    height: 38px;
    border: 1px solid #d8dbe5;
    border-radius: 50%;
    background: #fff;
    color: #6d7392;
    font-size: 1.5rem;
    cursor: pointer;
}

.news-nav.prev {
    right: 52px;
}

.news-nav.next {
    right: 0;
}

.news-all-link {
    margin-top: 1.4rem;
    display: inline-block;
    color: #4d5377;
    text-decoration: none;
    font-size: 1.2rem;
}

.news-page,
.news-detail-page {
    width: min(1280px, 85%);
    margin: 2rem auto 3rem;
}

.news-page-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 1.2rem;
}

.news-detail-date {
    color: #6b7280;
    font-size: 1rem;
}

.news-detail-page h1 {
    margin: 0.7rem 0 1rem;
    color: #1f2a56;
    font-size: clamp(1.8rem, 2.2vw, 2.6rem);
}

.news-detail-text {
    color: #2c3243;
    font-size: 1.15rem;
    line-height: 1.75;
}

.related-news-section {
    margin-top: 2.2rem;
    padding-top: 1.8rem;
    border-top: 1px solid #d4d7e3;
    background: #eef1f8;
    padding: 1.8rem 0 1.25rem;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.related-news-inner {
    width: min(1280px, 90%);
    margin: 0 auto;
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 1rem;
}

.related-news-card {
    text-decoration: none;
    background: #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    color: #1f2a56;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.related-news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
}

.related-news-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.related-news-body {
    padding: 0.8rem;
}

.related-news-body small {
    color: #6b7280;
    font-size: 0.82rem;
}

.related-news-body h3 {
    margin: 0.3rem 0 0.35rem;
    font-size: 1.1rem;
    line-height: 1.3;
}

.related-news-body p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.4;
}

.detail-slider {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.detail-track {
    display: flex;
    transition: transform 0.35s ease;
}

.detail-slide {
    min-width: 100%;
}

.detail-slide img {
    width: 100%;
    height: clamp(300px, 35vw, 520px);
    object-fit: cover;
}

.detail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(16, 21, 49, 0.62);
    color: #fff;
    font-size: 1.7rem;
    cursor: pointer;
}

.detail-nav.prev {
    left: 10px;
}

.detail-nav.next {
    right: 10px;
}

.detail-thumbs {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.detail-thumbs button {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.detail-thumbs button.active {
    border-color: #3b3f9c;
}

.detail-thumbs img {
    width: 110px;
    height: 70px;
    object-fit: cover;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 1.1rem;
}

.links-grid a {
    background: var(--white);
    border: 1px solid #e2e4ec;
    border-radius: 10px;
    min-height: 96px;
    display: grid;
    place-items: center;
    padding: 0.6rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.links-grid img {
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
    transition: transform 0.22s ease, filter 0.22s ease;
}

.links-grid a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.16);
    background: #ffffff;
}

.links-grid a:hover img {
    transform: scale(1.03);
    filter: saturate(1.08) brightness(1.02);
}

.site-footer {
    background: var(--primary);
    color: var(--white);
    margin-top: 1.8rem;
    padding-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr 1.2fr;
    gap: 2rem;
    align-items: start;
}

.footer-logo {
    max-width: 250px;
    width: 100%;
    object-fit: contain;
}

.footer-brand-col p {
    margin: 0.9rem 0 1.1rem;
    max-width: 260px;
    color: #d6dbff;
    font-size: 0.92rem;
    line-height: 1.4;
}

.footer-qrcode {
    width: 130px;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
}

.footer-contact-col h4,
.footer-links-col h4 {
    margin: 0 0 0.65rem;
    font-size: 0.98rem;
    color: #9fb2ff;
}

.footer-contact-col p {
    margin: 0.18rem 0;
    font-size: 0.9rem;
    color: #ecedff;
}

.footer-socials {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.footer-socials a {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 7px;
    color: #fff;
    text-decoration: none;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links-col {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.footer-links-col a {
    color: #ecedff;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.35;
}

.footer-links-col a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 1.5rem;
    background: rgba(20, 22, 81, 0.95);
    padding: 0.62rem 0;
    text-align: center;
    font-size: 0.78rem;
    color: #f6f7ff;
}

@media (max-width: 900px) {
    .units-grid {
        grid-template-columns: repeat(2, minmax(240px, 276px));
        margin-bottom: -30px;
    }

    .news-page-grid,
    .links-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .related-news-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .news-card {
        flex-basis: calc((100% - 1.2rem) / 2);
    }

    .unit-logo-box {
        width: 100%;
        height: 286px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.6rem;
    }
}

@media (max-width: 560px) {
    .topbar-content {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        height: auto;
        min-height: 46px;
        width: 96%;
        padding: 0.2rem 0.4rem;
    }

    .brand-row {
        min-height: 36px;
        justify-content: center;
        flex-wrap: wrap;
        height: auto;
    }

    .brand-logo {
        width: 82px;
        height: 36px;
    }

    .brand-logo img {
        max-width: 70px;
        max-height: 22px;
    }

    .brand-logo--fundec {
        width: 94px;
    }

    .brand-logo--anglo {
        width: 58px;
    }

    .brand-logo--maxi {
        width: 72px;
    }

    .brand-logo--cep {
        width: 108px;
    }

    .brand-logo--unifadra {
        width: 118px;
    }

    .top-links {
        justify-content: flex-end;
        padding: 0 6px 4px;
    }

    .secondary-nav-content {
        width: 96%;
        height: auto;
        min-height: 52px;
        padding: 0.35rem 0.4rem;
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .main-menu {
        flex-wrap: wrap;
        gap: 0.65rem 0.9rem;
    }

    .main-menu a {
        font-size: 0.62rem;
    }

    .submenu {
        min-width: 210px;
    }

    .search-form {
        width: 100%;
    }

    .search-form input {
        width: 100%;
    }

    .units-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        margin-bottom: 0;
    }

    .units-title {
        font-size: clamp(1.7rem, 7vw, 2.2rem);
    }

    .units-title-line {
        width: 120px;
        margin: 0.65rem 0 0.9rem;
    }

    .news-page-grid,
    .links-grid {
        grid-template-columns: 1fr;
    }

    .related-news-grid {
        grid-template-columns: 1fr;
    }

    .news-card {
        flex-basis: 100%;
        min-height: 0;
    }

    .news-body h3 {
        font-size: 1.4rem;
    }

    .news-body p {
        font-size: 1rem;
    }

    .news-nav {
        bottom: -48px;
    }

    .unit-card {
        width: min(100%, 276px);
    }

    .unit-logo-box {
        width: 100%;
        height: 286px;
    }

    .news-section,
    .links-section {
        padding-top: 2.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: left;
    }
}
