/* ==========================================================================
   CONVENIOS - Diseno comercial alineado a la marca (calido: naranja/cafe/dorado)
   ========================================================================== */

.convenios-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1rem 3.5rem;
  color: var(--text, #221A16);
}

/* ----------------------------- HERO ----------------------------- */
.convenios-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, #FFE3CC 0%, rgba(255, 227, 204, 0) 55%),
    linear-gradient(135deg, #FFF8F1 0%, #FFF1E6 100%);
  border: 1px solid var(--border, #E8D8CF);
  border-radius: 18px;
  padding: 2.4rem 1.8rem;
  box-shadow: var(--shadow-md, 0 12px 28px rgba(34, 26, 22, 0.08));
  margin-bottom: 1.5rem;
}

.convenios-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.10) 0%, rgba(255, 107, 0, 0) 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--naranja-cta, #FF6B00), #FF8A2B);
  box-shadow: 0 8px 18px rgba(255, 107, 0, 0.28);
}

.convenios-hero h1 {
  margin: 0.85rem 0 0.55rem;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.18;
  color: var(--cafe-profundo, #3A1207);
  max-width: 18ch;
}

.convenios-hero > p {
  margin: 0;
  color: var(--muted, #6F5D55);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

/* Tira de credibilidad */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px dashed var(--border, #E8D8CF);
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text, #221A16);
  font-weight: 600;
}

.hero-stat i {
  color: var(--naranja-cta, #FF6B00);
  font-size: 1.15rem;
}

.hero-stat strong {
  color: var(--cafe-oscuro, #6B1B00);
  font-family: Poppins, Inter, sans-serif;
}

/* ----------------------------- BOTONES ----------------------------- */
.btn-main,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 12px;
  padding: 0.8rem 1.25rem;
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-main {
  background: linear-gradient(135deg, var(--naranja-cta, #FF6B00), #FF852A);
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 107, 0, 0.28);
}

.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(255, 107, 0, 0.36);
}

.btn-secondary {
  background: #fff;
  color: var(--cafe-oscuro, #6B1B00);
  border-color: var(--cafe-oscuro, #6B1B00);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--cafe-oscuro, #6B1B00);
  color: #fff;
  box-shadow: 0 12px 24px rgba(107, 27, 0, 0.22);
}

/* ----------------------------- MODELOS (TARJETAS) ----------------------------- */
.section-title {
  text-align: center;
  margin: 2.2rem 0 0.4rem;
}

.section-title h2 {
  margin: 0;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  color: var(--cafe-profundo, #3A1207);
}

.section-title p {
  margin: 0.4rem auto 0;
  color: var(--muted, #6F5D55);
  max-width: 60ch;
}

.modelos-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin: 1.4rem 0 1.8rem;
}

.modelo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #E8D8CF);
  border-radius: 18px;
  padding: 1.6rem 1.3rem 1.3rem;
  box-shadow: var(--shadow-sm, 0 4px 12px rgba(34, 26, 22, 0.06));
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

/* Barra de acento superior por tarjeta */
.modelo-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--accent-bar, var(--naranja-cta, #FF6B00));
}

.modelo-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg, 0 18px 44px rgba(34, 26, 22, 0.14));
  border-color: var(--accent-bar, var(--naranja-cta, #FF6B00));
}

/* Variantes de color por tarjeta */
.modelo-card:nth-child(1) { --accent-bar: var(--naranja-cta, #FF6B00); --accent-soft: #FFF1E6; --accent-ink: #B34A00; }
.modelo-card:nth-child(2) { --accent-bar: var(--dorado, #D89A20);     --accent-soft: #FFF6E2; --accent-ink: #9A6B0E; }
.modelo-card:nth-child(3) { --accent-bar: var(--cafe-oscuro, #6B1B00); --accent-soft: #FBEDE7; --accent-ink: #6B1B00; }

.modelo-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--accent-soft, #FFF1E6);
  color: var(--accent-ink, #B34A00);
  margin-bottom: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.modelo-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--verde-ok, #16A34A);
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.28);
}

.modelo-card h2 {
  margin: 0 0 0.5rem;
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.18rem;
  line-height: 1.25;
  color: var(--cafe-profundo, #3A1207);
}

.modelo-card > p {
  margin: 0 0 0.9rem;
  color: var(--muted, #6F5D55);
  line-height: 1.5;
}

.modelo-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text, #221A16);
  line-height: 1.45;
}

.modelo-card li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.5rem;
}

.modelo-card li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.05rem;
  color: var(--accent-ink, #B34A00);
  font-size: 0.82rem;
}

.modelo-foot {
  margin-top: auto;
  padding-top: 1rem;
}

.modelo-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-ink, #B34A00);
  background: var(--accent-soft, #FFF1E6);
}

/* ----------------------------- CONTROL DE RIESGO ----------------------------- */
.control-section {
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(255, 107, 0, 0.18) 0%, rgba(255, 107, 0, 0) 45%),
    linear-gradient(135deg, var(--cafe-profundo, #3A1207) 0%, var(--cafe-oscuro, #6B1B00) 100%);
  color: #FFF8F1;
  border-radius: 18px;
  padding: 1.8rem 1.6rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md, 0 12px 28px rgba(34, 26, 22, 0.08));
}

.control-section h2 {
  margin: 0 0 0.4rem;
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.control-section h2 i {
  color: var(--dorado, #D89A20);
}

.control-section .control-sub {
  margin: 0 0 1.2rem;
  color: rgba(255, 248, 241, 0.78);
  max-width: 60ch;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.control-item {
  position: relative;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1.1rem 1rem 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.control-item strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  margin-bottom: 0.6rem;
  font-family: Poppins, Inter, sans-serif;
  font-size: 1rem;
  color: var(--cafe-profundo, #3A1207);
  background: var(--dorado, #D89A20);
}

/* ----------------------------- FORMULARIO ----------------------------- */
.convenio-form-section {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 1.15rem;
}

.form-panel,
.info-panel {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #E8D8CF);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm, 0 4px 12px rgba(34, 26, 22, 0.06));
}

.form-panel h2 {
  margin: 0 0 0.35rem;
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.4rem;
  color: var(--cafe-profundo, #3A1207);
}

.form-panel > p {
  margin: 0 0 1.1rem;
  color: var(--muted, #6F5D55);
}

.convenio-form {
  display: grid;
  gap: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.form-group {
  display: grid;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cafe-oscuro, #6B1B00);
}

.form-group label i {
  color: var(--naranja-cta, #FF6B00);
  margin-right: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--border, #E8D8CF);
  border-radius: 12px;
  padding: 0.72rem 0.8rem;
  font-size: 0.96rem;
  font-family: inherit;
  background: var(--beige, #FFF8F1);
  color: var(--text, #221A16);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--naranja-cta, #FF6B00);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.16);
}

.btn-submit {
  width: 100%;
  margin-top: 0.4rem;
  font-size: 1.02rem;
}

/* ----------------------------- INFO PANEL ----------------------------- */
.info-panel {
  background:
    radial-gradient(120% 120% at 100% 0%, #FFF1E6 0%, rgba(255, 241, 230, 0) 60%),
    var(--surface, #fff);
}

.info-panel h3 {
  margin: 0 0 1rem;
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.18rem;
  color: var(--cafe-profundo, #3A1207);
}

.info-panel ul {
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.info-panel li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--text, #221A16);
  line-height: 1.45;
  font-weight: 500;
}

.info-panel li + li {
  margin-top: 0.7rem;
}

.info-panel li i {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  color: #fff;
  background: var(--verde-ok, #16A34A);
  margin-top: 0.1rem;
}

.btn-secondary.full {
  width: 100%;
}

/* ----------------------------- RESPONSIVE ----------------------------- */
@media (max-width: 1024px) {
  .modelos-section {
    grid-template-columns: 1fr 1fr;
  }
  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .convenio-form-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .convenios-main {
    padding: 1.25rem 0.85rem 2.5rem;
  }
  .convenios-hero {
    padding: 1.8rem 1.25rem;
    border-radius: 16px;
  }
  .convenios-hero h1 {
    max-width: none;
  }
  .hero-actions .btn-main,
  .hero-actions .btn-secondary {
    flex: 1 1 100%;
  }
  .hero-stats {
    gap: 0.7rem 1.2rem;
  }
  .modelos-section {
    grid-template-columns: 1fr;
  }
  .control-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-panel,
  .info-panel,
  .control-section {
    padding: 1.25rem;
  }
}
