/* ============================================================
   CPSEL EVOLUCIÓN — contacto.css
   Estilos exclusivos de la página de Contacto (v2)
   ============================================================ */

/* ===================================================================
   HERO DE CONTACTO
   =================================================================== */
.contact-hero {
  position: relative;
  padding: 5rem 0 0;
  background: linear-gradient(135deg, #071a2e 0%, #0e2f50 55%, #0a3d62 100%);
}

.contact-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(74, 204, 236, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(74, 204, 236, 0.07) 0%, transparent 60%);
  pointer-events: none;
}

.contact-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Texto superior */
.contact-hero-text {
  max-width: 640px;
}

.contact-hero-text .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(74, 204, 236, 0.15);
  color: var(--primary);
  border: 1px solid rgba(74, 204, 236, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
}

.contact-hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.contact-hero-text p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
  max-width: 500px;
}

/* Tarjetas de métodos de contacto */
.contact-hero-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  /* Extend to bottom of hero */
  margin-bottom: 0;
  padding-bottom: 0;
}

@media (min-width: 600px) {
  .contact-hero-methods {
    grid-template-columns: repeat(3, 1fr);
  }
}

.chm-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  /* Cards hang off the bottom edge */
  margin-bottom: -2.5rem;
  position: relative;
  z-index: 2;
}

.chm-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.chm-card--whatsapp:hover {
  border-color: #25D366;
}

.chm-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(74, 204, 236, 0.18);
  border: 1px solid rgba(74, 204, 236, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
}

.chm-card--whatsapp .chm-icon {
  background: rgba(37, 211, 102, 0.18);
  border-color: rgba(37, 211, 102, 0.25);
  color: #25D366;
}

.chm-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.chm-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.chm-value {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.chm-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* On mobile: single column, no hanging cards */
@media (max-width: 599px) {
  .chm-card {
    margin-bottom: 0;
  }
  .contact-hero {
    padding-bottom: 2.5rem;
  }
}

/* ===================================================================
   SECCIÓN PRINCIPAL: FORMULARIO + ASIDE
   =================================================================== */
.contact-body-section {
  padding: 5rem 0 4rem;
  background: var(--bg);
}

/* On desktop, add top padding to account for hanging cards */
@media (min-width: 600px) {
  .contact-body-section {
    padding-top: 5.5rem;
  }
}

.contact-body-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 960px) {
  .contact-body-grid {
    grid-template-columns: 1fr 360px;
    gap: 3rem;
  }
}

/* ===== Panel del formulario ===== */
.contact-form-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
}

@media (min-width: 640px) {
  .contact-form-panel {
    padding: 2.5rem 2.5rem;
  }
}

.cfp-header {
  margin-bottom: 2rem;
}

.cfp-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.cfp-header p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.cfp-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Two-column row within form */
.cfp-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 480px) {
  .cfp-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Form groups — inherit from main.css base, add specifics */
.cfp-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.cfp-form label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.req {
  color: #ef4444;
}

.cfp-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.cfp-form input,
.cfp-form select,
.cfp-form textarea {
  padding: 0.72rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  width: 100%;
  resize: vertical;
}

.cfp-form input:focus,
.cfp-form select:focus,
.cfp-form textarea:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(74, 204, 236, 0.12);
}

.cfp-form input.error,
.cfp-form select.error,
.cfp-form textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}

/* Custom select wrapper */
.cfp-select-wrap {
  position: relative;
}

.cfp-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
}

.cfp-select-arrow {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* Cobertura fields (conditional) */
.cfp-cobertura-fields {
  padding: 1rem;
  background: var(--primary-light);
  border: 1px solid rgba(74, 204, 236, 0.25);
  border-radius: var(--radius-sm);
  animation: fadeSlideDown 0.2s ease;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Error message */
.cfp-error {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  color: #dc2626;
  font-size: 0.88rem;
}

.cfp-error[hidden] {
  display: none !important;
}

[data-theme="dark"] .cfp-error {
  background: #3b0000;
  border-color: #7f1d1d;
  color: #fca5a5;
}

.cfp-error i { font-size: 1rem; flex-shrink: 0; }

/* Success message */
.cfp-success {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  background: var(--green-light);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  color: #166534;
  font-size: 0.9rem;
  animation: fadeSlideDown 0.25s ease;
}

.cfp-success[hidden] {
  display: none !important;
}

[data-theme="dark"] .cfp-success {
  background: #052e16;
  border-color: #166534;
  color: var(--green);
}

.cfp-success i { font-size: 1.2rem; color: var(--green); flex-shrink: 0; margin-top: 0.1rem; }
.cfp-success strong { display: block; margin-bottom: 0.15rem; font-size: 0.92rem; }
.cfp-success span { font-size: 0.85rem; opacity: 0.85; }

/* Form actions */
.cfp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.cfp-actions .btn {
  flex: 1;
  justify-content: center;
  min-width: 180px;
}

/* ===== Panel lateral (aside) ===== */
.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

/* Mapa */
.contact-map-block {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.contact-map-block iframe {
  width: 100%;
  height: 220px;
  border: none;
  display: block;
}

.map-open-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-deeper);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  background: var(--card-bg);
}

[data-theme="dark"] .map-open-link { color: var(--primary); }

.map-open-link:hover {
  background: var(--primary-light);
}

/* Datos de oficina */
.contact-office-data {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cod-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.cod-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cod-item:first-child {
  padding-top: 0;
}

.cod-item > i {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--primary-deeper);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

[data-theme="dark"] .cod-item > i { color: var(--primary); }

.cod-item div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cod-item strong {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.cod-item span,
.cod-item a {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.45;
}

.cod-item a {
  color: var(--primary-deeper);
  text-decoration: none;
  transition: color var(--transition);
}

[data-theme="dark"] .cod-item a { color: var(--primary); }
.cod-item a:hover { text-decoration: underline; }

/* Links útiles */
.contact-useful-links {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}

.cul-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.cul-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.cul-link > i:first-child {
  width: 20px;
  text-align: center;
  color: var(--primary-deeper);
  font-size: 0.85rem;
  flex-shrink: 0;
}

[data-theme="dark"] .cul-link > i:first-child { color: var(--primary); }

.cul-link > span { flex: 1; }

.cul-arrow {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
}

.cul-link:hover {
  background: var(--primary-light);
  color: var(--text);
}

.cul-link:hover .cul-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* ===================================================================
   BANDA DARK: COBERTURA
   =================================================================== */
.contact-cobertura-band {
  background: linear-gradient(135deg, #071a2e 0%, #0b2a48 60%, #0a3d62 100%);
  padding: 4.5rem 0;
  position: relative;
  overflow: hidden;
}

.contact-cobertura-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 90% at 90% 50%, rgba(74, 204, 236, 0.09) 0%, transparent 70%);
  pointer-events: none;
}

.ccb-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: flex-start;
}

@media (min-width: 800px) {
  .ccb-inner {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
  }
}

.ccb-text {
  flex: 1;
  min-width: 0;
}

.ccb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(74, 204, 236, 0.15);
  color: var(--primary);
  border: 1px solid rgba(74, 204, 236, 0.3);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.9rem;
}

.ccb-text h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.6rem;
  line-height: 1.15;
}

.ccb-text p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  max-width: 420px;
}

.ccb-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
  width: 100%;
  max-width: 420px;
}

@media (min-width: 800px) {
  .ccb-form {
    width: 360px;
  }
}

.ccb-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.ccb-inputs input {
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.93rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
}

.ccb-inputs input::placeholder { color: rgba(255,255,255,0.38); }

.ccb-inputs input:focus {
  border-color: var(--primary);
  background: rgba(74, 204, 236, 0.10);
}

.ccb-result {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius-sm);
  color: #4ade80;
  font-size: 0.9rem;
  animation: fadeSlideDown 0.25s ease;
}

.ccb-result i { font-size: 1rem; flex-shrink: 0; margin-top: 0.1rem; }

/* ===================================================================
   RESPONSIVE ADJUSTMENTS
   =================================================================== */
@media (max-width: 640px) {
  .contact-form-panel {
    padding: 1.8rem 1.2rem;
  }

  .cfp-actions {
    flex-direction: column;
  }

  .cfp-actions .btn {
    min-width: unset;
  }

  .ccb-inputs {
    grid-template-columns: 1fr;
  }

  .contact-hero-text h1 {
    font-size: 2rem;
  }
}
