/* ============================================================
   pages.css – Estilos para páginas internas del portal
   IESTP Huarmey
   ============================================================ */

/* ── PAGE HERO ── */
.page-hero {
  position: relative;
  height: 340px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-bottom: 48px;
  background: var(--primary-dk);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .32;
  transition: opacity .4s;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,61,110,.88) 40%, rgba(26,91,149,.6) 100%);
  z-index: 1;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
}
.page-hero p {
  color: rgba(255,255,255,.8);
  font-size: 1rem;
  max-width: 640px;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  background: #f8f9fb;
  border-bottom: 1px solid #e9ecef;
  padding: 12px 0;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
  font-size: .83rem;
}
.breadcrumb-list li { display: flex; align-items: center; gap: 6px; }
.breadcrumb-list li:not(:last-child)::after {
  content: '/';
  color: #adb5bd;
}
.breadcrumb-list a { color: var(--primary); text-decoration: none; }
.breadcrumb-list a:hover { text-decoration: underline; }
.breadcrumb-list li:last-child { color: #6c757d; }

/* ── PROGRAM LAYOUT ── */
.prog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  padding: 48px 0;
}
@media (max-width: 1024px) {
  .prog-layout { grid-template-columns: 1fr; }
  .prog-sidebar { order: -1; }
}

/* ── SIDEBAR (unidad sticky sin scroll interno) ── */
.prog-sidebar {
  position: sticky;
  top: 100px;
}

/* ── SIDEBAR CARD ── */
.prog-sidebar-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
  overflow: hidden;
}
.prog-sidebar-header {
  background: var(--primary);
  padding: 20px 24px;
  color: #fff;
}
.prog-sidebar-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.prog-sidebar-header p {
  font-size: .82rem;
  opacity: .85;
}
.prog-sidebar-body { padding: 0; }
.prog-stat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f2f5;
}
.prog-stat-row:last-child { border-bottom: none; }
.prog-stat-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--primary-light, #e8f0fa);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: .9rem;
  flex-shrink: 0;
}
.prog-stat-info strong { display: block; font-size: .82rem; color: var(--dark); }
.prog-stat-info span  { font-size: .78rem; color: #6c757d; }

.prog-cta-box {
  margin: 0 20px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: #fff;
}
.prog-cta-box p { font-size: .85rem; opacity: .9; margin-bottom: 12px; }
.prog-cta-box a {
  display: block;
  background: var(--accent);
  color: var(--dark);
  font-weight: 700;
  font-size: .9rem;
  padding: 11px;
  border-radius: 7px;
  text-decoration: none;
  transition: .2s;
}
.prog-cta-box a:hover { background: #f5c400; }

/* ── SECTION TITLES ── */
.section-title-left {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title-left::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── PROG INTRO CARD ── */
.prog-intro-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  padding: 28px 32px;
  margin-bottom: 28px;
}
.prog-intro-card p {
  color: #444;
  line-height: 1.8;
  font-size: .95rem;
}

/* ── FEATURE CARDS GRID ── */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
@media (max-width: 768px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .feat-grid { grid-template-columns: 1fr; }
}
.feat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 18px 18px;
  border: 1px solid #e4eaf2;
  border-top: 3px solid var(--primary);
  box-shadow: 0 2px 12px rgba(26,91,149,.07);
  transition: transform .22s, box-shadow .22s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26,91,149,.13);
}
.feat-card-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  background: linear-gradient(135deg, #e8f0fa 0%, #d0e4f7 100%);
  color: var(--primary);
  flex-shrink: 0;
}
.feat-card h4 {
  font-size: .82rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0;
}
.feat-card p {
  font-size: .93rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin: 0;
}

/* ── LISTS (campo laboral / perfil) ── */
.check-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 20px;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .88rem;
  color: #444;
  line-height: 1.5;
}
.check-list li i {
  color: var(--primary);
  margin-top: 3px;
  flex-shrink: 0;
}

/* ── PLAN DE ESTUDIOS (ACCORDION) ── */
.plan-tabs {
  margin-bottom: 28px;
}
.plan-accordion {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e9ecef;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,.04);
}
.plan-sem-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: #f8f9fb;
  border: none;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--dark);
  text-align: left;
  transition: background .2s;
}
.plan-sem-btn:hover { background: #e8f0fa; }
.plan-sem-btn.open  { background: var(--primary); color: #fff; }
.plan-sem-btn .sem-label {
  display: flex; align-items: center; gap: 10px;
}
.plan-sem-btn .sem-num {
  background: var(--primary);
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.plan-sem-btn.open .sem-num { background: rgba(255,255,255,.25); }
.plan-sem-btn .arr { transition: transform .25s; }
.plan-sem-btn.open .arr { transform: rotate(180deg); }
.plan-sem-body {
  display: none;
  padding: 0 0 12px;
}
.plan-sem-body.show { display: block; }
.plan-course-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  border-bottom: 1px solid #f0f2f5;
  font-size: .86rem;
}
.plan-course-row:last-child { border-bottom: none; }
.plan-course-row .course-tipo {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.tipo-teórico  { background: #e8f0fa; color: var(--primary); }
.tipo-práctico { background: #e8faf0; color: #276749; }
.tipo-taller   { background: #fff3e0; color: #c05621; }
.plan-course-row .course-name { flex: 1; color: #333; }
.plan-course-row .course-hrs {
  font-size: .78rem; color: #888;
  white-space: nowrap;
}

/* ── VACANTES TABLE ── */
.vac-table-wrap {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  margin-bottom: 28px;
}
.vac-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.vac-table thead { background: var(--primary); color: #fff; }
.vac-table th { padding: 12px 18px; text-align: left; font-weight: 600; font-size: .82rem; }
.vac-table td { padding: 11px 18px; border-bottom: 1px solid #f0f2f5; color: #444; }
.vac-table tbody tr:last-child td { border-bottom: none; }
.vac-table tbody tr:hover td { background: #f8f9fb; }
.vac-badge {
  display: inline-block;
  font-weight: 700;
  font-size: .9rem;
  color: var(--primary);
}

/* ── INFO SECTION (main+aside split) ── */
.info-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  padding: 28px 32px;
  margin-bottom: 28px;
}

/* ── NOTICIAS LIST PAGE ── */
.noticias-hero { height: 240px; }
.noticias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 48px 0;
}
.noticia-card-v {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.noticia-card-v:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.noticia-card-v .nc-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}
.noticia-card-v .nc-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.noticia-card-v:hover .nc-img img { transform: scale(1.05); }
.noticia-card-v .nc-cat {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.noticia-card-v .nc-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.noticia-card-v .nc-date { font-size: .78rem; color: #888; margin-bottom: 8px; }
.noticia-card-v .nc-title {
  font-size: .97rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.noticia-card-v .nc-excerpt {
  font-size: .84rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.noticia-card-v .nc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: auto;
}
.noticia-card-v .nc-link:hover { color: var(--primary-dk); }

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.filter-chip {
  padding: 7px 18px;
  border: 2px solid #e9ecef;
  border-radius: 30px;
  background: #fff;
  font-size: .83rem;
  font-weight: 600;
  color: #6c757d;
  cursor: pointer;
  transition: .2s;
  text-decoration: none;
}
.filter-chip:hover,
.filter-chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #adb5bd;
}
.empty-state i  { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 1.1rem; color: #6c757d; }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 20px 0 48px;
}
.pagination a,
.pagination span {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e9ecef;
  color: #444;
  transition: .2s;
}
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination span.cur { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── CONTENT SECTION WRAPPER ── */
.page-content { background: #f8f9fb; min-height: 60vh; }

/* ── CTA BANNER ── */
.cta-inline {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  border-radius: 12px;
  padding: 36px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.cta-inline-text h3 { color: #fff; font-size: 1.2rem; margin-bottom: 6px; }
.cta-inline-text p  { color: rgba(255,255,255,.8); font-size: .88rem; }
.cta-inline .btn { background: var(--accent); color: var(--dark); border: none; flex-shrink: 0; }
.cta-inline .btn:hover { background: #f5c400; }

/* ── RESPONSIVE TWEAKS ── */
@media (max-width: 768px) {
  .page-hero  { height: 260px; padding-bottom: 32px; }
  .prog-intro-card { padding: 20px; }
  .info-section    { padding: 20px; }
  .cta-inline { flex-direction: column; text-align: center; }
}
@media (max-width: 576px) {
  .page-hero h1 { font-size: 1.4rem; }
  .check-list   { grid-template-columns: 1fr; }
  .feat-grid    { grid-template-columns: 1fr; }
}
