/* ==================================================
   COMUNIDAD GARANTÍASUY
   ESTILO EDITORIAL
================================================== */


/* ==================================================
   1. HERO
================================================== */

.community-hero {
  padding: 6.5rem 0 6rem;
  background-color: var(--page);
  border-bottom: 1px solid var(--line);
}

.community-hero-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.15fr)
    minmax(320px, 0.85fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.community-hero-content {
  max-width: 760px;
  min-width: 0;
}

.community-hero-content h1 {
  max-width: 760px;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}

.community-hero-description {
  max-width: 650px;
  font-size: 1rem;
  line-height: 1.78;
}

.community-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.community-hero-note {
  max-width: 620px;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.6;
}


/* ==================================================
   2. RESUMEN DEL HERO
================================================== */

.community-hero-summary {
  width: 100%;
  min-width: 0;
  padding: 1.4rem 0;
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid var(--line);
}

.community-summary-label {
  display: block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.community-summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.community-summary-list li {
  position: relative;
  padding: 0.9rem 0 0.9rem 1rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.73rem;
  line-height: 1.55;
}

.community-summary-list li:last-child {
  border-bottom: 0;
}

.community-summary-list li::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  content: "";
  background-color: var(--navy);
  border-radius: 50%;
  transform: translateY(-50%);
}


/* ==================================================
   3. BENEFICIOS
================================================== */

.community-benefits-section {
  padding: 6rem 0;
  background-color: var(--paper);
  border-bottom: 1px solid var(--line);
}

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

.community-benefit-card {
  min-width: 0;
  min-height: 220px;
  padding: 1.4rem;
  background-color: var(--page);
  border: 1px solid var(--line);
  transition:
    transform 250ms ease,
    background-color 250ms ease,
    border-color 250ms ease,
    box-shadow 250ms ease;
}

.community-benefit-card:hover {
  background-color: var(--paper-hover);
  border-color: var(--line-strong);
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.06);
  transform: translateY(-3px);
}

.community-benefit-card:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgb(24 51 72 / 0.08);
}

.community-benefit-index {
  display: block;
  margin-bottom: 2.2rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.community-benefit-card h3 {
  margin-bottom: 0.55rem;
  font-size: 1rem;
  line-height: 1.3;
}

.community-benefit-card p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.65;
}


/* ==================================================
   4. SECCIÓN DEL FORMULARIO
================================================== */

.community-form-section {
  padding: 6.5rem 0;
  color: var(--white);
  background-color: var(--navy-dark);
  scroll-margin-top: 90px;
}

.community-form-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 0.95fr)
    minmax(340px, 1.05fr);
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.community-form-introduction {
  max-width: 620px;
  min-width: 0;
}

.community-form-introduction h2 {
  margin-bottom: 1rem;
  color: var(--white);
  text-wrap: balance;
}

.community-form-introduction > p {
  max-width: 560px;
  color: #c6d0d6;
  font-size: 0.82rem;
  line-height: 1.75;
}

.community-privacy-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.6rem;
  padding: 0;
  list-style: none;
}

.community-privacy-list li {
  position: relative;
  padding-left: 1rem;
  color: #c6d0d6;
  font-size: 0.7rem;
  line-height: 1.55;
}

.community-privacy-list li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 5px;
  height: 5px;
  content: "";
  background-color: #c8d5dd;
  border-radius: 50%;
}


/* ==================================================
   5. PANEL DEL FORMULARIO
================================================== */

.community-form-panel {
  width: 100%;
  min-width: 0;
  padding: 1.6rem;
  background-color: var(--paper);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
  animation: communityFadeUp 450ms ease;
}

.community-lead-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.community-lead-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.community-lead-form .form-group label {
  color: var(--ink-soft);
}

.community-lead-form .form-group input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 0.9rem;
  color: var(--ink);
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background-color var(--transition);
}

.community-lead-form .form-group input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgb(24 51 72 / 0.08);
  outline: none;
}

.community-lead-form .form-group input::placeholder {
  color: var(--muted);
}

.community-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.55;
  cursor: pointer;
}

.community-consent input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 0.15rem;
  accent-color: var(--navy);
}

.community-consent span {
  min-width: 0;
}

.community-consent:focus-within {
  color: var(--ink);
}

.community-submit-button {
  width: 100%;
  min-height: 48px;
  margin-top: 0.4rem;
}


/* ==================================================
   6. MENSAJES DEL FORMULARIO
================================================== */

.community-form-message {
  margin: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  font-size: 0.71rem;
  line-height: 1.55;
}

.community-form-message[hidden] {
  display: none;
}

.community-form-message.is-success {
  color: var(--green);
  background-color: var(--green-soft);
  border-color: rgb(70 100 84 / 0.3);
}

.community-form-message.is-error {
  color: var(--red);
  background-color: var(--red-soft);
  border-color: rgb(145 71 71 / 0.3);
}

.community-form-message.is-info {
  color: var(--navy);
  background-color: var(--navy-soft);
  border-color: rgb(24 51 72 / 0.2);
}


/* ==================================================
   7. CONFIANZA
================================================== */

.community-trust-section {
  padding: 6rem 0;
  background-color: var(--paper);
  border-bottom: 1px solid var(--line);
}

.community-trust-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 0.95fr)
    minmax(0, 1.05fr);
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.community-trust-grid > * {
  min-width: 0;
}

.community-trust-grid h2 {
  max-width: 620px;
  text-wrap: balance;
}

.community-trust-copy {
  max-width: 620px;
}

.community-trust-copy p {
  margin-bottom: 1rem;
  font-size: 0.78rem;
  line-height: 1.75;
}

.community-trust-copy p:last-child {
  margin-bottom: 0;
}


/* ==================================================
   8. CIERRE
================================================== */

.community-closing-section {
  padding: 5rem 0;
  color: var(--white);
  background-color: var(--navy-dark);
}

.community-closing-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.community-closing-container > div {
  max-width: 760px;
  min-width: 0;
}

.community-closing-container h2 {
  margin-bottom: 0;
  color: var(--white);
  text-wrap: balance;
}

.community-closing-container .editorial-button {
  flex: 0 0 auto;
}


/* ==================================================
   9. INTERACCIONES
================================================== */

.community-lead-form input:focus-visible,
.community-lead-form button:focus-visible,
.community-consent input:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}


/* ==================================================
   10. ANIMACIONES
================================================== */

@keyframes communityFadeUp {

  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

}


/* ==================================================
   11. MODO OSCURO
================================================== */

body.dark-mode .community-form-section,
body.dark-mode .community-closing-section {
  background-color: #101820;
}

body.dark-mode .community-form-panel {
  background-color: var(--paper);
}

body.dark-mode .community-lead-form .form-group input {
  color: var(--ink);
  background-color: var(--paper-secondary);
}

body.dark-mode .community-consent {
  color: var(--ink-soft);
}
/* ==================================================
   12. RESPONSIVE — TABLET
================================================== */

@media (max-width: 1050px) {

  .community-hero {
    padding: 5.5rem 0 5rem;
  }

  .community-benefits-section,
  .community-trust-section {
    padding: 5rem 0;
  }

  .community-form-section {
    padding: 5.5rem 0;
  }

  .community-hero-grid,
  .community-form-grid,
  .community-trust-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .community-hero-content,
  .community-hero-summary,
  .community-form-introduction,
  .community-form-panel,
  .community-trust-copy {
    max-width: 760px;
  }

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

  .community-benefit-card {
    min-height: 200px;
  }

  .community-closing-container {
    align-items: flex-start;
  }

}


/* ==================================================
   13. RESPONSIVE — CELULAR
================================================== */

@media (max-width: 720px) {

  .community-hero,
  .community-benefits-section,
  .community-form-section,
  .community-trust-section {
    padding: 4.25rem 0;
  }

  .community-hero-grid,
  .community-form-grid,
  .community-trust-grid {
    gap: 2.5rem;
  }

  .community-hero-content h1 {
    margin-bottom: 1.15rem;
  }

  .community-hero-description {
    font-size: 0.92rem;
    line-height: 1.7;
  }

  .community-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin-top: 1.6rem;
  }

  .community-hero-actions .editorial-button {
    width: 100%;
  }

  .community-hero-actions .editorial-text-action {
    align-self: flex-start;
  }

  .community-hero-note {
    margin-top: 1.2rem;
    font-size: 0.65rem;
  }

  .community-hero-summary {
    padding: 1.2rem 0;
  }

  .community-summary-list li {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    font-size: 0.72rem;
  }


  /* BENEFICIOS */

  .community-benefits-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .community-benefit-card {
    min-height: auto;
    padding: 1.25rem;
  }

  .community-benefit-index {
    margin-bottom: 1.5rem;
  }

  .community-benefit-card h3 {
    font-size: 0.98rem;
  }

  .community-benefit-card p {
    font-size: 0.72rem;
  }


  /* FORMULARIO */

  .community-form-grid {
    gap: 2.5rem;
  }

  .community-form-introduction h2 {
    margin-bottom: 0.85rem;
  }

  .community-form-introduction > p {
    font-size: 0.8rem;
  }

  .community-privacy-list {
    margin-top: 1.35rem;
  }

  .community-form-panel {
    padding: 1.2rem;
    border-radius: var(--radius-medium);
  }

  .community-lead-form {
    gap: 0.95rem;
  }

  .community-lead-form .form-group input {
    min-height: 50px;
    font-size: 16px;
  }

  .community-consent {
    gap: 0.6rem;
    font-size: 0.69rem;
  }

  .community-submit-button {
    min-height: 50px;
  }


  /* CONFIANZA */

  .community-trust-grid {
    gap: 2rem;
  }

  .community-trust-copy p {
    font-size: 0.76rem;
    line-height: 1.7;
  }


  /* CIERRE */

  .community-closing-section {
    padding: 4rem 0;
  }

  .community-closing-container {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
  }

  .community-closing-container .editorial-button {
    width: 100%;
  }

}


/* ==================================================
   14. RESPONSIVE — CELULAR CHICO
================================================== */

@media (max-width: 430px) {

  .community-hero,
  .community-benefits-section,
  .community-form-section,
  .community-trust-section {
    padding: 3.75rem 0;
  }

  .community-hero-grid,
  .community-form-grid,
  .community-trust-grid {
    gap: 2rem;
  }

  .community-hero-content h1,
  .community-form-introduction h2,
  .community-trust-grid h2,
  .community-closing-container h2 {
    overflow-wrap: anywhere;
  }

  .community-hero-description {
    font-size: 0.88rem;
  }

  .community-summary-list li {
    padding-right: 0;
    font-size: 0.7rem;
  }

  .community-benefit-card {
    padding: 1.1rem;
  }

  .community-benefit-index {
    margin-bottom: 1.25rem;
  }

  .community-form-panel {
    padding: 1rem;
  }

  .community-lead-form .form-group input {
    padding-inline: 0.8rem;
  }

  .community-consent {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 0.55rem;
  }

  .community-form-message {
    padding: 0.75rem;
  }

  .community-closing-section {
    padding: 3.5rem 0;
  }

}


/* ==================================================
   15. PANTALLAS MUY CHICAS
================================================== */

@media (max-width: 360px) {

  .community-hero,
  .community-benefits-section,
  .community-form-section,
  .community-trust-section {
    padding: 3.25rem 0;
  }

  .community-form-panel {
    padding: 0.9rem;
  }

  .community-benefit-card {
    padding: 1rem;
  }

  .community-privacy-list li,
  .community-consent,
  .community-form-message {
    font-size: 0.67rem;
  }

}


/* ==================================================
   16. DISPOSITIVOS TÁCTILES
================================================== */

@media (hover: none) {

  .community-benefit-card:hover {
    background-color: var(--page);
    border-color: var(--line);
    box-shadow: none;
    transform: none;
  }

}


/* ==================================================
   17. MOVIMIENTO REDUCIDO
================================================== */

@media (prefers-reduced-motion: reduce) {

  .community-benefit-card,
  .community-form-panel {
    animation: none;
    transition: none;
  }

  .community-benefit-card:hover {
    transform: none;
    box-shadow: none;
  }

}


/* ==================================================
   18. IMPRESIÓN
================================================== */

@media print {

  .community-hero-actions,
  .community-form-section,
  .community-closing-section,
  .editorial-footer {
    display: none !important;
  }

  .community-hero,
  .community-benefits-section,
  .community-trust-section {
    padding: 1.5rem 0;
    color: #000;
    background: #fff;
  }

  .community-benefit-card {
    color: #000;
    background: #fff;
    border-color: #ccc;
    break-inside: avoid;
    box-shadow: none;
  }

}