/* MODERN STYLE - IntelligentLogistics Theme
   Complete redesign with modern effects and styling
*/

/* ======= VARIABLES ======= */
:root {
  /* Color Palette - Modern & Clean */
  --primary: #3a36e0;
  --primary-rgb: 58, 54, 224;
  --primary-light: #6e6aff;
  --primary-dark: #2a26b0;
  --secondary: #00c8aa;
  --secondary-rgb: 0, 200, 170;
  --secondary-light: #66ffd9;
  --secondary-dark: #00957f;
  --dark: #1f2937;
  --dark-light: #52565c;
  --light: #f9fafb;
  --light-dark: #e5e7eb;
  --gray: #9ca3af;
  --warning: #fcd34d;
  --danger: #ef4444;
  --success: #10b981;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --font-mono: 'Roboto Mono', monospace;

  /* Sizing */
  --header-height: 80px;
  --container-max: 1280px;
  --border-radius: 12px;
  --border-radius-sm: 6px;
  --border-radius-lg: 24px;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ======= RESET & GLOBAL ======= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
  overflow-x: hidden;
}

/* ======= TYPOGRAPHY ======= */

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

button {
  cursor: pointer;
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1.5rem;
}

ul,
ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ======= UTILITY CLASSES ======= */
.text-center {
  text-align: center;
}

.text-gradient {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.stats-section {
  margin-top: 3rem;
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stats-counter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stats-label {
  color: var(--dark-light);
}

/* Team grid layout */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 380px);
  gap: 2rem;
  margin-bottom: 4rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* Team grid responsive improvements */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  justify-items: center;
}

.team-grid .team-card {
  max-width: 380px;
  width: 380px;
}

/* Para telas maiores, manter layout 3 colunas com largura fixa */
@media (min-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(3, 380px);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .team-grid .team-card {
    width: 380px;
    max-width: 380px;
  }
}

/* Container para os dois últimos cards centralizados */
.team-bottom-row {
  display: grid;
  grid-template-columns: repeat(2, 380px);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: center;
}

.team-bottom-row .team-card {
  width: 380px;
  max-width: 380px;
}

/* Team Card Styles */
.team-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  min-height: 380px;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-light);
}

.team-card-icon {
  position: relative;
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s ease;
}

.team-member-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.team-member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 0.5s ease;
  filter: brightness(1.1) contrast(1.05) saturate(0.95);
  opacity: 0;
  transform: scale(1.1);
}

.team-card:hover .team-member-photo img {
  opacity: 1;
  transform: scale(1);
}

/* Fallback para imagens que não carregam */
.team-member-photo img[src=""] {
  display: none;
}

.team-member-photo img[src=""]:after,
.team-member-photo:has(img[src=""])::after {
  content: "👤";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.8);
  z-index: 2;
}

/* Overlay para melhorar legibilidade */
.team-member-photo::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.3) 70%,
      rgba(0, 0, 0, 0.5) 100%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-card:hover .team-member-photo::after {
  opacity: 1;
}

.team-card-icon i {
  position: relative;
  z-index: 3;
  font-size: 3.5rem;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* On hover the member photo appears; hide the decorative icon underneath */
.team-card:hover .team-card-icon i {
  opacity: 0;
  transform: scale(0.9) translateY(-6px);
  pointer-events: none;
}

/* Efeito de brilho sutil */
.team-card-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 30%,
      rgba(255, 255, 255, 0.1) 50%,
      transparent 70%);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  z-index: 4;
}

.team-card:hover .team-card-icon::before {
  animation: shineEffect 2s ease-in-out;
}

@keyframes shineEffect {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }

  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.team-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.team-card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
  font-weight: 600;
}

.team-card-info {
  flex: 1;
}

.team-card-info p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.team-card-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
  padding-top: 1.25rem;
}

.team-social-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.team-social-link i {
  margin-right: 0.4rem;
}

.team-social-link:hover {
  color: var(--secondary);
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Avatar placeholder styles */
.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
}

.avatar-placeholder i {
  font-size: 4rem;
  opacity: 0.8;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Team grid responsive improvements */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.team-grid .team-card:nth-child(n+4) {
  margin-top: 0;
}

/* Mobile adjustments for team section */
@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .team-card {
    min-height: 340px;
    max-width: 100%;
    width: 100%;
  }

  .team-card-icon {
    height: 180px;
  }

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

  .avatar-placeholder i {
    font-size: 3rem;
  }

  .team-card-content {
    padding: 1.25rem;
  }

  .team-card-title {
    font-size: 1.25rem;
  }

  .team-card-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .team-social-link {
    justify-content: center;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
  }

  .team-social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
  }

  /* Make bottom team cards full-width and match the team-grid cards on mobile */
  .team-bottom-row {
    grid-template-columns: 380px;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
  }

  .team-bottom-row .team-card {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .team-card-icon {
    height: 160px;
  }

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

  .avatar-placeholder i {
    font-size: 2.5rem;
  }
}

.opacity-0 {
  opacity: 0;
}

.opacity-100 {
  opacity: 1;
}

.invisible {
  visibility: hidden;
}

.visible {
  visibility: visible;
}

/* ======= ANIMATIONS ======= */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-2rem);
  }

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

/* Scroll reveal: hide by default, reveal when .is-revealed is added by JS.
   This lets elements fade/slide in when they enter the viewport and hide
   again when they leave. */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(1rem);
  visibility: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.animate-on-scroll.is-revealed {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.animate-on-scroll.fade-in.is-revealed {
  animation: fadeIn 0.6s ease both;
}

.animate-on-scroll.slide-up.is-revealed {
  animation: slideInUp 0.6s ease both;
}

.animate-on-scroll.slide-right.is-revealed {
  animation: slideInRight 0.6s ease both;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ======= STATISTICS ======= */
.stats-section {
  margin-top: 3rem;
}

.stats-wrapper {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.counter-item {
  text-align: center;
}

.counter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.counter-label {
  color: var(--dark-light);
}

/* ======= BUTTONS & FORMS ======= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  border: none;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(100%);
  transition: transform var(--transition-normal);
  z-index: -1;
}

.btn:hover::before {
  transform: translateY(0);
}

.btn i {
  margin-right: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--dark);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
}

.btn-dark {
  background-color: var(--dark);
  color: white;
}

.btn-light {
  background-color: var(--light);
  color: var(--dark);
  border: 1px solid var(--light-dark);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-project {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--dark);
  background-color: var(--light);
  border: 1px solid var(--gray);
  border-radius: var(--border-radius);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(58, 54, 224, 0.25);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* ======= HEADER ======= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: all var(--transition-normal);
  height: var(--header-height);
}

.header.scrolled {
  --header-height: 60px;
  box-shadow: var(--shadow-md);
  background-color: rgba(255, 255, 255, 0.95);
}

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

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--dark);
}

.logo img {
  height: 40px;
  margin-right: 0.5rem;
}

.nav-desktop {
  display: flex;
  align-items: center;
}

.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 1rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--light-dark);
  color: var(--dark);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.lang-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-link {
  color: var(--dark-light);
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  background-color: white;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  z-index: 1001;
  overflow-y: auto;
}

.nav-mobile.active {
  transform: translateX(0);
}

.nav-mobile .logo {
  margin-bottom: 2rem;
}

.nav-mobile-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
}

.nav-mobile .nav-list {
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ======= HERO ======= */
.hero {
  position: relative;
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 5rem;
  background-image: radial-gradient(circle at top right, rgba(58, 54, 224, 0.1), rgba(0, 200, 170, 0.05));
  overflow: hidden;
}

.hero {
  display: flex;
  align-items: center;
  /* vertical center */
  justify-content: center;
  /* horizontal center */
  text-align: center;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 6rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/grid-pattern.svg');
  opacity: 0.1;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
  animation: slideInUp 1s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-subtitle {
  display: inline-block;
  background-color: rgba(58, 54, 224, 0.1);
  color: var(--primary);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--dark-light);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Partner logos (hero) */
.partner-logos {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.25rem;
}

.partner-logos a {
  display: inline-block;
}

.partner-logos img {
  height: 48px;
  max-width: 180px;
  object-fit: contain;
  filter: grayscale(0.2) contrast(0.95);
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
  opacity: 0.95;
}

.partner-logos img:hover {
  transform: translateY(-4px) scale(1.02);
  filter: none;
  opacity: 1;
}

.hero-image {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 45%;
  animation: fadeIn 1.5s ease 0.5s both;
}

/* Keep hero content centered and prevent overlap on large screens by constraining image */
@media (min-width: 1200px) {
  .hero-content {
    max-width: 900px;
  }

  .hero-image {
    right: 3rem;
    max-width: 420px;
  }

  .hero {
    padding-bottom: 8rem;
  }
}

/* ======= PROJECT SECTIONS ======= */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-alt {
  background-color: var(--light-dark);
}

.section-heading {
  position: relative;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  margin-top: 0.5rem;
}

.section-subtitle {
  color: var(--gray);
  font-size: 1.25rem;
  margin-top: 1rem;
}

.card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  height: 100%;
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--dark-light);
  margin-bottom: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  background-color: var(--light);
  border-top: 1px solid var(--light-dark);
}

/* ======= PROJECT RESOURCES - Modern Minimalist ======= */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1140px;
  margin: 2.5rem auto 0;
  align-items: start;
}

.resource-card {
  background: white;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--light-dark);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.resource-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.resource-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--primary-rgb), 0.15);
}

.resource-card:hover::after {
  opacity: 1;
}

.resource-card .card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem;
}

.resource-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
}

.resource-card:nth-child(2) .resource-card-icon {
  background: linear-gradient(135deg, #1f2937, #374151);
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.3);
}

.resource-card:nth-child(3) .resource-card-icon {
  background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
  box-shadow: 0 4px 14px rgba(var(--secondary-rgb), 0.3);
}

.resource-card .card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.resource-card .card-text {
  color: var(--gray);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.65;
}

.resource-links {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: auto;
  border-top: 1px solid var(--light-dark);
  padding-top: 1.25rem;
}

.resource-links li + li {
  border-top: 1px solid var(--light-dark);
}

.resource-links a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--dark-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.6rem 0;
  transition: color var(--transition-fast), gap var(--transition-fast);
}

.resource-links a:hover {
  color: var(--primary);
  gap: 0.85rem;
}

.resource-links a i {
  font-size: 0.95rem;
  color: var(--primary);
  opacity: 0.6;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

.resource-links a:hover i {
  opacity: 1;
}

.repo-actions {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--light-dark);
}

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

.resource-links i {
  margin-right: 0.5rem;
}

/* ======= REPO SECTION ======= */
.repo-card {
  background-color: var(--dark);
  color: white;
}

.repo-title {
  color: white;
}

.repo-clone {
  padding: 1rem;
  background-color: var(--dark-light);
  border-radius: var(--border-radius-sm);
  color: white;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  overflow-x: auto;
  white-space: nowrap;
  margin-bottom: 1rem;
}

.copy-btn {
  position: relative;
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-btn:hover {
  background-color: var(--primary-light);
}

.copy-tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--dark);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.copy-btn.copied .copy-tooltip {
  opacity: 1;
  visibility: visible;
}

/* ======= PRIVATE SECTION ======= */
.private-section {
  background-color: var(--light-dark);
}

.private-card {
  border-left: 4px solid var(--secondary-dark);
}

.private-controls {
  display: flex;
  margin: 2rem 0;
}

.private-panel {
  background-color: var(--light);
  border: 1px solid var(--light-dark);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-top: 1.5rem;
  max-height: 180px;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
  overflow-y: auto;
  transform: translateY(10px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  font-size: 0.95rem;
}

.private-panel.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  box-shadow: var(--shadow-md);
}

.private-controls {
  margin: 1.5rem 0;
}

/* ======= ALERTS ======= */
.alert {
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert i {
  font-size: 1.25rem;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.alert-warning {
  background-color: rgba(252, 211, 77, 0.1);
  border: 1px solid var(--warning);
  color: var(--dark);
}

/* ======= NEWS CARD ======= */
.news-card-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

.news-card {
  display: block;
  background: var(--light);
  border: 1px solid var(--light-dark);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition-normal);
}

.news-card:hover {
  box-shadow: var(--shadow-md);
}

.news-card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.news-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.news-card-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

/* ======= FOOTER ======= */
.footer {
  background-color: var(--dark);
  color: white;
  padding: 2rem 0 1.25rem;
  /* reduced vertical padding for a slimmer footer */
  position: relative;
  overflow: hidden;
  z-index: 1;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  align-items: start;
}

.footer-logo {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.footer-logo-image {
  width: 250px;
  height: 150px;
  display: block;
  margin: 0 0 0.5rem 0;
  transition: transform 220ms cubic-bezier(.25, .9, .3, 1), filter 220ms ease;
  will-change: transform, filter;
}

@media (max-width: 576px) {
  .footer-logo-image {
    width: 60px;
  }
}

.footer-text {
  color: var(--gray);
  margin-bottom: 0.25rem;
}

.footer-title {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}

/* Footer logo hover effect (subtle scale and brighten). Respects reduced motion. */
@media (prefers-reduced-motion: no-preference) {

  .footer-logo-image:hover,
  .footer-grid img:hover {
    transform: translateY(-4px) scale(1.06);
    filter: brightness(1.06) saturate(1.05);
  }
}

/* Small visual polish for links inside footer */
.footer-links a {
  color: var(--gray);
  transition: color 180ms ease, transform 180ms ease;
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Utility: page container padding for content pages */
.page-container {
  padding: 3rem 1rem;
}

/* Detail page simple navbar (back link) */
.detail-nav {
  display: inline-block;
  margin-left: 1.5rem;
}

.detail-nav .nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detail-nav .nav-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.detail-nav .nav-link:hover {
  text-decoration: underline;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary);
}

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

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

.footer-links a {
  color: var(--gray);
  transition: color var(--transition-fast);
}

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

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--gray);
  font-size: 0.875rem;
}

/* ======= PARTICLES ======= */
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background-color: var(--primary);
  animation: float infinite ease-in-out alternate;
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(30px, -30px);
  }
}

/* ======= MEDIA QUERIES ======= */
@media (max-width: 992px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .hero-image {
    width: 40%;
  }

  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .resource-card .card-body {
    padding: 1.75rem;
  }

  /* Keep the same layout on medium screens but adjust spacing */
  .team-grid {
    gap: 2rem;
    max-width: 100%;
  }

  .team-grid .card {
    min-height: 250px;
  }
}

@media (max-width: 768px) {

  /* header / nav */
  .nav-desktop {
    display: none !important;
  }

  .nav-mobile-toggle {
    display: inline-flex;
  }

  .lang-toggle-btn {
    margin-left: auto;
    margin-right: 0.5rem;
    padding: 0.35rem 0.55rem;
  }

  .lang-toggle-btn span {
    display: none;
  }

  /* mobile panel (visível para animar) */
  .nav-mobile {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 92%;
    max-width: 420px;
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.2, .9, .2, 1);
    background: var(--surface, #fff);
    z-index: 1200;
    padding: 1.25rem;
    box-shadow: 0 12px 40px rgba(8, 8, 20, 0.12);
    overflow-y: auto;
    border-radius: 12px 0 0 12px;
  }

  .nav-mobile.active {
    transform: translateX(0);
  }

  /* overlay */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 1190;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* mobile nav list */
  .nav-mobile .nav-list {
    margin-top: 1rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
  }

  .nav-mobile .nav-list .nav-link {
    display: block;
    padding: .85rem 1rem;
    border-radius: 10px;
    font-weight: 600;
  }

  /* team: single column */
  .team-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  .team-bottom-row {
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
  }

  .team-card {
    max-width: 100%;
  }

  /* footer stacked */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.25rem;
  }

  .footer-logo-image {
    margin: 0 auto 0.6rem;
    width: 64px;
  }

  /* small adjustments */
  .hero {
    padding: 2rem 0;
  }

  .partner-logos img {
    height: 44px;
    max-height: 48px;
  }
}

/* Very small screens adjustments */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .partner-logos img {
    height: 40px;
  }

  .team-card .team-member-photo {
    height: 160px;
  }

  .nav-mobile {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }

  .nav-mobile .nav-list .nav-link {
    padding: .85rem;
    font-size: 0.95rem;
  }

  .footer-bottom {
    font-size: 0.85rem;
    padding-top: 1rem;
  }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .resources-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .resource-card {
    width: 100%;
  }

  .repo-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .repo-actions .btn {
    width: 100%;
    justify-content: center;
  }
}