/* ===================================================
   Estágio Fácil — Folha de Estilos Principal
   Paleta: Azul Oceano + Ciano
   =================================================== */

/* Inter servida localmente (funciona sem internet) */
@import url("/vendor/inter/latin-400.css");
@import url("/vendor/inter/latin-500.css");
@import url("/vendor/inter/latin-600.css");
@import url("/vendor/inter/latin-700.css");
@import url("/vendor/inter/latin-800.css");

:root {
  /* Cores Primárias — Azul Oceano */
  --primary-color: #0369a1;
  --primary-hover: #0284c7;
  --primary-light: rgba(3, 105, 161, 0.1);
  --primary-glow: rgba(3, 105, 161, 0.2);

  /* Accent — Ciano */
  --accent-color: #06b6d4;
  --accent-hover: #0891b2;
  --accent-light: rgba(6, 182, 212, 0.12);

  /* Gradientes */
  --gradient-hero: linear-gradient(135deg, #0369a1 0%, #0891b2 50%, #06b6d4 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
  --gradient-subtle: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);

  /* Fundos e Superfícies */
  --background-color: #ffffff;
  --secondary-color: #f0f9ff;
  --surface-raised: #e0f2fe;
  --surface-card: #ffffff;

  /* Texto */
  --text-color: #0c1a2e;
  --text-muted: #4b6280;
  --text-subtle: #94a3b8;
  --text-on-primary: #ffffff;

  /* Bordas */
  --border-color: #bae6fd;
  --border-subtle: #e0f2fe;
  --border-focus: #0369a1;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(3, 105, 161, 0.06);
  --shadow-sm: 0 2px 8px rgba(3, 105, 161, 0.08);
  --shadow: 0 4px 16px rgba(3, 105, 161, 0.12);
  --shadow-md: 0 8px 32px rgba(3, 105, 161, 0.16);
  --shadow-lg: 0 16px 48px rgba(3, 105, 161, 0.2);

  /* Forma e Transição */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Tipografia */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--background-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-color);
  line-height: 1.25;
}

::selection {
  background: var(--accent-color);
  color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== BOTÕES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
  font-size: 0.875rem;
  font-family: var(--font-body);
  min-height: 2.75rem;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: var(--transition);
  border-radius: inherit;
}

.btn:hover::after {
  background: rgba(255, 255, 255, 0.08);
}

.btn-primary {
  background: var(--gradient-hero);
  background-size: 200% auto;
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.3);
}

.btn-primary:hover {
  background-position: right center;
  box-shadow: 0 4px 16px rgba(3, 105, 161, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1.5px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.btn-accent {
  background-color: var(--accent-color);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  min-height: 2rem;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  min-height: 3rem;
}

.btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  min-height: 2.5rem;
  min-width: 2.5rem;
}

.btn-icon:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: var(--primary-light);
}

/* ===== HEADER ===== */
.site-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-color);
  flex-shrink: 0;
}

.logo i {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.4rem;
}

.logo .logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.25);
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.main-nav {
  flex: 1;
}

.main-nav ul {
  display: none;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.auth-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1.125rem;
  cursor: pointer;
  color: var(--text-color);
  transition: var(--transition);
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: var(--primary-light);
}

/* Mobile Nav Active */
.main-nav.active ul {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 4.25rem;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 1.25rem;
  gap: 0.375rem;
  z-index: 99;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.main-nav.active ul a {
  display: block;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .main-nav ul {
    display: flex;
    gap: 0.25rem;
  }

  .mobile-menu-toggle {
    display: none;
  }
}

/* ===== MENU DO UTILIZADOR ===== */
.user-menu {
  position: relative;
}

.user-avatar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  transition: var(--transition);
  background: var(--background-color);
}

.user-avatar:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.user-avatar img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-light);
}

.user-avatar span {
  font-size: 0.875rem;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar i.fa-chevron-down {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 210px;
  background-color: var(--background-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
  z-index: 200;
  display: none;
  overflow: hidden;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-dropdown.active,
.user-menu.active .user-dropdown {
  display: block;
}

.user-dropdown ul {
  padding: 0.5rem 0;
}

.user-dropdown ul li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.user-dropdown ul li a:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.user-dropdown ul li a i {
  width: 1rem;
  text-align: center;
  color: var(--text-muted);
}

.user-dropdown ul li a:hover i {
  color: var(--primary-color);
}

/* ===== HERO ===== */
.hero {
  background: var(--gradient-hero);
  padding: 3.5rem 0;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--background-color));
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.15;
  color: #ffffff;
  max-width: 22ch;
  letter-spacing: -0.03em;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  max-width: 48ch;
  font-size: 1rem;
  line-height: 1.7;
}

.search-box {
  max-width: 580px;
}

.search-input {
  position: relative;
  margin-bottom: 0.75rem;
}

.search-input i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  z-index: 1;
}

.search-input input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  background-color: rgba(255, 255, 255, 0.97);
  color: var(--text-color);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  font-family: var(--font-body);
}

.search-input input::placeholder {
  color: var(--text-subtle);
}

.search-input input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2), var(--shadow-md);
}

@media (min-width: 768px) {
  .hero {
    padding: 7rem 0 5rem;
  }

  .hero h1 {
    font-size: 3.5rem;
    max-width: 18ch;
  }

  .hero p {
    font-size: 1.125rem;
  }

  .search-box {
    display: flex;
    gap: 0.625rem;
    align-items: center;
  }

  .search-input {
    flex: 1;
    margin-bottom: 0;
  }

  .search-box .btn {
    flex-shrink: 0;
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    border: none;
    box-shadow: var(--shadow);
    min-height: 3rem;
    padding: 0.875rem 1.5rem;
  }

  .search-box .btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }
}

/* ===== SECÇÃO ESTÁGIOS EM DESTAQUE ===== */
.featured-internships {
  padding: 3.5rem 0 4rem;
  background: var(--gradient-subtle);
}

.section-header {
  text-align: left;
  margin-bottom: 2rem;
  position: relative;
  padding-left: 1.1rem;
}

.section-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-hero);
  border-radius: var(--radius-full);
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  letter-spacing: -0.025em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.internship-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* ===== CARDS DE ESTÁGIO ===== */
.internship-card {
  background: var(--surface-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.internship-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: var(--transition);
}

.internship-card:hover {
  border-color: var(--border-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.internship-card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.company-logo {
  width: 3rem;
  height: 3rem;
  background: var(--secondary-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1.5px solid var(--border-subtle);
  flex-shrink: 0;
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-color);
  line-height: 1.35;
}

.card-title p {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.card-details {
  margin-bottom: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detail-item {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.detail-item i {
  color: var(--accent-color);
  margin-right: 0.5rem;
  width: 1rem;
  font-size: 0.75rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.card-description {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-deadline {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.card-deadline small {
  color: var(--text-subtle);
  font-size: 0.75rem;
  font-weight: 500;
}

/* ===== TAG ===== */
.tag {
  font-size: 0.6875rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--accent-light);
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-hover);
  display: inline-flex;
  align-items: center;
}

/* Selos de remuneração */
.tag i {
  margin-right: 0.3rem;
}

.tag-paid {
  background-color: #e6f6ec;
  border-color: rgba(22, 128, 61, 0.3);
  color: #166534;
}

.tag-unpaid {
  background-color: #f1f5f9;
  border-color: rgba(75, 98, 128, 0.25);
  color: #4b6280;
}

.view-all {
  text-align: center;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .internship-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .internship-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== SECÇÃO PARA UTILIZADORES ===== */
.for-users {
  background: var(--secondary-color);
  padding: 4rem 0;
}

.user-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.user-group {
  background: var(--background-color);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.user-group::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: var(--transition);
}

.user-group:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-color);
  transform: translateY(-2px);
}

.user-group:hover::after {
  opacity: 1;
}

.user-group h2 {
  font-size: 1.375rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.user-group p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .button-group {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .user-groups {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--text-color);
  padding-top: 3.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.footer-about {
  max-width: 320px;
}

.footer-about .logo {
  color: #ffffff;
  margin-bottom: 1rem;
}

.footer-about .logo i {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-about p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.footer-column h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1rem;
}

.footer-column ul li {
  margin-bottom: 0.625rem;
}

.footer-column ul li a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-column ul li a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
  margin-top: 2.5rem;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8125rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }

  .footer-links {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== PÁGINA DE ESTÁGIOS ===== */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-header p {
  color: var(--text-muted);
}

.sort-dropdown select {
  padding: 0.5rem 0.875rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  background-color: var(--background-color);
  color: var(--text-color);
  font-size: 0.875rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}

.sort-dropdown select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.internships-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.filters-sidebar {
  display: none;
  background-color: var(--background-color);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 5.25rem;
  height: fit-content;
  box-shadow: var(--shadow-sm);
}

.filter-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-section h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--primary-color);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.checkbox-item label {
  font-size: 0.875rem;
  margin-bottom: 0;
  color: var(--text-color);
  cursor: pointer;
  font-weight: 400;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.list-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
}

/* Internship list items */
.internship-item {
  background-color: var(--background-color);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: var(--transition-slow);
  display: block;
  position: relative;
  overflow: hidden;
}

.internship-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: var(--transition);
}

.internship-item:hover {
  border-color: var(--border-color);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.internship-item:hover::before {
  opacity: 1;
}

.item-content {
  display: flex;
  gap: 1rem;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.625rem;
}

.item-header h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.company-name {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.posted-date {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
}

.item-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.meta-item {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.meta-item i {
  color: var(--accent-color);
  margin-right: 0.5rem;
  width: 1rem;
  font-size: 0.75rem;
}

.item-description {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  background-color: var(--background-color);
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  padding: 0 0.5rem;
}

.pagination-btn:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination-btn.active {
  background: var(--gradient-hero);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .page-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .item-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .item-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .internships-container {
    grid-template-columns: 260px 1fr;
  }

  .filters-sidebar {
    display: block;
  }

  .filter-toggle {
    display: none;
  }
}

/* ===== DETALHE DO ESTÁGIO ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 1.5rem 0;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
}

.back-link:hover {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.internship-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.detail-main {
  background-color: var(--background-color);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.detail-header {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-title h1 {
  font-size: 1.625rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  letter-spacing: -0.025em;
}

.detail-title .company-name {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 500;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
}

.detail-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.detail-tabs {
  padding: 1.75rem;
}

.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-subtle);
  margin-bottom: 1.75rem;
  gap: 0;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  font-family: var(--font-body);
}

.tab-btn:hover {
  color: var(--primary-color);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-section {
  margin-bottom: 2rem;
}

.content-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
}

.content-section h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.content-section p {
  margin-bottom: 1rem;
  color: var(--text-color);
  line-height: 1.75;
}

.content-section ul,
.content-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-section ul {
  list-style-type: disc;
}

.content-section ol {
  list-style-type: decimal;
}

.content-section li {
  margin-bottom: 0.5rem;
  color: var(--text-color);
  line-height: 1.7;
}

.company-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.company-link {
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 600;
}

.company-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.company-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.note-box {
  background: var(--secondary-color);
  border: 1.5px solid var(--border-color);
  border-left: 4px solid var(--accent-color);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.note-box p {
  font-size: 0.875rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-section {
  background-color: var(--background-color);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
}

.sidebar-section h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
}

.sidebar-section > p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.similar-internships {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.similar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  transition: var(--transition);
  border: 1px solid transparent;
}

.similar-item:hover {
  background-color: var(--secondary-color);
  border-color: var(--border-subtle);
}

.similar-item .company-logo {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.similar-details h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.similar-details p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.similar-details span {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

@media (min-width: 768px) {
  .detail-header {
    flex-direction: row;
    align-items: flex-start;
  }

  .detail-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .company-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .internship-detail {
    grid-template-columns: 2fr 1fr;
  }
}

/* ===== FORMULÁRIOS GLOBAIS ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="password"],
textarea,
select {
  background-color: var(--background-color);
  color: var(--text-color);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
  width: 100%;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-subtle);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

select option {
  background-color: var(--background-color);
  color: var(--text-color);
}

label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  display: block;
  margin-bottom: 0.4rem;
}

/* ===== TAGS DE COMPETÊNCIAS ===== */
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--accent-light);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--accent-hover);
  font-weight: 700;
  margin: 0.2rem;
}

.skill-tag .remove-skill {
  background: none;
  border: none;
  color: var(--accent-hover);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0;
  line-height: 1;
  opacity: 0.6;
  transition: var(--transition);
}

.skill-tag .remove-skill:hover {
  opacity: 1;
  color: #dc2626;
}

/* ===== REQUIRED STAR ===== */
.required {
  color: #dc2626;
}

/* ===== UTILITÁRIOS ===== */
.text-primary { color: var(--primary-color); }
.text-accent { color: var(--accent-color); }
.text-muted { color: var(--text-muted); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-primary { background: var(--primary-light); color: var(--primary-color); }
.badge-accent { background: var(--accent-light); color: var(--accent-hover); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: #059669; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #d97706; }

/* =========================================================
   Avatar com iniciais, modal e toast (js/app.js)
   ========================================================= */
.ef-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  user-select: none;
}

.ef-avatar-square {
  border-radius: 22%;
}

.user-avatar .ef-avatar {
  max-width: none;
  overflow: visible;
  white-space: normal;
  border: 2px solid var(--accent-light);
}

.ef-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ef-modal-overlay.open {
  opacity: 1;
}

.ef-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 2rem;
  background: var(--background-color);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.ef-modal-overlay.open .ef-modal {
  transform: none;
}

.ef-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.ef-modal-close:hover {
  background: var(--primary-light);
}

.ef-modal-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
  background: var(--primary-light);
  color: var(--primary-color);
}

.ef-modal-icon.success {
  background: #e6f6ec;
  color: #166534;
}

.ef-modal h2 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.ef-modal-body {
  color: var(--text-muted);
  line-height: 1.6;
}

.ef-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.ef-modal-actions .btn {
  flex: 1 1 160px;
  justify-content: center;
}

/* Lista de próximos passos (modal de boas-vindas) */
.ef-steps {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ef-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-color, inherit);
}

.ef-steps li > i {
  margin-top: 0.15rem;
  width: 1.1rem;
  text-align: center;
  color: var(--primary-color);
}

.ef-steps li.done > i {
  color: #166534;
}

.ef-steps strong {
  display: block;
  font-size: 0.95rem;
}

.ef-steps small {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.ef-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1100;
  max-width: calc(100vw - 2rem);
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow-md);
  font-size: 0.92rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ef-toast.open {
  opacity: 1;
  transform: none;
}

.ef-toast i {
  margin-right: 0.4rem;
}

.ef-toast-success i {
  color: #4ade80;
}

.ef-toast-error {
  background: #7f1d1d;
}

/* Mensagem de erro dentro de formulários */
.form-error {
  display: none;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.9rem;
}

.form-error.visible {
  display: block;
}

.form-hint {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.form-hint i {
  margin-top: 0.2rem;
  color: var(--primary-color);
}

.btn[disabled] {
  opacity: 0.65;
  cursor: wait;
}

.ef-toast-info i {
  color: #7dd3fc;
}

/* Aviso informativo dentro de formulários (ex.: "inicie sessão para continuar") */
.form-notice {
  display: none;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--primary-light);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 0.9rem;
}

.form-notice.visible {
  display: flex;
}

.form-notice i {
  margin-top: 0.2rem;
  color: var(--primary-color);
}

/* Botão para mostrar/esconder a palavra-passe */
.input-with-icon .toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.input-with-icon .toggle-password:hover {
  color: var(--primary-color);
}

.input-with-icon .toggle-password i {
  position: static;
  transform: none;
  color: inherit;
}

.input-with-icon input.has-toggle {
  padding-right: 2.75rem;
}

/* ===================================================
   Painel da empresa, estados de candidaturas e vagas
   =================================================== */
.ef-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.35rem;
  border-radius: var(--radius-full);
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}
.ef-badge[hidden] { display: none; }

.status-badge {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: #e0f2fe;
  color: #075985;
}
.status-badge.status-reviewing { background: #fef3c7; color: #92400e; }
.status-badge.status-interview { background: #ede9fe; color: #5b21b6; }
.status-badge.status-accepted, .status-badge.status-open { background: #dcfce7; color: #166534; }
.status-badge.status-rejected { background: #fee2e2; color: #991b1b; }
.status-badge.status-withdrawn, .status-badge.status-closed, .status-badge.status-expired { background: #f1f5f9; color: #475569; }

.btn-danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.btn-danger:hover {
  background: #fef2f2;
  border-color: #b91c1c;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 2rem;
  color: var(--border-color);
  margin-bottom: 0.75rem;
  display: block;
}

.modal-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.ef-modal.ef-modal-wide { max-width: 640px; }
.ef-modal-icon.danger { background: #fee2e2; color: #b91c1c; }
.ef-modal textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font: inherit;
  resize: vertical;
  text-align: left;
}
