/* ==========================================================
   carrera.css — Página individual de carrera · CFT de Magallanes
   v1 · 2026
   ========================================================== */

/* ----------------------------------------------------------
   HERO DE CARRERA
   ---------------------------------------------------------- */

.carrera-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.carrera-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.carrera-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.45) 55%,
    rgba(0, 0, 0, 0.18) 100%
  );
}

.carrera-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: 3rem 4rem;
}

/* Breadcrumb */
.carrera-hero-inner .breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 1.25rem;
}

.carrera-hero-inner .breadcrumb a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s;
}

.carrera-hero-inner .breadcrumb a:hover {
  color: #fff;
}

.carrera-hero-inner .breadcrumb span[aria-hidden] {
  opacity: 0.5;
}

/* Eyebrow (área) */
.carrera-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary, #A83030);
  background: rgba(168, 48, 48, 0.15);
  border: 1px solid rgba(168, 48, 48, 0.35);
  border-radius: 2rem;
  padding: 0.25em 0.85em;
  margin-bottom: 1rem;
}

/* H1 */
.carrera-hero h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 1rem;
  max-width: 38ch;
}

/* Lead */
.carrera-hero .lead {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 58ch;
  margin: 0 0 1.75rem;
  line-height: 1.65;
}

/* Tags: sede / modalidad / gratuidad / duración */
.carrera-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.carrera-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3em 0.8em;
  border-radius: 2rem;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.carrera-tag--primary {
  background: var(--color-primary, #A83030);
  border-color: var(--color-primary, #A83030);
  color: #fff;
}

/* ----------------------------------------------------------
   SECCIÓN SOBRE LA CARRERA
   ---------------------------------------------------------- */

.carrera-sobre {
  padding-block: 5rem;
  background: #fff;
}

.carrera-sobre-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .carrera-sobre-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.carrera-sobre-text .section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary, #A83030);
  margin-bottom: 0.75rem;
}

.carrera-sobre-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 1.25rem;
  line-height: 1.2;
}

.carrera-sobre-text p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-muted, #4a4a4a);
  margin-bottom: 1rem;
}

.carrera-sobre-img {
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #eee;
  position: relative;
}

.carrera-sobre-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carrera-sobre-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  color: #aaa;
}

/* ----------------------------------------------------------
   PERFIL DE EGRESO — lista con checks
   ---------------------------------------------------------- */

.carrera-competencias {
  padding-block: 4rem 5rem;
  background: var(--color-surface, #f7f7f7);
}

.carrera-competencias h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 800;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 0.5rem;
}

.carrera-competencias .section-lead {
  font-size: 1rem;
  color: var(--color-text-muted, #4a4a4a);
  margin-bottom: 2.5rem;
  max-width: 58ch;
}

.competencias-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .competencias-list {
    grid-template-columns: 1fr 1fr;
  }
}

.competencias-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fff;
  border-radius: 0.6rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--color-text, #1a1a1a);
}

.competencias-list li::before {
  content: "";
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A83030' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ----------------------------------------------------------
   CAMPO LABORAL — cards
   ---------------------------------------------------------- */

.carrera-campo {
  padding-block: 5rem;
  background: #fff;
}

.carrera-campo h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 800;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 0.5rem;
}

.carrera-campo .section-lead {
  font-size: 1rem;
  color: var(--color-text-muted, #4a4a4a);
  margin-bottom: 2.5rem;
  max-width: 60ch;
}

.carrera-campo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.campo-card {
  background: var(--color-surface, #f7f7f7);
  border-radius: 0.75rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.07);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.campo-card:hover {
  border-color: var(--color-primary, #A83030);
  box-shadow: 0 4px 20px rgba(168, 48, 48, 0.1);
}

.campo-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(168, 48, 48, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
  color: var(--color-primary, #A83030);
}

.campo-card-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.campo-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 0.35rem;
}

.campo-card p {
  font-size: 0.83rem;
  color: var(--color-text-muted, #4a4a4a);
  line-height: 1.55;
  margin: 0;
}

/* ----------------------------------------------------------
   PLAN DE ESTUDIOS — tabla
   ---------------------------------------------------------- */

.carrera-plan {
  padding-block: 5rem;
  background: var(--color-surface, #f7f7f7);
}

.carrera-plan h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 800;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 0.5rem;
}

.carrera-plan .section-lead {
  font-size: 1rem;
  color: var(--color-text-muted, #4a4a4a);
  margin-bottom: 2.5rem;
  max-width: 58ch;
}

.plan-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.plan-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.88rem;
}

.plan-table thead th {
  background: var(--color-primary, #A83030);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.85rem 1.1rem;
  text-align: left;
  white-space: nowrap;
}

.plan-table tbody tr:nth-child(odd) td {
  background: #fff;
}

.plan-table tbody tr:nth-child(even) td {
  background: #fafafa;
}

.plan-table tbody td {
  padding: 0.75rem 1.1rem;
  color: var(--color-text, #1a1a1a);
  line-height: 1.5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: top;
}

.plan-table tbody tr:last-child td {
  border-bottom: none;
}

.plan-sem-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--color-primary, #A83030);
  background: rgba(168, 48, 48, 0.08);
  border-radius: 2rem;
  padding: 0.2em 0.7em;
  white-space: nowrap;
}

/* ----------------------------------------------------------
   CTA CARRERA — banner rojo
   ---------------------------------------------------------- */

.carrera-cta {
  padding-block: 5rem;
  background: var(--color-primary, #A83030);
}

.carrera-cta .container {
  text-align: center;
}

.carrera-cta .eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
}

.carrera-cta h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 1rem;
}

.carrera-cta p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 52ch;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

.carrera-cta .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: #fff;
  color: var(--color-primary, #A83030);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75em 1.75em;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.btn-white:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75em 1.75em;
  border-radius: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline-white:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ----------------------------------------------------------
   DATO DESTACADO (sidebar del sobre)
   ---------------------------------------------------------- */

.carrera-sobre-datos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.carrera-dato {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--color-text-muted, #4a4a4a);
}

.carrera-dato svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  stroke: var(--color-primary, #A83030);
  fill: none;
  stroke-width: 2;
}

.carrera-dato strong {
  color: var(--color-text, #1a1a1a);
  font-weight: 700;
}

/* ----------------------------------------------------------
   RESPONSIVE UTILITIES
   ---------------------------------------------------------- */

@media (max-width: 767px) {
  .carrera-sobre {
    padding-block: 3rem;
  }

  .carrera-hero {
    min-height: clamp(260px, 60vh, 400px);
    align-items: flex-end;
  }

  .carrera-competencias,
  .carrera-campo,
  .carrera-plan {
    padding-block: 3rem;
  }

  .carrera-cta {
    padding-block: 3.5rem;
  }

  .plan-table {
    font-size: 0.8rem;
  }
}

/* === MOBILE === */
@media (max-width: 480px) {
  .carrera-hero-inner { padding-block: 2rem 2.5rem; }
  .carrera-hero h1 { font-size: clamp(1.6rem, 7vw, 2rem); }
  .carrera-hero .lead { font-size: 0.9rem; max-width: 100%; }
  .carrera-hero-tags { gap: 0.35rem; }
  .carrera-tag { font-size: 0.7rem; padding: 0.25em 0.65em; }

  .carrera-cta p { font-size: 0.95rem; max-width: 100%; }
  .carrera-cta .btn-row { flex-direction: column; align-items: center; }

  .campo-card { padding: 1.1rem 1rem; }
}
