/* ═══════════════════════════════════════════════════════════════
   styles.css – Fundación Tejiendo Redes · Inscripciones 2026
   ═══════════════════════════════════════════════════════════════ */

/* ── RESET & VARIABLES ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:        #0d1b2e;
  --navy-mid:    #162640;
  --navy-light:  #1e3558;
  --teal:        #1aacaa;
  --teal-dark:   #128a88;
  --teal-light:  #4ecdc4;
  --amber:       #f4c430;
  --white:       #ffffff;
  --gray-100:    #f4f6f9;
  --gray-200:    #e2e8f0;
  --gray-500:    #94a3b8;
  --gray-700:    #475569;
  --success:     #22c55e;
  --danger:      #ef4444;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 8px 32px rgba(0, 0, 0, 0.18);
}

/* ── BASE ───────────────────────────────────────────────────────── */
body {
  font-family: 'Barlow', sans-serif;
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════ */
.site-header {
  background: var(--navy-mid);
  border-bottom: 2px solid var(--teal);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-img {
  height: 80px;
  object-fit: contain;
}

.logo-text h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.1;
}

.logo-text p {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-top: 4px;
}

.tagline-bar {
  text-align: center;
  padding: 10px 24px;
  background: var(--navy-light);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════════
   SECTION TITLE
   ══════════════════════════════════════════════════════════════════ */
.section-title {
  text-align: center;
  padding: 40px 24px 20px;
}

.section-title h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--white);
}

.title-line {
  width: 60px;
  height: 4px;
  background: var(--teal);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ══════════════════════════════════════════════════════════════════
   COURSE CARDS
   ══════════════════════════════════════════════════════════════════ */
.course-grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.course-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Image side */
.course-img-side {
  position: relative;
  background: linear-gradient(135deg, #0a2a4a 0%, #0d3b5e 100%);
  min-height: 220px;
  overflow: hidden;
}

.course-img-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.course-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(5, 15, 30, 0.95));
}

.course-tag {
  display: inline-block;
  background: var(--amber);
  color: #1a1000;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.course-img-overlay h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Info side */
.course-info-side {
  background: var(--navy-light);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.course-badge-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}

.course-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-200);
}

.feature-icon {
  width: 22px;
  height: 22px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 12px;
  height: 12px;
  fill: var(--white);
}

/* ══════════════════════════════════════════════════════════════════
   FORM CARD WRAPPER
   ══════════════════════════════════════════════════════════════════ */
.form-wrapper {
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: #1e293b;
}

/* ── Price Banner ───────────────────────────────────────────────── */
.price-banner {
  background: #f0faf9;
  border-bottom: 1.5px solid #cce8e7;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.price-left strong {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0a4a48;
}

.price-left .alias-info {
  font-size: 0.8rem;
  color: var(--gray-700);
  margin-top: 4px;
}

.price-left .alias-info span {
  color: var(--teal-dark);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.payment-box {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 0.82rem;
  color: #5a4000;
}

.payment-box strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #b45309;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.payment-box a {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: none;
}

/* ── Form Sections Grid ─────────────────────────────────────────── */
.form-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.form-section {
  padding: 28px;
}

.form-section:first-child {
  border-right: 1px solid var(--gray-200);
}

.section-heading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-dark);
  border-bottom: 2px solid var(--teal);
  padding-bottom: 8px;
  margin-bottom: 20px;
}

/* ── Field Groups ───────────────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input,
.field select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 7px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.9rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26, 172, 170, 0.12);
}

.field input::placeholder {
  color: var(--gray-500);
}

.field input.error,
.field select.error {
  border-color: var(--danger);
}

/* Select wrapper (custom arrow) */
.select-wrap {
  position: relative;
}

.select-wrap select {
  padding-right: 32px;
  cursor: pointer;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-top-color: var(--gray-500);
  pointer-events: none;
}

/* ── File Upload Fields ─────────────────────────────────────────── */
.file-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}

.file-field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.file-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: 7px;
  padding: 6px 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
}

.file-input-wrap:hover {
  border-color: var(--teal);
}

.file-input-wrap.error {
  border-color: var(--danger);
}

.file-input-wrap input[type="file"] {
  display: none;
}

.file-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  white-space: nowrap;
}

.file-name {
  font-size: 0.78rem;
  color: var(--gray-500);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name.selected {
  color: #059669;
}

/* Comprobante de pago (dashed border) */
.file-comprobante {
  border: 1.5px dashed #d4b96a;
  background: #fffbf0;
}

.file-comprobante:hover {
  border-color: var(--amber);
}

/* ── Submit Button ──────────────────────────────────────────────── */
.form-footer {
  padding: 20px 28px 28px;
  border-top: 1px solid var(--gray-200);
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-submit:hover {
  background: var(--teal-dark);
}

.btn-submit:active {
  transform: scale(0.99);
}

.btn-submit:disabled {
  background: var(--gray-500);
  cursor: not-allowed;
}

.form-disclaimer {
  text-align: center;
  font-size: 0.7rem;
  color: var(--gray-500);
  margin-top: 10px;
}

/* ══════════════════════════════════════════════════════════════════
   MODAL – ÉXITO
   ══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

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

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  color: #1e293b;
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: #d1fae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.modal-icon svg {
  width: 32px;
  height: 32px;
  fill: #059669;
}

.modal-box h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-box p {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.modal-close {
  margin-top: 20px;
  padding: 10px 28px;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--teal-dark);
}

/* ══════════════════════════════════════════════════════════════════
   TOAST – ERROR
   ══════════════════════════════════════════════════════════════════ */
.toast {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--danger);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast.show {
  display: block;
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 24px;
  color: var(--gray-500);
  font-size: 0.78rem;
  border-top: 1px solid var(--navy-light);
}

.site-footer p + p {
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  .course-card {
    grid-template-columns: 1fr;
  }

  .course-img-side {
    min-height: 160px;
  }

  .form-sections {
    grid-template-columns: 1fr;
  }

  .form-section:first-child {
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .price-banner {
    flex-direction: column;
  }

  .logo-block {
    flex-direction: column;
    text-align: center;
  }

  .logo-text h1 {
    font-size: 1.5rem;
  }
}
