/* ============================================
   CONTACTO.CSS - Estilos específicos para contacto.php
   OscaChip Informática
   ============================================ */

/* ============================================
   ESTRUCTURA GENERAL
   ============================================ */

.contact-card {
  border: 1px solid #E2E8F0;
  border-radius: 1.5rem;
  background: #FFFFFF;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
  box-shadow: 0 8px 20px rgba(45, 212, 191, 0.15) !important;
  border-color: #2DD4BF;
}

/* ============================================
   BADGE HERO
   ============================================ */

.contact-hero-badge {
  background: linear-gradient(135deg, #2DD4BF, #14B8A6);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(45, 212, 191, 0.3);
  border-radius: 50px !important;
}

/* ============================================
   FORMULARIO
   ============================================ */

.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-label .label-icon {
  width: 20px;
  height: 20px;
  color: #64748B;
  transition: color 0.3s ease;
}

.form-group.valid .form-label .label-icon {
  color: #10B981;
}

.form-group.invalid .form-label .label-icon {
  color: #EF4444;
}

.form-label .required-star {
  color: #EF4444;
  font-weight: 700;
}

.input-wrapper {
  position: relative;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #9CA3AF;
  pointer-events: none;
  transition: color 0.3s ease;
}

.input-wrapper .form-control {
  padding-left: 2.75rem;
}

.input-wrapper .validation-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-control.is-valid~.validation-icon.valid-icon {
  opacity: 1;
  color: #10B981;
}

.form-control.is-invalid~.validation-icon.invalid-icon {
  opacity: 1;
  color: #EF4444;
}

/* Icono animado cuando es válido */
.form-control.is-valid~.validation-icon.valid-icon {
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  0% {
    transform: translateY(-50%) scale(0);
  }

  50% {
    transform: translateY(-50%) scale(1.2);
  }

  100% {
    transform: translateY(-50%) scale(1);
  }
}

.form-control {
  border: 2px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  padding-right: 2.75rem;
  font-size: 1rem;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  background: #F8FAFC;
  width: 100%;
}

.form-control:focus {
  background: #FFFFFF;
  border-color: #2DD4BF;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.1);
  outline: none;
}

.form-control:focus~.input-icon {
  color: #2DD4BF;
}

.form-control::placeholder {
  color: #9CA3AF;
  font-style: italic;
}

/* Estados de validación */
.form-control.is-valid {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.03);
}

.form-control.is-valid:focus {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-control.is-invalid {
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.03);
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Mensaje de error */
.field-error {
  color: #EF4444;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  animation: slideDown 0.3s ease;
}

.field-error::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23EF4444'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: contain;
  flex-shrink: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Textarea */
textarea.form-control {
  resize: vertical;
  min-height: 150px;
  padding-top: 1rem;
}

.input-wrapper.textarea-wrapper .input-icon {
  top: 1.25rem;
  transform: none;
}

/* Contador de caracteres */
.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: #9CA3AF;
  margin-top: 0.35rem;
  transition: color 0.3s ease;
}

.char-counter.warning {
  color: #F59E0B;
}

.char-counter.limit {
  color: #EF4444;
  font-weight: 600;
}

.char-counter .char-count {
  font-weight: 600;
}

/* ============================================
   ALERTAS
   ============================================ */

.alert-success {
  background: linear-gradient(135deg,
      rgba(16, 185, 129, 0.1) 0%,
      rgba(5, 150, 105, 0.1) 100%);
  border: 2px solid #10B981;
  border-radius: 0.75rem;
  color: #065F46;
  padding: 1rem 1.25rem;
}

.alert-danger {
  background: linear-gradient(135deg,
      rgba(239, 68, 68, 0.1) 0%,
      rgba(220, 38, 38, 0.1) 100%);
  border: 2px solid #EF4444;
  border-radius: 0.75rem;
  color: #991B1B;
  padding: 1rem 1.25rem;
}

/* ============================================
   TARJETA DE INFORMACIÓN DE CONTACTO
   ============================================ */

.contact-info-card {
  background: linear-gradient(135deg,
      #0B2F36 0%,
      #0F3A42 50%,
      #134E4A 100%);
  border-radius: 1.5rem;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(11, 47, 54, 0.3);
}

.contact-info-card::before {
  content: '📞';
  position: absolute;
  top: -40px;
  right: -40px;
  font-size: 180px;
  opacity: 0.04;
  transform: rotate(-20deg);
  pointer-events: none;
}

.contact-info-card .card-body {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

.contact-info-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(45, 212, 191, 0.3);
}

.contact-info-link {
  color: #5EEAD4;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.contact-info-link:hover {
  color: #2DD4BF;
  transform: translateX(5px);
}

.contact-info-card p {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.7;
}

.contact-info-card strong {
  color: #FFFFFF;
  font-weight: 700;
}

/* ============================================
   PICHY EN CONTACTO - Diseño mejorado
   ============================================ */

.pichy-contact-card {
  background: linear-gradient(145deg,
      rgba(15, 118, 110, 0.95) 0%,
      rgba(13, 148, 136, 0.9) 50%,
      rgba(20, 184, 166, 0.85) 100%);
  border: none;
  border-radius: 1.25rem;
  padding: 1.25rem !important;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 30px rgba(15, 118, 110, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efecto de brillo decorativo */
.pichy-contact-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle,
      rgba(94, 234, 212, 0.3) 0%,
      transparent 70%);
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Patrón decorativo de fondo */
.pichy-contact-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle,
      rgba(255, 255, 255, 0.08) 0%,
      transparent 70%);
  pointer-events: none;
}

.pichy-contact-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(15, 118, 110, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pichy-contact-card:hover::before {
  transform: scale(1.2);
  opacity: 0.8;
}

/* Avatar de Pichy mejorado */
.pichy-contact-card .pichy-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.25),
    0 0 0 4px rgba(94, 234, 212, 0.3);
  background: linear-gradient(135deg, #FFFFFF 0%, #F0FDFA 100%);
  padding: 4px;
  object-fit: cover;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.pichy-contact-card:hover .pichy-avatar {
  transform: scale(1.08) rotate(-3deg);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.3),
    0 0 0 5px rgba(94, 234, 212, 0.4);
}

/* Contenedor del texto */
.pichy-contact-card>div:last-child {
  position: relative;
  z-index: 1;
}

/* Label "Pichy te aconseja" */
.pichy-contact-card .pichy-label {
  font-size: 0.7rem;
  color: #FFFFFF;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  backdrop-filter: blur(4px);
  margin-bottom: 0.5rem !important;
}

.pichy-contact-card .pichy-label::before {
  content: '💡';
  font-size: 0.85rem;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

/* Texto del consejo */
.pichy-contact-text {
  color: #FFFFFF;
  line-height: 1.65;
  font-weight: 500;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

/* Responsive para móviles */
@media (max-width: 991px) {
  .pichy-contact-card {
    flex-direction: row !important;
    text-align: left !important;
    padding: 1rem !important;
  }

  .pichy-contact-card .pichy-avatar {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 576px) {
  .pichy-contact-card {
    padding: 1rem !important;
  }

  .pichy-contact-card .pichy-avatar {
    width: 56px;
    height: 56px;
  }

  .pichy-contact-text {
    font-size: 0.85rem;
  }

  .pichy-contact-card .pichy-label {
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
  }
}

/* ============================================
   BOTONES
   ============================================ */

.btn-oscachip-primary {
  background: linear-gradient(135deg, #2DD4BF, #14B8A6);
  color: #FFFFFF;
  border: none;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(45, 212, 191, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 180px;
}

.btn-oscachip-primary:hover {
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.4);
}

.btn-oscachip-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-oscachip-primary.loading {
  pointer-events: none;
}

/* Spinner de carga */
.btn-oscachip-primary .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Animación shake para errores */
.btn-oscachip-primary.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.contact-info-card .btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  font-weight: 600;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.contact-info-card .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #5EEAD4;
  color: #5EEAD4;
  transform: translateY(-2px);
}

/* ============================================
   ENLACES
   ============================================ */

.link-oscachip {
  color: #2DD4BF;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.link-oscachip:hover {
  color: #14B8A6;
  text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
  .contact-info-card {
    margin-top: 2rem;
  }

  .pichy-contact-card {
    flex-direction: column;
    text-align: center;
  }

  .pichy-contact-card .pichy-avatar {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 576px) {

  .contact-card,
  .contact-info-card {
    border-radius: 1rem;
  }

  .form-control {
    font-size: 16px;
    /* Evita zoom en iOS */
  }

  .contact-info-card .card-body {
    padding: 1.5rem;
  }

  .pichy-contact-card {
    padding: 1rem !important;
  }

  .contact-hero-badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
  }
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-card,
.contact-info-card {
  animation: fadeInUp 0.6s ease-out;
}

.contact-info-card {
  animation-delay: 0.1s;
}
/* ============================================
   CONTACT REDESIGN OVERRIDES
   ============================================ */

.contact-card {
  border-color: var(--osc-border-light);
  box-shadow: 0 18px 35px rgba(8, 16, 18, 0.08);
}

.contact-hero-badge {
  background: linear-gradient(135deg, var(--osc-accent), var(--osc-accent-dark));
  box-shadow: 0 6px 18px rgba(12, 127, 116, 0.35);
}

.form-control {
  background: #F7F9F7;
  border-color: var(--osc-border-medium);
}

.form-control:focus {
  border-color: var(--osc-accent);
  box-shadow: 0 0 0 4px rgba(16, 182, 166, 0.12);
}

.contact-info-card {
  background: linear-gradient(135deg, #071B22 0%, #0E2A32 55%, #123A3E 100%);
}

.contact-info-title {
  border-bottom-color: rgba(132, 245, 214, 0.35);
}

.contact-info-link {
  color: #84F5D6;
}

.contact-info-link:hover {
  color: #D5FFF4;
}