/* ==========================
   HERO CTA VARIABLES
========================== */
:root {
  --hero-cta-radius: 0.5rem;
  --hero-cta-btn-radius: 2.87rem;
  --hero-cta-btn-padding: 0.5rem 1rem;
  --hero-cta-btn-font-size: 1rem;
  --hero-cta-btn-font-weight: 600;
  --transition-fast: 0.2s;
  --transition-medium: 0.3s;
  --hero-cta-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  --z-index-hero-cta: 200;
  --z-index-hero-overlay: 400;
}

/* ==========================
   HERO CTA WRAPPER
========================== */
.hero-cta-wrapper {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: var(--z-index-hero-cta);
  pointer-events: none;
}

.hero-cta-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: auto;
}

/* ==========================
   HERO FLOATING CTA
========================== */
.hero-floating-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--white);
  color: var(--blue);
  border-radius: 0.5rem;
  font-size: var(--small);
  font-weight: 600;
  text-align: right;
  z-index: 2;
  box-shadow: 0px 0px 9.7px 0px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.33, 1, 0.68, 1);
  width: 10.68rem;
  height: 3.5rem;
  overflow: hidden;
  transform-origin: top right;
}

/* ==========================
   HERO CTA DOT
========================== */
.hero-cta-dot {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.3s ease;
}

.hero-cta-container:hover .hero-cta-dot,
.hero-cta-container:focus-within .hero-cta-dot {
  width: 1.25rem;
  height: 1.25rem;
  top: 7.93px;
  left: 8px;
}

.hero-cta-dot-logo {
  width: 0.6rem;
  height: 0.6rem;
  object-fit: contain;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast) ease,
    visibility var(--transition-fast) ease;
  filter: brightness(0) invert(1);
}

.hero-cta-container:hover .hero-cta-dot-logo,
.hero-cta-container:focus-within .hero-cta-dot-logo {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hero-cta-dot-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.hero-cta-container.form-active .hero-cta-dot-logo {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==========================
   HERO CTA LABEL
========================== */
.hero-cta-label {
  transition: opacity 0.4s;
  display: block;
  white-space: nowrap;
  font-weight: 600;
  font-style: SemiBold;
  font-size: 24px;
  line-height: 100%;
  letter-spacing: -0.5px;
}

.hero-cta-container:hover .hero-floating-cta .hero-cta-label,
.hero-cta-container:focus-within .hero-floating-cta .hero-cta-label {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

/* ==========================
   HERO CTA EXPANDED CONTENT
========================== */
.hero-cta-expanded-content {
  position: relative;
  margin: 0 0 0 0.5rem;
  width: 100%;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0 0.5rem 0 0.5rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  text-align: right;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, max-height;
  contain: layout style;
}

.hero-cta-container:hover .hero-cta-expanded-content,
.hero-cta-container:focus-within .hero-cta-expanded-content {
  max-height: 100%;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  padding-bottom: 1rem;
}

.hero-cta-container:hover .hero-floating-cta,
.hero-cta-container:focus-within .hero-floating-cta {
  border-radius: 1.5rem;
  width: 24rem;
  height: 12rem;
  background: var(--white) !important;
  color: var(--blue);
  box-shadow: none;
}

/* ==========================
   HERO CTA PHONE
========================== */
.hero-cta-phone {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  text-align: left;
  margin-bottom: 0;
}

.phone-number {
  font-weight: 600;
  display: block;
  font-size: 1.75rem;
}

/* ==========================
   HERO CTA DIVIDER
========================== */
.hero-cta-divider {
  display: flex;
  align-items: center;
  width: 100%;
}

.hero-cta-divider::before,
.hero-cta-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--blue);
  opacity: 0.3;
}

.hero-cta-divider span {
  margin: 0 1rem;
  color: var(--blue);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ==========================
   HERO CTA ACTIONS
========================== */
.hero-cta-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-cta-actions .hero-cta-action-btn {
  z-index: 1;
  flex-shrink: 0;
}

.hero-cta-container:not(:hover):not(:focus-within) .hero-cta-action-btn {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  z-index: -1;
}

.hero-cta-container:hover .hero-cta-action-btn,
.hero-cta-container:focus-within .hero-cta-action-btn {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  position: relative;
  z-index: auto;
}

/* ==========================
   HERO CTA BUTTONS
========================== */
.hero-cta-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--hero-cta-btn-radius);
  padding: var(--hero-cta-btn-padding);
  font-weight: var(--hero-cta-btn-font-weight);
  font-size: var(--hero-cta-btn-font-size);
  cursor: pointer;
  transition: all var(--transition-fast) ease;
  text-decoration: none;
}

.hero-cta-action-blue {
  background: var(--blue);
  color: var(--white);
  border: 1.5px solid var(--blue);
}

.hero-cta-action-white {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.button-icon {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.hero-cta-action-blue .button-icon {
  filter: brightness(0) invert(1);
}

.hero-cta-action-white .button-icon {
  filter: brightness(0) saturate(100%) invert(26%) sepia(100%) saturate(1000%)
    hue-rotate(220deg) brightness(0.9) contrast(1.1);
}

/* ==========================
   HERO CTA FORM OVERLAY
========================== */
.hero-cta-form-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30rem;
  background: var(--white) !important;
  color: var(--blue);
  border-radius: 1.5rem;
  transform: translateY(0);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.3s ease;
  z-index: 1;
  box-shadow: var(--shadow-md);
  height: auto;
}

.hero-cta-form-overlay.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  z-index: 1000;
  pointer-events: all;
  width: 30rem;
  border-radius: 1.5rem;
  margin-left: -13rem;
  padding: 3rem 2rem 2rem 2rem;
  height: auto;
  display: flex;
  bottom: -1rem;
  background: var(--white) !important;
}

.hero-cta-form-overlay.active.form-sent {
  height: 20rem !important;
}

.hero-cta-form-overlay.active.form-sent .feedback-container {
  position: absolute;
  bottom: 16rem;
  left: 0;
  transform: translateX(-50%) scale(1);
  width: auto;
  max-width: 90%;
  text-align: left;
  padding: 0;
  margin: 0;
  opacity: 1;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-cta-form-overlay.form-sent .hero-cta-expanded-content,
.hero-cta-form-overlay.form-sent .hero-cta-actions {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.hero-cta-container.form-active {
  padding-bottom: 0;
  pointer-events: all;
  z-index: 1100;
  background: transparent;
}

.hero-cta-container.form-active .hero-cta-expanded-content {
  opacity: 0;
  max-height: 0;
  pointer-events: none;
  visibility: hidden;
  overflow: hidden;
  display: none;
}

.hero-cta-container.form-active .hero-floating-cta {
  border-radius: 0 0 1.5rem 1.5rem;
  width: 26rem;
  height: 4rem;
  position: relative;
  overflow: visible;
  transition: none !important;
  background: var(--white) !important;
}

.hero-cta-container.form-active .hero-cta-form-overlay .date-btn {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

.hero-cta-container.form-active .hero-cta-actions {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.hero-cta-container.form-active .hero-cta-form-overlay .close-form {
  color: var(--blue) !important;
}

.hero-cta-container.form-active .hero-cta-form-overlay .back-icon {
  filter: brightness(0) saturate(100%) invert(26%) sepia(100%) saturate(1000%)
    hue-rotate(220deg) brightness(0.9) contrast(1.1);
}

.hero-cta-container.form-active .hero-cta-form-overlay .form-title {
  color: var(--blue);
}

.hero-cta-container.form-active .hero-cta-form-overlay .form-notice {
  color: var(--blue);
}

.hero-cta-container.form-active .hero-cta-form-overlay .form-group input {
  color: var(--blue);
  border-bottom-color: var(--blue);
 
}


.hero-cta-container.form-active .hero-cta-form-overlay .form-group label {
  color: #585858;
}

.hero-cta-container.form-active
  .hero-cta-form-overlay
  .form-group
  input::placeholder {
  color: var(--blue);
}

/* Fix validation message alignment */
.hero-cta-container.form-active .hero-cta-form-overlay .form-group .validation-message,
.hero-cta-container.form-active .hero-cta-form-overlay .validation-message,
.hero-cta-form-overlay.active .form-group .validation-message,
.hero-cta-form-overlay .validation-message {
  position: absolute !important;
  bottom: -1.2rem !important;
  left: 0 !important;
  right: auto !important;
  transform: translateY(0) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  z-index: 1000 !important;
  text-align: left !important;
}

/* Remove background from inputs in hero-cta */
.hero-cta-form-overlay input,
.hero-cta-form-overlay input:focus,
.hero-cta-container .hero-cta-form-overlay input,
.hero-cta-container .hero-cta-form-overlay input:focus {
  background: transparent !important;
  background-color: transparent !important;
}

/* Ensure validation message text alignment in hero-cta */
.hero-cta-form-overlay .validation-message,
.hero-cta-container .hero-cta-form-overlay .validation-message {
  text-align: left !important;
  direction: ltr !important;
  color: #dd0000 !important; /* Color rojo para mensajes de error en formularios con fondo blanco */
}

/* Color de mensajes de validación cuando hay error en hero-cta */
.hero-cta-form-overlay .form-group input:focus:invalid ~ .validation-message,
.hero-cta-form-overlay .form-group input[data-empty="true"] ~ .validation-message,
.hero-cta-container .hero-cta-form-overlay .form-group input:focus:invalid ~ .validation-message,
.hero-cta-container .hero-cta-form-overlay .form-group input[data-empty="true"] ~ .validation-message {
  color: #dd0000 !important;
}

.hero-cta-container.form-active .hero-cta-form-overlay .form-check {
  color: var(--blue);
}

.hero-cta-container.form-active
  .hero-cta-form-overlay
  .form-check
  input[type="checkbox"] {
  border-color: var(--blue);
}
.hero-cta-container.form-active
  .hero-cta-form-overlay
  .form-check
  input[type="checkbox"]:checked::before {
  color: var(--blue);
}

.hero-cta-container.form-active .hero-cta-form-overlay .form-check label a {
  color: var(--blue);
}

.hero-cta-container.form-active .hero-cta-form-overlay .date-btn {
  visibility: hidden;
}

.hero-cta-container.form-active .hero-cta-form-overlay .submit-btn {
  color: var(--white);
  background-color: var(--blue);
  border-color: var(--white);
}

.hero-cta-form-overlay form.form-submitted .form-fields {
  display: none;
}

.hero-cta-form-overlay form.form-submitted .feedback-message {
  display: block;
}
.hero-cta-container.form-active .hero-cta-form-overlay .feedback-btn {
  color: var(--blue);
  border-color: var(--blue);
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 599px) {
  .hero-cta-wrapper {
    display: none;
  }
}

@media (min-width: 600px) {
  .hero-cta-wrapper {
    display: block;
  }
}

/* ==========================
   ACCESSIBILITY
========================== */
.hero-cta-action-btn:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.hero-cta-action-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
