/* ===== Fuentes ===== */
@font-face {
  font-family: 'Montserrat';
  src: url('../Resources/Fonts/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../Resources/Fonts/Montserrat-SemiBold.ttf') format('truetype');
  font-weight: 600;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../Resources/Fonts/Montserrat-Bold.ttf') format('truetype');
  font-weight: 700;
}

/* ===== Reset & base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: #f4f4f4;
  color: #0f172a;
  -webkit-text-size-adjust: 100%;
}

/* Variables */
:root {
  --primary: #00594E;
  --primary-600: #0a6c60;
  --accent: #B5A160;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --muted: #6b7280;
  --shadow: 0 6px 20px rgba(0,0,0,.08);
}

/* ===== Mensaje persistente ===== */
.status-message {
  display: none;
  text-align: center;
  font-weight: 600;
  padding: 12px;
  margin: 0 16px 10px 16px;
  border-radius: 8px;
}
.status-message.success { background: #d1fae5; color: #065f46; }
.status-message.warning { background: #fef3c7; color: #92400e; }
.status-message.error   { background: #fee2e2; color: #991b1b; }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 20px auto;
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.content { padding: 20px 16px; }

/* ===== Header ===== */
.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 12px;
  margin-bottom: 12px;
}
.logo-universidad { max-height: 48px; width: auto; }
.header h1 {
  font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  line-height: 1.25;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}
@media (max-width: 380px) {
  .header { grid-template-columns: 1fr; row-gap: 8px; }
  .logo-universidad { justify-self: center; max-height: 44px; }
}

/* ===== Nav (botón volver arriba) ===== */
.menu.top-menu {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}
.btn-nav {
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  min-height: 44px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  transition: background-color .2s, transform .2s;
}
.btn-nav:hover {
  background: var(--accent);
  transform: scale(1.05);
}

/* ===== Form ===== */
.formulario {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafafa;
  padding: 16px;
  border-radius: 12px;
  border: 1.5px solid var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.formulario label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
}
.formulario input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.2;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.formulario input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 89, 78, .15);
}
.nota-correo {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: -6px;
  margin-bottom: 4px;
  display: block;
}

.btn-submit {
  background: var(--primary);
  color: #fff;
  padding: 14px;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: transform .08s ease, background-color .2s ease;
  touch-action: manipulation;
}
.btn-submit:active { transform: scale(.98); }
.btn-submit:hover  { background: var(--primary-600); }

/* ===== Footer ===== */
.footer {
  background-color: var(--primary);
  color: white;
  padding: 20px 16px;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 10px;
  text-align: center;
}
.footer-center { display: flex; flex-direction: column; gap: 4px; }
.footer p { margin: 3px 0; font-size: 0.9rem; }
.footer-container p:first-child { font-size: 0.95rem; font-weight: 700; }
.footer .logo-universidad, .footer .logo-seminario {
  max-height: 56px;
  width: auto;
  justify-self: center;
}

/* Tablets/desktop */
@media (min-width: 768px) {
  .content { padding: 36px; }
  .header { grid-template-columns: auto 1fr auto; column-gap: 20px; }
  .logo-universidad { max-height: 90px; }
  .header h1 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); }
  .formulario { padding: 24px; gap: 15px; }
  .nota-correo { font-size: 0.9rem; }
  .footer {
    grid-template-columns: auto 1fr auto;
    column-gap: 20px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
  }
  .footer .logo-universidad, .footer .logo-seminario { max-height: 100px; }
}

/* ===== Modales ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0,0,0,.45);
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.modal-content {
  background-color: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  text-align: center;
  max-width: 480px;
  width: 100%;
  transform: translateY(-12px);
  opacity: 0;
  animation: modal-fade-in .28s forwards cubic-bezier(.25,.46,.45,.94);
}
.modal-content h2 { font-size: 1.3rem; margin-bottom: 8px; }
.modal-content p  { font-size: 0.98rem; color: #555; margin-bottom: 18px; }
.modal-content .icon {
  font-size: 2.8rem;
  margin-bottom: 10px;
  display: block;
}
.modal-content.success h2 { color: #28a745; }
.modal-content.warning h2 { color: #ffc107; }
.modal-content.error   h2 { color: #dc3545; }

.btn-close-modal {
  background-color: var(--primary);
  color: white;
  padding: 12px 18px;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background-color .2s;
}
.btn-close-modal:hover { background-color: var(--accent); }

@keyframes modal-fade-in {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
