/* ====================================================
   ESTILOS GLOBALES Y RESET
   ==================================================== */

/* === IMPORTACIÓN DE FUENTES === */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap");

/* === VARIABLES CSS === */
:root {
  /* Colores principales */
  --color-primary: #1fa58a;
  --color-primary-700: #17a079;
  --color-accent: #0d6efd;
  --color-accent-700: #17a079;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --muted: #6b7280;
  --fg: #0f172a;
  --card: #e6e6e6;
  --glass: rgba(255, 255, 255, 0.6);

  /* Espaciado y tamaños */
  --container-gap: 20px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --border-radius: 8px;

  /* Sombras */
  --shadow-xs: 0 2px 6px rgba(12, 24, 40, 0.04);
  --shadow-sm: 0 8px 20px rgba(12, 24, 40, 0.06);
  --shadow-lg: 0 18px 40px rgba(2, 6, 23, 0.12);

  /* Tipografía */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;

  /* Layout */
  --container-max: 2000px;
  --gap: 20px;
}

/* === RESET Y ESTILOS BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: linear-gradient(180deg, #edf6ee 0%, #d8ebdc 100%);
  color: var(--fg);
  line-height: 1.45;
  min-height: 100vh;
}

a {
  color: var(--color-accent);
  text-decoration: none !important;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  background: none;
  color: inherit;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* === COMPONENTES GLOBALES REUTILIZABLES === */

/* Header Global */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  display: flex;
  align-items: center;
  gap: var(--gap);
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 0.4));
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  padding: 0 1.2rem;
  z-index: 1200;
}

.logo-container {
  margin-right: auto;
}

.logo {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
}

.menu {
  display: flex;
  gap: 1rem;
  margin: auto;
  align-items: center;
  position: sticky;
}

.menu a {
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--fg);
  font-weight: 500;
  font-size: 1.5rem;
  transition: color 0.2s ease;
}

.menu a:hover {
  background: rgba(13, 110, 253, 0.06);
  color: var(--color-accent);
}

/* Botones Globales */
.btn {
  display: inline-block;
  padding: 8px 12px;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-primary:hover {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

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

/* Formularios Globales */
.form-group {
  text-align: left;
  margin-bottom: 16px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(12, 24, 40, 0.5);
  background: #fbfdff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 6px 14px rgba(13, 110, 253, 0.06);
  outline: none;
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

/* Modal Global */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active,
.modal-overlay.open {
  display: flex;
}

.login-lightbox {
  max-width: 420px;
  width: 90%;
  text-align: center;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.9),
      rgba(255, 255, 255, 0.9));
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--fg);
}

/* Utilidades Globales */
.center {
  text-align: center;
}

.mb-8 {
  margin-bottom: 32px;
}

.hidden {
  display: none;
}

.text-muted {
  color: var(--muted);
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right,
      var(--color-primary),
      var(--color-primary-700),
      var(--color-accent));
}

/* ====================================================
   COMPONENTES COMPARTIDOS ENTRE PÁGINAS
   ==================================================== */

/* Sidebar Base */
.sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0.5rem;
  padding: 0.5rem;
  background: transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
}

.sidebar .btn-registrate {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  border: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  text-decoration: none;
}

.sidebar .btn-registrate:hover {
  background: var(--color-primary-700);
  transform: translateY(-2px);
}

.sidebar .side-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/*
.sidebar .side-links a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  transition: all 0.2s ease;
  text-decoration: none;
}

.sidebar .side-links a:hover {
  background: var(--color-primary-700);
  transform: translateY(-2px);
}*/

/* Perfil Card (compartido) */
.perfil-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  display: flex;
  top: 20px;
}

.perfil-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3498db, #2980b9);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
}

.foto-perfil {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  align-self: center;
}

.perfil-meta {
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 -4px 8px rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
}

.perfil-meta h4 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #2c3e50;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-sub {
  color: #7f8c8d;
  text-align: center;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.meta-visitas {
  text-align: center;
  margin-bottom: 25px;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.meta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Layout Base */
.layout {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  gap: 20px;
  max-width: 95vw;
  margin: 0;
  align-items: start;
  padding-top: 10vh;
}

.page-wrapper {
  max-width: 2000px;
  margin: auto;
}

/* ====================================================
   PÁGINA: INDEX (index.html)
   ==================================================== */
.page-index {
  background: linear-gradient(180deg, #e9f4ea 0%, #cfe6d4 100%);
}

.page-index .main-container {
  display: grid;
  grid-template-areas: "main sidebar";
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 20px;
}

.page-index .main-content {
  grid-area: main;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-index .content-box {
  width: 80vw;
  position: absolute;
  top: 30vh;
}

.page-index .content-box p {
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.5;
  margin: 0;
  font-family: var(--font-serif);
}

.page-index #sidebar-index {
  grid-area: sidebar;
  width: 260px;
  position: absolute;
  top: 20vh;
  right: 1vh;
}

.page-index #mensaje {
  text-align: center;
  margin-bottom: 10px;
  color: red;
  font-weight: 600;
}

.page-index h2 {
  font-size: 2rem;
  font-style: fantasy;
}

/* ====================================================
   PÁGINA: REGISTRO (registro.html)
   ==================================================== */
.page-registro body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #eaf7f0 0%, #dff4eb 100%);
  min-height: 100vh;
  margin: 0;
}

.page-registro main.register-main {
  margin-top: 120px;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.page-registro .register-box {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 40px;
  max-width: 1800px;
  width: 100%;
}

.page-registro .register-box h2 {
  text-align: center;
  margin-bottom: 10px;
  color: #094032;
  font-size: 3rem;
}

.page-registro .form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.page-registro .form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-registro .form-group label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #0b4233;
}

.page-registro .form-group input,
.page-registro .form-group select,
.page-registro .form-group textarea {
  border: 1px solid #b8d1c7;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.page-registro .btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.page-registro .formation-block {
  border: 1px dashed #b8d1c7;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

/* ====================================================
   PÁGINA: LISTADO COLEGIOS (listado-colegios.html)
   ==================================================== */
.page-listado-colegios {
  padding-top: 92px;
  background-color: #eaf5ee;
}

.coles-container {
  width: 100%;
  margin: auto;
  padding: 1vh;
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
}

.list-content {
  flex: 1;
  max-width: 2000px;
  min-width: 500px;
}

.card-shell {
  margin: auto;
  width: 100%;
  padding: 28px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(12, 24, 40, 0.08);
  border: 1px solid rgba(0, 158, 112, 0.1);
}

.card-shell h2 {
  margin-top: 0;
  color: #094032;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(0, 158, 112, 0.2);
}

/* Controles de búsqueda */
.controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: rgba(234, 245, 238, 0.7);
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(0, 158, 112, 0.15);
}

.search-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.controls input[type="search"],
.controls select {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #c6d9d0;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  min-width: 180px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.controls input[type="search"]:focus,
.controls select:focus {
  outline: none;
  border-color: #009e70;
  box-shadow: 0 0 0 3px rgba(0, 158, 112, 0.15);
}

.controls .btn-outline {
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid #009e70;
  background: transparent;
  color: #009e70;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.controls .btn-outline:hover {
  background: rgba(0, 158, 112, 0.08);
  transform: translateY(-1px);
}

/* Grid y Cards de Colegios */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  justify-items: center;
  align-items: start;
}

@media (min-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1400px) {
  .card-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.colegio-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(12, 24, 40, 0.08);
  padding: 18px;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 158, 112, 0.05);
  position: relative;
  overflow: hidden;
}

.colegio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(12, 24, 40, 0.12);
}

.colegio-logo {
  width: 90px;
  height: 90px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  margin: 0 auto 14px;
  border: 4px solid rgba(234, 245, 238, 0.9);
  transition: transform 0.3s ease;
}

.colegio-card:hover .colegio-logo {
  transform: scale(1.05);
}

.colegio-meta h4 {
  margin: 8px 0;
  font-size: 1.1rem;
  color: #0b4233;
  text-align: center;
  font-weight: 700;
}

.colegio-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.badge {
  background: rgba(0, 158, 112, 0.12);
  color: #007b57;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.8rem;
}

.colegio-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

/* Paginación */
.pagination {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  padding-top: 20px;
  border-top: 1px solid rgba(198, 217, 208, 0.5);
}

.pagination button {
  min-width: 100px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #c6d9d0;
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
  border-color: #009e70;
  color: #009e70;
  transform: translateY(-1px);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

#pageInfo {
  white-space: nowrap;
  font-weight: bold;
  font-size: 1rem;
  color: #094032;
  padding: 0 16px;
}

/* Modal Colegios */
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 760px;
  box-shadow: 0 20px 60px rgba(2, 10, 6, 0.4);
  padding: 24px;
  box-sizing: border-box;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  border: 1px solid rgba(0, 158, 112, 0.1);
  animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(198, 217, 208, 0.5);
}

.modal-header h3 {
  margin: 0;
  color: #0b4233;
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-body {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.modal-logo {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  flex: 0 0 160px;
  box-shadow: 0 8px 18px rgba(12, 24, 40, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-info {
  flex: 1 1 calc(100% - 180px);
}

.modal-info p {
  margin: 10px 0;
  color: #3b4a43;
  line-height: 1.5;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ====================================================
   PÁGINA: LISTADO MAESTROS (listado-maestros.html)
   ==================================================== */
.page-maestros {
  background-color: #eaf5ee;
}

.maestros-main {
  width: 100%;
  margin: auto;
  display: flex;
  gap: 2vw;
  padding-top: 10vh;
  align-items: flex-start;
  padding-right: 2vw;
  padding-left: 2vw;
}

.maestros-content {
  flex: 1;
  width: 100%;
}

.maestros-lightbox .form-box {
  margin: 0 auto;
  width: 100%;
  max-width: 1300px;
  padding: 28px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(12, 24, 40, 0.08);
  border: 1px solid rgba(0, 158, 112, 0.1);
}

.maestros-lightbox h2 {
  margin-top: 0;
  color: #094032;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(0, 158, 112, 0.2);
}

.maestros-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: rgba(234, 245, 238, 0.7);
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(0, 158, 112, 0.15);
}

.maestros-search-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.maestros-controls input[type="search"],
.maestros-controls select {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #c6d9d0;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  min-width: 200px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.maestros-controls input[type="search"]:focus,
.maestros-controls select:focus {
  outline: none;
  border-color: #009e70;
  box-shadow: 0 0 0 3px rgba(0, 158, 112, 0.15);
}

.maestros-controls .btn-maestros-outline {
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid #009e70;
  background: transparent;
  color: #009e70;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.maestros-controls .btn-maestros-outline:hover {
  background: rgba(0, 158, 112, 0.08);
  transform: translateY(-1px);
}

.maestros-results-info {
  margin-bottom: 16px;
  color: #4b5950;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.maestros-results-info strong {
  color: #094032;
}

/* Grid y Cards de Maestros */
.maestros-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  justify-items: center;
  align-items: start;
}

@media (min-width: 900px) {
  .maestros-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .maestros-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1400px) {
  .maestros-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.maestro-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(12, 24, 40, 0.08);
  padding: 18px;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 158, 112, 0.05);
}

.maestro-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(12, 24, 40, 0.12);
}

.maestro-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  margin: 0 auto 14px;
  border: 4px solid rgba(234, 245, 238, 0.9);
  transition: transform 0.3s ease;
}

.maestro-card:hover .maestro-avatar {
  transform: scale(1.05);
}

.maestro-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.maestro-badge {
  background: rgba(0, 158, 112, 0.12);
  color: #007b57;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.8rem;
}

.maestro-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.btn-maestros-primary {
  background: #009e70;
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  width: 100%;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-maestros-primary:hover {
  background: #007b57;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 158, 112, 0.3);
}

.btn-maestros-outline {
  background: transparent;
  border: 1px solid #c6d9d0;
  color: #4b5950;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  width: 100%;
  text-align: center;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-maestros-outline:hover {
  border-color: #009e70;
  color: #009e70;
  background: rgba(0, 158, 112, 0.05);
  transform: translateY(-1px);
}

/* Paginación Maestros */
.maestros-pagination {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  padding-top: 20px;
  border-top: 1px solid rgba(198, 217, 208, 0.5);
}

.maestros-pagination button {
  min-width: 100px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #c6d9d0;
  font-weight: 600;
  transition: all 0.2s ease;
}

.maestros-pagination button:hover:not(:disabled) {
  border-color: #009e70;
  color: #009e70;
  transform: translateY(-1px);
}

.maestros-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

#maestrosPageInfo {
  white-space: nowrap;
  font-weight: bold;
  font-size: 1rem;
  color: #094032;
  padding: 0 16px;
}

/* ====================================================
   PÁGINA: CONTACTOS (contactos.html)
   ==================================================== */
.page-contactos {
  background-color: #f5f7fa;
  min-height: 100vh;
}

.contacts-area {
  width: 100%;
  min-width: 900px;
  margin: auto;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: auto;
  align-items: stretch;
  gap: 20px;
  padding: 10px;
  background: transparent;
  justify-items: center;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.contact-card {
  height: 100%;
  width: 100%;
  background: white;
  justify-content: flex-start;
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  flex: 1;
}

.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.contact-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  border: 3px solid #f1f1f1;
  transition: all 0.3s ease;
}

.contact-card:hover img {
  border-color: #3498db;
  transform: scale(1.05);
}

.contact-card table {
  width: 100%;
  margin-top: 10px;
  margin-left: 1vw;
}

.contact-card table td {
  text-align: left;
  padding: 4px 6px;
}

.contact-card table td:first-child {
  font-weight: 600;
  /* Etiquetas en negrita (Especialidad, Centro...) */
  width: 40%;
}

.name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}

/* ====================================================
   PÁGINA: EMPLEOS (empleos.html)
   ==================================================== */

.messages-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 1vh;
}

.job-offer {
  background: white;
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  max-height: 200px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.job-offer.expanded {
  max-height: 1000px;
}

.job-offer:not(.expanded)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to bottom, transparent, white);
  pointer-events: none;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.job-title {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 5px;
}

.job-school {
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 5px;
}

.job-location {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.tag {
  background-color: var(--bg);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--muted);
}

.tag-primary {
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--color-primary);
}

.job-description {
  line-height: 1.6;
  margin-bottom: 15px;
}

.job-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.read-more-btn {
  position: absolute;
  bottom: 1vh;
  right: 1vw;
  z-index: 10;
  background: var(--color-primary);
  opacity: 0.9;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.read-more-btn:hover {
  font-size: 1rem;
  font-weight: 600;
  text-shadow: 0 0 2px rgba(0, 0, 0, 1);
  opacity: 1;
}

.job-offer.expanded .read-more-btn {
  position: static;
  transform: none;
  margin-top: 10px;
}

.job-meta {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.job-date {
  font-style: italic;
}

/* Filtros Empleos */
#right-aside {
  background: var(--bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.stats-container {
  background: var(--bg);
  padding: 15px;
  border-radius: var(--border-radius);
  margin-top: 20px;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 -4px 8px rgba(255, 255, 255, 0.1);
}

.stat-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* ====================================================
   PÁGINA: PERFIL (perfil.html)
   ==================================================== */
.perfil-container {
  display: grid;
  grid-template-columns: 260px 1fr 240px;
  gap: 24px;
  max-width: var(--container-max, 1400px);
  margin: 100px auto;
  padding: 0 1rem;
  align-items: start;
}

.perfil-contenido {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.entrada {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  overflow: hidden;
}

.entrada-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.entrada-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--fg);
}

.entrada-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.entrada-body img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
  object-fit: cover;
}

.entrada-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.likes {
  display: flex;
  gap: 12px;
  align-items: center;
}

.contador-likes {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(12, 24, 40, 0.06);
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.95),
      rgba(255, 255, 255, 0.85));
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.contador-likes:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.visitas {
  color: var(--muted);
  font-size: 0.95rem;
}

.card-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: auto;
}

/* ====================================================
   PÁGINA: MENSAJES (mensajes.html)
   ==================================================== */

/* Contenedor principal de mensajes */
.messages-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem;
}

/* Caja de mensaje individual */
.message-box {
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 -4px 8px rgba(255, 255, 255, 0.1);
  background: #e6e6e675;
  padding: 1.5rem;
  border-radius: 8px;
  position: relative;
  transition: all 0.3s ease;
  border-left: 4px solid #6ebef3;
  overflow: hidden;
  max-height: 20vh;
}

.message-box.msg-expanded-unique {
  /* El JS establece la altura exacta */
}

.message-box:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 4px 8px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

/* Cabecera del mensaje */
.message-header {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Metadatos del mensaje (fecha) */
.message-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Contenido del mensaje */
.message-content {
  max-height: 60px;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  line-height: 1.5;
  color: #444;
  margin-bottom: 1rem;
  position: relative;
}

.message-content.expanded {
  max-height: 900px;
}

/* Contenedor de botones */
.message-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  clear: both;
  /* Limpiar cualquier float */
  position: relative;
  z-index: 10;
}

/* Botones de acción */
.read-more-butn,
.reply-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 -2px 4px rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 20;
  flex-shrink: 0;
}

/* Botón "Leer más" */
.read-more-butn {
  background: #6ebef3;
  color: white;
  float: none;
  position: static;
}

.read-more-butn:hover {
  background: #5aa8e0;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Botón "Responder" */
.reply-btn {
  background: transparent;
  color: var(--color-primary, #007bff);
  border: 1px solid var(--color-primary, #007bff);
  float: none;
  position: static;
  margin-right: 0;
}

.reply-btn:hover {
  background: var(--color-primary, #007bff);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Modal de respuesta */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.reply-lightbox {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

/* Botón cerrar modal */
.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

/* Título del modal */
.reply-lightbox h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #333;
  font-size: 1.5rem;
}

/* Grupos de formulario */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #444;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary, #007bff);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input[readonly] {
  background-color: #f9f9f9;
  color: #666;
  cursor: not-allowed;
}

/* Botón de enviar en el modal */
.reply-lightbox .btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--color-primary, #007bff);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.reply-lightbox .btn-primary:hover {
  background: var(--color-primary-dark, #0056b3);
  transform: translateY(-1px);
}

.reply-lightbox .btn-primary:active {
  transform: translateY(0);
}

/* ============================
  PÁGINAS ASIDE (eventos, foros, recursos, faq)
============================ */

.content-shell {
  background: rgba(255, 255, 255, 0.9);
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #094032;
}

.evento-card,
.foro-card,
.recurso-card,
.faq-item {
  background: var(--surface);
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}

.evento-fecha,
.foro-meta {
  color: var(--muted);
  margin-bottom: 8px;
}

.recurso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.recurso-card h3 {
  margin-bottom: 10px;
}

.support-form input,
.support-form textarea {
  margin-bottom: 12px;
}


/* Estilos responsivos */
@media (max-width: 768px) {
  .messages-container {
    padding: 0.5rem;
    gap: 1rem;
  }

  .message-box {
    padding: 1.25rem;
  }

  .message-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .read-more-btn,
  .reply-btn {
    width: 100%;
    justify-content: center;
  }

  .reply-lightbox {
    padding: 1.5rem;
    margin: 1rem;
  }
}

@media (max-width: 480px) {
  .message-box {
    padding: 1rem;
  }

  .reply-lightbox {
    padding: 1.25rem;
  }

  .message-header {
    font-size: 1rem;
  }
}

/* Breakpoint: 1280px - Laptops y pantallas medianas */
@media (max-width: 1280px) {
  .sidebar {
    display: none;
  }

  .page-index .main-container {
    grid-template-areas: "main";
    grid-template-columns: 1fr;
  }
}

/* Breakpoint: 992px - Tablets landscape */
@media (max-width: 992px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .perfil-card,
  #right-aside {
    display: none;
  }
}

/* Breakpoint: 900px - Tablets y dispositivos medianos */
@media (max-width: 900px) {

  #sidebar-maestros-izquierda,
  #sidebar-perfil-izquierda,
  #sidebar-perfil-derecha {
    display: none;
  }

  .perfil-container {
    grid-template-columns: 1fr;
    margin: 80px 12px;
  }

  .coles-container.list-main,
  .maestros-main {
    margin: 80px 12px;
    flex-direction: column;
  }

  .colegio-card,
  .maestro-card {
    min-height: auto;
    padding: 16px;
  }

  .controls,
  .maestros-controls {
    justify-content: stretch;
    gap: 10px;
  }

  .search-filters,
  .maestros-search-filters {
    width: 100%;
  }

  .controls input[type="search"],
  .controls select,
  .maestros-controls input[type="search"],
  .maestros-controls select {
    flex: 1;
    min-width: 140px;
  }

  .list-content,
  .maestros-content {
    max-width: 100%;
  }

  .card-grid,
  .maestros-grid {
    grid-template-columns: 1fr;
  }

  .contacts-area {
    min-width: auto;
  }
}

/* Breakpoint: 768px - Tablets portrait y móviles grandes */
@media (max-width: 768px) {
  .page-index .content-box p {
    font-size: 2.5rem;
    line-height: 1.3;
  }

  .modal-body {
    flex-direction: column;
  }

  .modal-info {
    flex: 1 1 100%;
  }

  .modal-logo {
    width: 100%;
    height: 180px;
  }

  .header-nav {
    padding: 0 0.8rem;
  }

  .menu {
    gap: 0.5rem;
    font-style: fantasy, var(--font-serif);
  }

  .menu a {
    font-size: 1.2rem;
    padding: 6px 12px;
  }
}

/* Breakpoint: 600px - Móviles */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
  }

  .entrada-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .likes {
    justify-content: space-between;
  }
}

/* Estados vacíos y de carga */
.empty-state,
.maestros-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #4b5950;
  grid-column: 1 / -1;
}

.empty-state h3,
.maestros-empty-state h3 {
  color: #094032;
  margin-bottom: 12px;
}
