/* Reset e Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2e7d32;
  --secondary-color: #1976d2;
  --success-color: #388e3c;
  --warning-color: #f57c00;
  --danger-color: #d32f2f;
  --info-color: #1976d2;
  --light-color: #f5f5f5;
  --dark-color: #424242;
  --white: #ffffff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #fafafa;
  padding-top: 80px;
}

/* Header */
.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--primary-color) 0%, #1b5e20 100%);
  box-shadow: var(--shadow);
}

/* Ajustes para a Navbar em diferentes tamanhos de tela */
.navbar .container {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.navbar-brand h4 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-link {
  font-weight: 500;
  transition: var(--transition);
  border-radius: 6px;
  margin: 0 2px;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.navbar-toggler {
  border: none;
  padding: 4px 8px;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 160px);
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Hero Section */
.hero-section {
  padding: 3rem 0;
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.05) 0%, rgba(25, 118, 210, 0.05) 100%);
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
}

.hero-section h1 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.stats-cards {
  margin-top: 2rem;
}

.stat-card {
  background: var(--white);
  padding: 2rem 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(46, 125, 50, 0.1);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.stat-card i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.stat-card h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.stat-card p {
  color: #666;
  margin: 0;
  font-weight: 500;
}

/* Cards do Index - Versão Simplificada */
.main-buttons-index {
  margin-left: 400px;
  display: flex;
  justify-content: center;
}

.btn-main-card-index {
  display: block;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.btn-main-card-index::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(46, 125, 50, 0.1), transparent);
  transition: left 0.5s;
}

.btn-main-card-index:hover::before {
  left: 100%;
}

.btn-main-card-index:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
  color: inherit;
  text-decoration: none;
}

.card-icon-index {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--success-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.btn-main-card-index:hover .card-icon-index {
  transform: scale(1.05);
}

.card-icon-index.suap {
  background: linear-gradient(135deg, var(--secondary-color), var(--info-color));
}

.card-icon-index.assistencia {
  background: linear-gradient(135deg, #f57c00, #ff9800);
}

.card-icon-index.extensao {
  background: linear-gradient(135deg, #6a1b9a, #ab47bc);
}

.card-icon-index i {
  font-size: 2rem;
  color: var(--white);
}

.card-content-index h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 10px;
  text-align: center;
  line-height: 1.3;
}

.card-content-index p {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
  margin-top: 4px;
}

/* Classes de cores para ícones do index */
.icon-academico-index {
  color: var(--primary-color) !important;
}

.icon-financeiro-index {
  color: var(--secondary-color) !important;
}

.icon-assistencia-index {
  color: #f57c00 !important;
}

/* Responsividade para os cards do index */
@media (max-width: 1200px) {
  .main-buttons-index {
    margin-left: 300px;
  }
}

@media (max-width: 992px) {
  .main-buttons-index {
    margin-left: 200px;
  }

  .btn-main-card-index {
    padding: 1.5rem 1rem;
    min-height: 160px;
  }

  .card-icon-index {
    width: 60px;
    height: 60px;
  }

  .card-icon-index i {
    font-size: 1.8rem;
  }

  .card-content-index h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .main-buttons-index {
    margin-left: 0;
    padding: 0 15px;
  }

  .btn-main-card-index {
    min-height: 140px;
    padding: 1.25rem 0.75rem;
  }

  .card-icon-index {
    width: 50px;
    height: 50px;
    margin-bottom: 0.75rem;
  }

  .card-icon-index i {
    font-size: 1.5rem;
  }

  .card-content-index h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .btn-main-card-index {
    min-height: 120px;
    padding: 1rem 0.5rem;
  }

  .card-icon-index {
    width: 45px;
    height: 45px;
  }

  .card-icon-index i {
    font-size: 1.3rem;
  }

  .card-content-index h3 {
    font-size: 1rem;
  }
}

/* Main Buttons */
.main-buttons {
  margin-left: 400px;
}

/* Main Card Buttons tela academico */
.main-buttons-academico {
  justify-content: center;
  display: flex;
}

.btn-main-card {
  display: block;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  padding: 2.5rem 2rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.btn-main-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(46, 125, 50, 0.1), transparent);
  transition: left 0.5s;
}

.btn-main-card:hover::before {
  left: 100%;
}

.btn-main-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
  color: inherit;
  text-decoration: none;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--success-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 2;
}

.card-icon.suap {
  background: linear-gradient(135deg, var(--secondary-color), var(--info-color));
}

.card-icon i {
  font-size: 2.5rem;
  color: var(--white);
}

.card-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.card-content p {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.card-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
  display: block;
}

.card-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(46, 125, 50, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-main-card:hover .card-arrow {
  background: var(--primary-color);
  transform: scale(1.1);
}

.btn-main-card:hover .card-arrow i {
  color: var(--white);
}

.card-arrow i {
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: var(--transition);
}

/* Features Section */
.features-section {
  padding: 3rem 0;
}

.feature-card {
  background: var(--white);
  padding: 2rem 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.feature-card i {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.feature-card h5 {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

.feature-card p {
  color: #666;
  margin: 0;
  line-height: 1.6;
}

/* Page Header */
.page-header {
  padding: 2rem 0 3rem;
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.05) 0%, rgba(25, 118, 210, 0.05) 100%);
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
}

.page-header h1 {
  color: var(--primary-color);
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #666;
}

/* Indicator Cards */
.indicator-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.indicator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
  transition: left 0.3s;
}

.indicator-card.suap::before {
  background: linear-gradient(90deg, var(--secondary-color), var(--info-color));
}

.indicator-card:hover::before {
  left: 0;
}

.indicator-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.indicator-card.suap:hover {
  border-color: var(--secondary-color);
}

.icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.icon-evasao {
  color: #d32f2f;
  /* Vermelho */
}

.icon-eficiencia {
  color: #388e3c;
  /* Verde */
}

.icon-rap {
  color: #1976d2;
  /* Azul */
}

.indicator-card .card-title {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.indicator-card .card-text {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Chart Container */
.chart-container {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin: 3rem 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.chart-header {
  background: linear-gradient(135deg, var(--primary-color), var(--success-color));
  color: var(--white);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-header h4 {
  margin: 0;
  font-weight: 600;
}

.chart-header .btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
}

.chart-header .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.chart-content {
  padding: 0;
}

/* Info Section */
.info-section {
  padding: 3rem 0;
}

.info-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.info-card i {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.info-card h6 {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, #154218 100%);
  color: var(--white);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer h6 {
  color: var(--white);
  font-weight: 600;
}

.logo-footer {
  height: 100px;
  /* diminui o tamanho */
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  color: var(--white) !important;
}

/* Responsividade */
/* Logo do IFMT - Esconder em mobile */
@media (max-width: 768px) {
  body.image::before {
    display: none;
  }

  .main-buttons {
    margin-left: 0;
    padding: 0 15px;
  }
}

/* Ajustes específicos para mobile */
@media (max-width: 768px) {
  .btn-main-card {
    min-height: 200px;
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
  }

  .card-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
  }

  .card-icon i {
    font-size: 1.5rem;
  }

  .card-content h3 {
    font-size: 1.3rem;
  }

  .card-content p {
    font-size: 0.9rem;
  }

  .card-description {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .card-arrow {
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
  }

  .card-arrow i {
    font-size: 1rem;
  }
}

/* Para telas muito pequenas */
@media (max-width: 576px) {
  .btn-main-card {
    min-height: 180px;
    padding: 1.25rem 0.75rem;
  }

  .main-content {
    padding: 1rem 0;
  }

  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 1200px) {
  body.image::before {
    width: 280px;
    height: 280px;
    left: 30px;
  }
}

@media (max-width: 992px) {
  body.image::before {
    width: 220px;
    height: 220px;
    left: 20px;
  }
}

@media (max-width: 768px) {
  body.image::before {
    width: 180px;
    height: 180px;
    left: 15px;
    top: 40%;
  }
}

@media (max-width: 576px) {
  body.image::before {
    width: 140px;
    height: 140px;
    left: 10px;
    top: 35%;
  }
}

@media (min-width: 1400px) {
  .navbar .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    max-width: 1400px;
  }

  .navbar-nav {
    gap: 0.5rem;
    /* Reduz espaçamento entre itens do menu */
  }
}

/* Para telas muito grandes - ajuste mais fino */
@media (min-width: 1920px) {
  .navbar .container {
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    max-width: 1600px;
  }
}

/* Ajuste específico para a logo/brand */
.navbar-brand {
  margin-right: auto;
  /* Empurra o menu para a direita */
}

/* Otimização dos itens do menu */
.navbar-nav .nav-link {
  padding: 0.5rem 1rem;
  margin: 0 1px;
}

/* Para telas menores mantemos o padrão */
@media (max-width: 1399px) {
  .navbar .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .btn-main-card {
    padding: 2rem 1.5rem;
    min-height: 250px;
  }

  .card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
  }

  .card-icon i {
    font-size: 2rem;
  }

  .card-content h3 {
    font-size: 1.5rem;
  }

  .indicator-card {
    margin-bottom: 1rem;
  }

  .chart-header {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .value {
    font-size: 1.5rem;
  }

  .main-content {
    padding: 1rem 0;
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 70px;
  }

  .navbar-brand h4 {
    font-size: 1.2rem;
  }

  .navbar-brand small {
    font-size: 0.75rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .display-5 {
    font-size: 2rem;
  }

  .btn-main-card {
    min-height: 220px;
    padding: 1.5rem 1rem;
  }

  .stat-card {
    padding: 1.5rem 1rem;
  }

  .feature-card {
    padding: 1.5rem 1rem;
  }

  .info-card {
    padding: 1.5rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-section,
.btn-main-card,
.indicator-card,
.feature-card {
  animation: fadeInUp 0.6s ease-out;
}

.btn-main-card:nth-child(2) {
  animation-delay: 0.1s;
}

.indicator-card:nth-child(2) {
  animation-delay: 0.1s;
}

.indicator-card:nth-child(3) {
  animation-delay: 0.2s;
}

.feature-card:nth-child(2) {
  animation-delay: 0.1s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.2s;
}

/* Utility Classes */
.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Print Styles */
@media print {

  .header-fixed,
  .footer,
  .chart-header .btn {
    display: none !important;
  }

  body {
    padding-top: 0;
  }

  .main-content {
    padding: 0;
  }

  .btn-main-card,
  .indicator-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

body.home {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(to right, white, #008542);
  position: relative;
}

.chart-content iframe {
  width: 300px !important;
  height: 200px !important;
  min-height: unset !important;
  overflow: hidden;
}

body.image::before {
  content: '';
  position: absolute;
  top: 43.5%;
  left: 40px;
  transform: translateY(-50%);
  width: 350px;
  height: 350px;
  background-image: url('/images/logo-ifmt.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 1;
}