:root {
  --primary-color: #009c3b; /* Verde Bandeira (RGB: 0, 156, 59) */
  --primary-hover: #007d30;
  --primary-light: #4dbd76;
  --secondary-color: #ffdf00; /* Amarelo (RGB: 255, 223, 0) */
  --accent-color: #002776; /* Azul (RGB: 0, 39, 118) */
  --success-color: #10b981;

  --card-bg: #ffffff;
  --body-bg: #f8fafc;
  --header-bg: rgba(255, 255, 255, 0.85);

  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-on-primary: #ffffff;

  --border-color: #e2e8f0;
  --border-radius-lg: 32px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;

  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.08);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --header-height: 80px;
}

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--body-bg);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

body.bento-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(
      circle at 0% 0%,
      rgba(0, 156, 59, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(255, 223, 0, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(circle at 50% 50%, #f1f5f9 0%, #e2e8f0 100%);
}

.bento-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(160px, auto);
  gap: 24px;
  max-width: 1000px;
  width: 100%;
}

.bento-card {
  background: var(--card-bg);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 156, 59, 0.1);
}

/* Card Spans */
.col-span-2 {
  grid-column: span 2;
}
.col-span-4 {
  grid-column: span 4;
}
.row-span-2 {
  grid-row: span 2;
}

/* Special Brands & Accents */
.brand-box {
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.brand-logo {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.05));
  transition: var(--transition);
}

.bento-card:hover .brand-logo {
  transform: scale(1.05);
}

.login-box {
  background: #ffffff;
}

.info-box {
  background: var(--primary-color);
  color: white;
  border: none;
}

.info-box:hover {
  background: var(--primary-hover);
}

.info-box .bi {
  font-size: 2.5rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

.back-box {
  background: #ffffff;
  text-align: center;
  text-decoration: none;
  color: var(--text-muted);
}

.back-box i {
  transition: var(--transition);
}

.back-box:hover i {
  transform: translateX(-5px);
  color: var(--primary-color);
}

/* Form refinement */
.form-label {
  margin-bottom: 10px;
}

.form-control {
  background-color: #fbfbfd;
  border: 1.5px solid #e5e5e7;
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 16px;
  transition: var(--transition);
}

.form-control:focus {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 5px rgba(0, 156, 59, 0.1);
}

.btn-primary {
  background: var(--primary-color);
  border: none;
  border-radius: 16px;
  padding: 16px;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 4px 15px rgba(0, 156, 59, 0.2);
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 25px rgba(0, 156, 59, 0.3);
  transform: translateY(-2px);
}

/* Responsive Grid */
@media (max-width: 992px) {
  .bento-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .bento-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .col-span-2,
  .col-span-4,
  .row-span-2 {
    grid-column: span 1;
    grid-row: span 1;
  }
  .bento-card {
    padding: 24px;
    border-radius: 24px;
  }
  .login-box {
    padding: 32px 24px;
  }
}

/* Glassmorphism accent for cards */
.bento-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at top right,
    rgba(255, 255, 255, 0.4),
    transparent 70%
  );
  pointer-events: none;
}

/* Reveal Animation */
@keyframes bentoEntry {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bento-card {
  animation: bentoEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bento-card:nth-child(1) {
  animation-delay: 0.1s;
}
.bento-card:nth-child(2) {
  animation-delay: 0.2s;
}
.bento-card:nth-child(3) {
  animation-delay: 0.3s;
}
.bento-card:nth-child(4) {
  animation-delay: 0.4s;
}
.bento-card:nth-child(5) {
  animation-delay: 0.5s;
}

/* --- WEBSITE SPECIFIC STYLES --- */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- HEADER ARCHITECTURE (Multi-Tier & Glassmorphism) --- */

header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}

/* --- SCROLLED STATE (Shrink) --- */
header.site-header.scrolled .top-header {
  height: 0;
  opacity: 0;
  overflow: hidden;
  display: none !important;
}

header.site-header.scrolled .main-header {
  padding: 0.5rem 0;
  border-bottom: none;
}

header.site-header.scrolled .logo-center img {
  height: 75px;
}

/* header.site-header.scrolled .header-left,
header.site-header.scrolled .header-right {
	opacity: 0.1;
	pointer-events: none;
	transition: var(--transition);
} */

header.site-header.scrolled:hover .header-left,
header.site-header.scrolled:hover .header-right {
  opacity: 1;
  pointer-events: auto;
}

header.site-header.scrolled .nav-header {
  border-top: 1px solid var(--border-color);
}

/* 1. Top Bar */
.top-header {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  color: var(--text-main);
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

.top-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.top-social {
  display: flex;
  gap: 1.2rem;
}

.top-social a {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: var(--transition);
  text-decoration: none;
}

.top-social a:hover {
  color: var(--primary-color);
}

.top-actions {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

/* 2. Main Header */
.main-header {
  padding: 1.5rem 0;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.main-header .container {
  display: grid;
  grid-template-columns: 320px auto 320px;
  align-items: center;
}

.btn-boleto-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(241, 245, 249, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  transition: var(--transition);
  width: fit-content;
}

.btn-boleto-main:hover {
  background: white;
  box-shadow: var(--shadow-md);
}

.btn-boleto-main img {
  height: 35px;
}

.btn-boleto-main span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.logo-center {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.logo-center img {
  height: 75px;
  width: auto;
  transition: var(--transition);
}

.header-search {
  display: flex;
  justify-content: flex-end;
}

.search-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: rgba(241, 245, 249, 0.6);
  border: 1px solid var(--border-color);
  padding: 10px 0 10px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  transition: var(--transition);
}

.search-input:focus {
  background: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  outline: none;
}

.search-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  color: var(--primary-color);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

/* 3. Navigation Header */
.nav-header {
  background: transparent;
  transition: var(--transition);
}

.nav-header .container {
  display: flex;
  justify-content: center;
}

.nav-header nav.site-nav > ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-header nav.site-nav > ul > li {
  position: relative; /* Fix for dropdown center */
}

.nav-header nav.site-nav > ul > li > a {
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.nav-header nav.site-nav > ul > li > a:hover {
  color: var(--primary-color);
}

.nav-header nav.site-nav > ul > li > a.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

/* --- NAVIGATION DROPDOWNS --- */
.nav-header .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 260px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-xl);
  padding: 0.8rem 0;
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
  border: 1px solid var(--border-color);
  list-style: none;
  margin: 0;
}

.nav-header li.dropdown:hover .dropdown-menu,
.nav-header li.dropdown.show .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-header .dropdown-menu li a {
  display: block !important;
  padding: 0.7rem 1.5rem !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: var(--text-main) !important;
  text-decoration: none !important;
  transition: var(--transition);
}

.nav-header .dropdown-menu li a:hover {
  background: #f1f5f9;
  color: var(--primary-color) !important;
  padding-left: 2rem !important;
}

.nav-icon {
  font-size: 1.1rem !important;
  color: var(--text-muted);
  transition: var(--transition);
}

li.dropdown:hover .nav-icon,
li.dropdown.show .nav-icon {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.btn-associe {
  background: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--primary-color);
  transition: all 0.2s;
}

.btn-associe:hover {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--primary-color);
}

/* Adjust main content */
main.site-main {
  margin-top: 240px;
  padding-top: 2rem;
  transition: var(--transition);
}

/* Footer Styles */
footer.site-footer {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 5rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-logo img {
  height: 100px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.footer-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: white;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.site-social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.site-social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  transition: var(--transition);
  text-decoration: none;
}

.site-social-links a:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: #64748b;
}

.footer-bottom-link {
  color: #64748b;
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.footer-bottom-link:hover {
  color: white;
  border-bottom-color: var(--secondary-color);
}

.dev-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  transition: var(--transition);
  display: inline-block;
}

.dev-link:hover {
  transform: scale(1.1);
  filter: brightness(1.1);
  text-shadow: 0 0 10px rgba(241, 214, 0, 0.3);
}

/* Bento Grid System Extensions */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .container {
    padding: 0 1.5rem;
  }
}

/* --- MOBILE NAVIGATION --- */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary-color);
  padding: 0.5rem;
  cursor: pointer;
}

@media (max-width: 1024px) {
  header.site-header {
    position: fixed; /* Keep it fixed */
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .top-header {
    flex-wrap: wrap;
    height: auto !important;
    padding: 5px 0;
  }

  .top-social {
    gap: 1rem;
  }

  .top-social a {
    font-size: 1.3rem !important;
  }

  .btn-associe {
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  .main-header .container {
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
  }

  .header-left,
  .header-right {
    display: none; /* Occult on mobile main tier */
  }

  .logo-center img {
    height: 80px !important;
  }

  .nav-header {
    border-top: 1px solid var(--border-color);
  }

  .nav-header .container {
    justify-content: flex-end; /* Toggle button to the right */
    padding: 5px 1.5rem;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    display: none;
    border-top: 1px solid var(--border-color);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  .site-nav.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
  }

  .nav-header nav.site-nav > ul {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .nav-header nav.site-nav > ul > li {
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
  }

  .nav-header nav.site-nav > ul > li > a {
    padding: 15px 20px;
    width: 100%;
    justify-content: space-between;
    font-size: 0.9rem;
  }

  .nav-header .dropdown-menu {
    position: static !important;
    transform: none !important;
    left: auto !important;
    box-shadow: none;
    border: none;
    background: #f8fafc;
    display: none;
    width: 100% !important;
    opacity: 1;
    visibility: visible;
    padding: 0;
    margin: 0;
  }

  .nav-header li.dropdown.show .dropdown-menu {
    display: block;
  }

  .nav-header .dropdown-menu li a {
    padding: 12px 20px 12px 40px !important;
    border-bottom: 1px solid #edf2f7;
    color: var(--text-main) !important; /* Ensure visibility */
    display: block !important;
  }

  main.site-main {
    margin-top: 200px; /* Fixed for mobile header overlap (previously 140px) */
  }
}
