/* GLOBAL STYLES */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: url("../images/fcul_c6_blured.png") no-repeat center center/cover;
  min-height: 100vh; /* Changed from height: 100vh to allow scrolling if content overflows */
  color: white;
}

/* OVERLAY & LAYOUT FIXES */
.overlay {
  background: rgba(0, 0, 0, 0.45);
  min-height: 100vh; /* Changed from height: 100% */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 100px; /* Adds space so the fixed header doesn't cover content */
  padding-bottom: 40px; 
  box-sizing: border-box;
}

h1 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid #030402;
  padding-bottom: 0.5rem;
  text-align: center;
}

/* RESPONSIVE GRID */
.grid-container {
  display: grid;
  /* auto-fit automatically drops columns to the next row when the screen shrinks */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px; /* Increased slightly for better visual breathing room */
  width: 90%; /* Increased from 70% to utilize more screen space on mobile */
  max-width: 900px;
}

/* CARDS */
.card {
  background-color: rgba(0, 40, 100, 0.85);
  text-align: center;
  padding: 25px;
  font-size: 1rem;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 5px;
  min-height: 100px; /* Ensures cards maintain a good shape even with short text */
}

.card:hover {
  background-color: rgba(0, 40, 100, 0.85);
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.card strong {
  font-size: 1.1rem;
  display: block;
  margin-top: 5px;
}

.small-text {
  font-size: 0.9rem;
}

/* HEADER */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: rgb(40, 58, 160);
  display: flex;
  align-items: center;
  padding: 0 30px;
  z-index: 1000;
  box-sizing: border-box; /* Prevents padding from breaking 100% width */
}

.site-logo {
  height: 50px; /* Scaled down slightly to ensure it fits perfectly inside 70px header */
}

/* MAIN FIX */
main.overlay {
  /* Removed the hardcoded calc() height in favor of min-height 100vh and padding on .overlay */
}

/* FOOTER */
.site-footer {
  background-color: #000;
  color: #ccc;
  padding: 20px 30px; /* Added horizontal padding to prevent text touching screen edges on mobile */
  font-size: 0.9rem;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center; /* Vertically centers the text and social icons */
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social img {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-social a:hover img {
  transform: scale(1.1);
  opacity: 0.85;
}

/* --- MEDIA QUERIES FOR MOBILE DEVICES --- */
@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem; /* Shrinks title slightly on small screens */
  }

  .site-header {
    justify-content: center; /* Centers the logo on mobile */
    padding: 0 15px;
  }
  
  .footer-content {
    flex-direction: column; /* Stacks the footer contact info and social links vertically */
    gap: 20px;
    text-align: center; /* Centers the text */
  }
}

/* --- SECONDARY / OUTROS CARDS --- */
.card.card-secondary {
  background-color: rgba(80, 90, 110, 0.65); /* Muted, less vibrant background */
  color: #dcdcdc; /* Slightly dimmer text */
  border: 1px dashed rgba(255, 255, 255, 0.3); /* Dashed border to separate from main offerings */
}

.card.card-secondary:hover {
  background-color: rgba(100, 110, 130, 0.85); /* Slightly brightens on hover */
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Softer shadow than primary cards */
  border-color: rgba(255, 255, 255, 0.6);
  color: white;
}

.card.card-secondary .small-text {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 5px;
  display: block;
}