
/* Import modular section styles */
@import './hero.css';
@import './footer.css';
@import './forms.css';
@import './student-panel.css';
@import './modal.css';
@import './nav.css';
@import './login.css';
@import './result-table.css';
@import './constancia-preview.css';
@import './estudiante-form.css';
@import './content.css';

.page {
  min-height: 100svh;
  background: var(--cream);
  color: var(--ink);
}

.container {
  width: min(1200px, 100% - 64px);
  margin: 0 auto;
}


.search-api-error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 4px solid #8d1f3f;
  background: #fcf0f3;
  color: #5a1a2e;
  font-weight: 600;
}

.result-loading {
  margin: 0 0 10px;
  color: #625650;
  font-weight: 600;
}

.login-message {
  margin: 14px 0 0;
  border-left: 4px solid var(--gold);
  background: #fcf8f3;
  padding: 10px 12px;
  color: #5a4b43;
}


.panel-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(30, 22, 18, 0.52);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 14px 32px;
  overflow-y: auto;
}

.panel-modal-card {
  width: min(760px, 100%);
  margin: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 28px 56px rgba(40, 20, 30, 0.22);
  border: 1px solid #e4d8d2;
  max-height: min(calc(100vh - 40px), 900px);
  display: flex;
  flex-direction: column;
}

.panel-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--vino) 0%, var(--vino-dark) 100%);
  color: #fff;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.panel-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.panel-modal-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
}

.panel-modal-close:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.panel-modal-close:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.panel-modal-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.panel-modal-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #fcf0f3;
  border-left: 4px solid #8d1f3f;
  color: #5a1a2e;
  font-weight: 600;
  font-size: 15px;
}



@media (max-width: 640px) {

  .panel-modal-card {
    max-height: calc(100vh - 24px);
  }
}

.hero {
  background-color: var(--vino);
  background-image: url('../img/backgroundheroweb.png');
  background-repeat: no-repeat, repeat-y, no-repeat, no-repeat;
  background-size: 100% 100%, 50% auto, 50% 100%, 50% 100%;
  color: #fff;
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) {
  .hero {
    background-image: url('../img/backgroundheromovil.png');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
  }
}

.hero .container {
  width: min(1860px, 100% - 36px);
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background: repeating-linear-gradient(
    -30deg,
    rgba(255, 255, 255, 0.08) 0,
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px,
    transparent 16px
  );
  opacity: 0.5;
}

.hero::after {
  background: radial-gradient(
      circle at 28% 35%,
      rgba(255, 255, 255, 0.12),
      transparent 18%
    ),
    radial-gradient(circle at 55% 25%, rgba(255, 255, 255, 0.1), transparent 16%);
  opacity: 0.35;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 340px;
  padding: 22px 0 24px;
  gap: 10px;
}

.hero__art {
  position: relative;
  height: 306px;
}

.art {
  position: absolute;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

.art--left {
  width: 334px;
  left: -2px;
  top: 16px;
  transform: rotate(-20deg);
}

.art--center {
  width: 246px;
  left: 236px;
  top: -2px;
}

.art--right {
  width: 228px;
  right: -8px;
  top: 64px;
  transform: rotate(14deg);
}

.hero__text {
  text-align: left;
  padding-left: 10px;
}

.eyebrow {
  display: none;
}

.hero__text h1 {
  max-width: 760px;
  font-size: 76px;
  line-height: 0.95;
  margin: 0 0 12px;
  color: #fff;
}

.hero__sub {
  max-width: 800px;
  font-size: 56px;
  line-height: 1;
  font-family: var(--heading);
  color: rgba(255, 255, 255, 0.95);
  white-space: normal;
  margin: 0;
}

@media (max-width: 1280px) {
  .hero .container {
    width: min(1860px, 100% - 48px);
  }

  .hero__text h1 {
    font-size: 54px;
  }

  .hero__sub {
    font-size: 38px;
    white-space: normal;
  }
}

.content {
  background: #fff;
  padding: 32px 0 56px;
}





.notice {
  margin: 40px 0 16px;
  text-align: left;
  color: #3a2f2c;
}

.notice h3 {
  font-size: 20px;
  margin: 0 0 10px;
  text-align: center;
}

.notice p {
  font-size: 22px;
}

.card {
  background: #fafafa;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(30, 20, 18, 0.12);
  border: 1px solid #ece7e4;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e2d9d4;
  padding: 0 24px;
}

.tab {
  background: transparent;
  border: none;
  padding: 14px 18px;
  font-size: 15px;
  cursor: pointer;
  color: #6a5c57;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 16px;
}

.card__body--cedula .actions {
  margin-top: 48px;
}

.btn {
  padding: 10px 22px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 15px;
}

.btn.primary {
  background: #fff;
  border-color: var(--vino);
  color: var(--vino);
}

.btn.secondary {
  background: #fff;
  border-color: var(--gold);
  color: #7a5c30;
}

.btn.add-student__toggle {
  background: var(--vino-dark);
  color: #fff;
}

.add-student {
  margin-top: 18px;
}

.add-student__form {
  margin-top: 12px;
  border: 1px solid #e5dbd6;
  border-radius: 10px;
  background: #fcfbfa;
  padding: 18px;
}

.add-student__form h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.add-student__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.add-student__grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  color: #443a36;
}

.add-student__grid input {
  border: 1px solid #d6cdc8;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.add-student__error {
  margin: 14px 0 0;
  color: #8d1f3f;
  font-weight: 600;
}

.add-student__actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.btn.muted {
  background: #b9b9b9;
  color: #fff;
}

.student-panel__constancia-btn {
  padding: 6px 12px;
  font-size: 13px;
}


.social {
  display: flex;
  gap: 14px;
  margin: 12px 0 18px;
}

.social__item {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  opacity: 0.95;
}

.social__item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.support {
  display: flex;
  gap: 0;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 8px;
  line-height: 1;
}

.support__icon-image {
  width: 290px;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 980px) {
  .topbar__inner {
    height: auto;
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar__nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    padding: 32px 0 48px;
  }

  .hero__art {
    height: 250px;
  }

  .hero__text h1 {
    font-size: 46px;
  }

  .art--left {
    width: 270px;
    left: 0;
    top: 20px;
  }

  .art--center {
    width: 200px;
    left: 190px;
  }

  .art--right {
    width: 180px;
    right: 30px;
    top: 56px;
  }

  .hero__sub {
    font-size: 34px;
    white-space: normal;
  }

  

  .add-student__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-title {
    font-size: 24px;
  }

  .cedula-field {
    font-size: 20px;
  }

  .cedula-field input {
    font-size: 16px;
  }


  .support__icon-image {
    width: 210px;
  }


  .login-card {
    width: min(760px, 100%);
    grid-template-columns: 1fr;
  }

  .login-card__brand-panel {
    padding: 20px 22px;
    gap: 12px;
  }

  .login-card__brand-panel img {
    width: min(290px, 100%);
  }

  .login-card__body h2 {
    font-size: 34px;
  }
}


@media (max-width: 640px) {

  .nav-drop__link--search {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .container {
    width: min(1200px, 100% - 32px);
  }

  .topbar__inner {
    height: 74px;
    padding: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .brand img {
    height: 42px;
  }

  .topbar__nav a,
  .icon-btn--search {
    display: none;
  }

  .topbar__nav {
    width: auto;
    gap: 0;
    justify-content: flex-end;
  }

  .icon-btn--menu {
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    line-height: 0;
    place-items: center;
  }

  .icon-btn--menu svg {
    width: 26px;
    height: 26px;
  }


  .add-student__grid {
    grid-template-columns: 1fr;
  }

  .login-wrap {
    padding: 24px 0 40px;
  }

  .login-card {
    border-radius: 12px;
  }

  .login-card__body {
    padding: 24px 20px 22px;
  }

  .login-card__body h2 {
    font-size: 30px;
  }

  .login-card__subtitle {
    font-size: 16px;
  }

  .login-form input {
    font-size: 16px;
  }

  .login-btn {
    font-size: 18px;
    height: 48px;
  }

  .hero {
    background-size: 100% 100%, 52% auto, 52% 100%, 48% 100%;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 12px 0 16px;
    gap: 6px;
  }

  .hero__art {
    height: 236px;
  }

  .art--left {
    width: 178px;
    left: 20px;
    top: 48px;
    transform: rotate(-28deg);
  }

  .art--center {
    width: 154px;
    left: 122px;
    top: 36px;
  }

  .art--right {
    width: 108px;
    right: 24px;
    top: 82px;
    transform: rotate(-22deg);
  }

  .hero__text {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero__text h1 {
    font-size: 28px;
    line-height: 1.02;
    margin: 0 0 8px;
    max-width: 100%;
  }

  .hero__sub {
    font-size: 20px;
    line-height: 1.08;
    max-width: 100%;
  }

  .notice p {
    font-size: 20px;
  }

  .cedula-field {
    max-width: 100%;
    font-size: 18px;
  }

  .cedula-field input {
    font-size: 16px;
  }

  .actions {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: stretch;
    gap: 8px;
    align-items: stretch;
  }

  .actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 5px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
  }

  .result-title {
    font-size: 22px;
  }

  .result-table th,
  .result-table td {
    font-size: 13px;
  }

  .page-btn {
    min-width: 36px;
    height: 36px;
    font-size: 18px;
  }


}


/* --- ESTILO PARA ESCRITORIO (WEB) --- */
.lead {
  width: 100%;
  max-width: none;       /* Ocupa todo el contenedor en web */
  font-size: 18px;
  line-height: 1.6;
  color: #5d524d;
  margin-bottom: 32px;
  text-align: left;      /* En web se mantiene alineado a la izquierda */
}


.content h2 {
  text-align: left;
  margin-bottom: 8px;
}

.notice {
  margin: 32px 0;
  text-align: left; /* Alineación base recta con el container */
}

.notice h3 {
  font-size: 20px; /* Tamaño escritorio */
  margin: 0 0 8px;
  color: #333;
}

.notice p {
  font-size: 18px; /* Tamaño escritorio */
  color: #666;
  margin: 0;
}


.icon-home {
  width: 16px;
  height: 16px;
  margin-bottom: 2px;
}

.curp-label {
  display: flex;
  flex-direction: column; /* El input abajo, pero el texto de arriba en fila */
  gap: 8px;
  font-weight: 600;
  color: #443a36;
}

/* Contenedor del texto del label */
.label-text-wrapper {
  display: flex;
  align-items: center;    /* Alineación vertical perfecta */
  white-space: nowrap;    /* Fuerza a que NO salte de línea */
  gap: 5px;               /* Espacio entre CURP y la URL */
}

.label-url {
  font-size: 11px;        /* Más pequeño */
  font-weight: 400;
  color: #888;
  letter-spacing: -0.2px;
  font-weight: bold; /* Opcional: para que quepa mejor */
}
/* --- ESTILO PARA MÓVIL (SÚPER CENTRADO) --- */
@media (max-width: 640px) {
  .content h2 {
    text-align: center; /* Título centrado en móvil */
    font-size: 1.4rem;
  }

  .rule {
    width: 50px;
    /* Para colocarla a la DERECHA:
       margin-left: auto hace que el espacio vacío esté a la izquierda, 
       empujando la línea al borde derecho.
    */
    margin-left: 1; 
    margin-right: auto;
    margin-bottom: 10px;
  }
  
  .lead {
    hyphens: auto;
    text-justify: inter-word;
    font-size: 14px; /* Texto más pequeño y legible */
    line-height: 1.5;
    text-wrap: balance;
  }

  .titlesection {
    text-justify: inter-word; /* Super centrado en móvil */
  
    text-wrap: balance;
  }
  /* Ajustes solicitados para la zona de Constancia */
  .notice {
    text-justify: center; /* Super centrado en móvil */
  }

  .notice h3 {
    font-size: 16px; /* REBAJADO: Texto más discreto en móvil */
    font-weight: 700;
  }

  .notice p {
    font-size: 14px; /* REDUCIDO: Mucho más alineado y pequeño */
    line-height: 1.4;
  }

  .label-url {
    font-size: 10px;
    display: block;      /* Hace que la URL baje para no amontonarse */
    margin-left: 0;
    margin-top: -4px;    /* Pega un poco más al título superior */
  }
}



/* 1. REGISTRO CON RUTA CORREGIDA */
@font-face {
  font-family: 'PatriaCustom';
  src: url('../fonts/patria.ttf') format('truetype'),
       url('../fonts/patria.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 2. APLICACIÓN */
h1, h2 {
  font-family: 'PatriaCustom', sans-serif !important;
}
