/*! 
    Theme Name: bestTheme,
    Version: 0.1
*/
:root {
  --brand: #29a05b;
  --text: #222;
  --bg: #fff;
  --radius: 14px;
  --primary: #be8806;
  --terciary: #977423;
  --secondary: #d6a42f;
  --primary-light: #cc3333;
  --success: #28a745;
  --warning: #ffc107;
}

.hidden {
  display: none !important;
}

#contact-wrap {
  max-width: 1100px;
  margin: 40px auto;
  /* padding: 0 20px; */
  font-family: "El Messiri" !important;
}

#contact-wrap * {
  font-family: "El Messiri" !important;
}

#contact-wrap h2 {
  font-size: 28px;
  font-weight: 800;
}

#contact-wrap h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 500;
}

/* Improved toggle buttons with better visual feedback */
.cf-toggle {
  display: flex;
  gap: 10px;
  background: #f8f9fa;
  padding: 6px;
  border-radius: calc(var(--radius) + 6px);
  border: 2px solid var(--border);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cf-toggle button {
  flex: 1;
  padding: 8px 24px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  background: var(--secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cf-toggle button:hover {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.781);
  transform: translateY(-2px);
}

.cf-toggle button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(153, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.cf-toggle button.active::before {
  content: "✓";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: bold;
}

.cf-toggle button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* FAQ card */
.cf-card {
  display: none;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cf-card.active {
  display: block;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* Estilos para los desplegables de FAQ */
.cf-dropdown-section {
  background: #fafafa;
  padding: 24px;
  padding-top: 0px;
  padding-bottom: 10px;
}

.faq-dropdown-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.dropdown-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.cf-dropdown {
  font-size: 16px;
  font-weight: 300;
  color: #000000;
  background: #fff;
  border: 2px solid var(--secondary) !important;
  border-radius: 12px;
  padding: 15px 16px;

  width: 100%;
  cursor: pointer;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 0 0 3px var(--terciary);
}

.cf-dropdown:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--secondary);
  transform: translateY(-1px);
}

.cf-dropdown:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--secondary);
}

.cf-dropdown:focus + .faq-dropdown-container::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Ajustes para el grid cuando se usan desplegables */
.cf-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 110px;
}

@media (max-width: 900px) {
  .cf-grid {
    grid-template-columns: 1fr;
  }

  .cf-dropdown-section {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.cf-list {
  border-right: 1px solid var(--border);
  background: #fafafa;
}

/* Enhanced FAQ items with read indicators */
.cf-item {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 18px 16px;
  font-size: 15px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.cf-item::after {
  content: "👁️";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.cf-item:hover {
  background: rgba(153, 0, 0, 0.05);
  padding-left: 20px;
}

.cf-item.active {
  background: linear-gradient(90deg, rgba(153, 0, 0, 0.15), #fff 40%);
  border-left: 4px solid var(--primary);
}

.cf-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--brand);
}

.cf-content {
  padding: 24px;
  padding-top: 0px;
  background: #fff;
}

.cf-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary);
}

.cf-form {
  padding: 2rem;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 0 0 3px var(--terciary);
}

.cf-form label {
  display: block;
  margin: 10px 0 4px;
}

.cf-form input,
.cf-form select,
.cf-form textarea {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

.cf-form textarea {
  min-height: 100px;
}

.cf-submit {
  margin-top: 10px;
  background: var(--secondary);
  color: #fff;
  border: 0;
  padding: 16px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cf-submit:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.stillNeedHelp {
  margin-top: 10px;
  background: var(--secondary);
  color: #fff;
  border: 0;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stillNeedHelp:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(219, 32, 7, 0.3);
}

input.question,
textarea.question,
select.question {
  color: black;
  font-size: 20px;
  font-weight: 300;
  border-radius: 2px;
  margin-top: 1.5rem;
  padding-left: 0.75rem !important;
  margin: 0;
  border: none !important;
  transition: padding-top 0.2s ease, margin-top 0.2s ease;
  overflow-x: hidden;
}

input.question + label,
textarea.question + label,
select.question + label {
  display: flex;
  position: relative;
  white-space: nowrap;
  padding: 0;
  margin: 0;
  width: 10%;
  border-top: 1px solid var(--primary);
  -webkit-transition: width 0.4s ease;
  transition: width 0.4s ease;
  height: 0px;
}

input.question:focus + label,
select.question:focus + label,
textarea.question:focus + label {
  width: 80%;
}

input.question:focus,
input.question:valid {
  padding-top: 35px;
}

textarea.question:valid,
textarea.question:focus {
  margin-top: 35px;
}

input.question:focus + label > span,
input.question:valid + label > span {
  top: -80px;
  font-size: 22px;
  color: #333;
}

textarea.question:focus + label > span,
textarea.question:valid + label > span {
  top: -140px;
  font-size: 22px;
  color: #333;
}

input.question:valid + label,
textarea.question:valid + label {
  border-color: rgb(0, 0, 0);
}

input.question:invalid,
textarea.question:invalid {
  box-shadow: none;
}

textarea {
  resize: none;
  display: block;
}

input.question + label > span {
  font-weight: 300;
  margin: 0;
  position: absolute;
  color: #8f8f8f;
  font-size: 20px;
  top: -41px;
  left: 0px;
  z-index: 9999;
  -webkit-transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
  transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}

input.question + label > span.limited {
  display: block;
  overflow-wrap: anywhere;
  /* modern */
  word-break: break-word;
  /* legacy fallback */
}

textarea.question + label > span {
  font-weight: 300;
  margin: 0;
  color: #8f8f8f;
  position: absolute;
  top: -72px;
  font-size: 20px;
  left: 2px;
  z-index: 9999;
  -webkit-transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
  transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}

input[type="submit"] {
  -webkit-transition: opacity 0.2s ease, background 0.2s ease;
  transition: opacity 0.2s ease, background 0.2s ease;
  display: block;
  opacity: 0;
  margin: 10px 0 0 0;
  padding: 10px;
  cursor: pointer;
}

input[type="submit"]:hover {
  background: #eee;
}

input[type="submit"]:active {
  background: #999;
}

input.question:valid ~ input[type="submit"],
textarea.question:valid ~ input[type="submit"] {
  -webkit-animation: appear 1s forwards;
  animation: appear 1s forwards;
}

input.question:invalid ~ input[type="submit"],
textarea.question:invalid ~ input[type="submit"] {
  display: none;
}

@-webkit-keyframes appear {
  100% {
    opacity: 1;
  }
}

@keyframes appear {
  100% {
    opacity: 1;
  }
}

.div-question:has(input.question:focus),
.div-question:has(input.question:valid) {
  display: block;
  margin-bottom: 10px;
  margin-top: 20px;
}

.div-question:has(textarea.question:focus),
.div-question:has(textarea.question:valid) {
  display: block;
  margin-bottom: 15px;
  margin-top: 25px;
}

input[type="email"]:valid,
input[type="email"]:invalid {
  background-color: transparent;
  box-shadow: none;
  outline: none;
}

input[type="email"]:-webkit-autofill,
input[type="email"]:-webkit-autofill:hover,
input[type="email"]:-webkit-autofill:focus,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #000 !important;
  caret-color: #000;
  transition: background-color 9999s ease-out, color 9999s ease-out;
}

input[type="email"]:-moz-autofill {
  box-shadow: 0 0 0 1000px #fff inset !important;
  -moz-text-fill-color: #000;
}

select.question {
  font-size: 20px;
  font-weight: 300;
  color: black;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 0px;
  padding-bottom: 10px;
  width: 100%;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.div-question:has(select.question) {
  position: relative;
}

.hiddenMobile {
  display: none;
}

@media (max-width: 768px) {
  input.question,
  textarea.question,
  select.question {
    font-size: 15px;
    font-weight: 300;
    border-radius: 2px;
    margin-top: 1.5rem;
    margin: 0;
    border: none !important;
    transition: padding-top 0.2s ease, margin-top 0.2s ease;
    overflow-x: hidden;
  }

  input.question + label > span {
    font-weight: 300;
    margin: 0;
    position: absolute;
    color: #8f8f8f;
    font-size: 15px;
    top: -35px;
    left: 0px;
    z-index: 9999;
    -webkit-transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
    transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
  }

  textarea.question + label > span {
    font-weight: 300;
    margin: 0;
    color: #8f8f8f;
    position: absolute;
    top: -70px;
    font-size: 15px;
    left: 2px;
    z-index: 9999;
    -webkit-transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
    transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
  }

  input.question:focus + label > span,
  input.question:valid + label > span {
    top: -80px;
    font-size: 16px;
    color: #333;
  }

  textarea.question:focus + label > span,
  textarea.question:valid + label > span {
    top: -140px;
    font-size: 16px;
    color: #333;
  }

  .formulario-inner {
    padding: 15px !important;
  }
  .help {
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.23 !important;
  }
  .toggle-btn {
    gap: 2px;
    padding: 5px !important;
  }
  .cf-toggle button {
    font-size: 14px;
  }
  .cf-toggle button.active::before {
    content: "" !important;
  }
  .tooltip {
    display: none !important;
  }
}

.help {
  display: flex;
  justify-content: space-between;
}

.help .logo {
  filter: invert(1);
}

.logo {
  width: 160px;
  height: 90px;
  aspect-ratio: auto;
  object-fit: contain;
}

.icono {
  width: 15px;
  height: 15px;
  aspect-ratio: auto;
  object-fit: contain;
  margin-right: 8px;
}

.stillNeed {
  margin-top: 20px;
}

.underline {
  text-decoration: underline;
}

.faq li {
  list-style-type: decimal;
}

/* Botones toggle mejorados */
.toggle-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 20px;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 600;
}

.toggle-btn:hover {
  background: #be280e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.toggle-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-icon {
  margin-left: 5px;
  font-size: 20px;
}
.btn-icon img {
  min-width: 24px;
  width: 24px;
  height: 24px;
  object-fit: contain;
  aspect-ratio: auto;
}

.btn-check {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toggle-btn.active .btn-check {
  opacity: 1;
}

/* FAQ items mejorados */
.cf-item {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.cf-item:hover {
  background: #f8f9fa;
  transform: translateX(5px);
}

.cf-item.read {
  background: linear-gradient(90deg, rgba(40, 167, 69, 0.1), #fff 40%);
}

.faq-status {
  font-size: 16px;
  min-width: 20px;
}

.formSubmitted {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 2px solid var(--success);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
  margin-top: 20px;
}
.formSubmitted h3 {
  color: #000000;
  font-size: 24px !important;
}

.with-reserve {
  margin-bottom: 20px;
}

.continue-arrow {
  text-align: center;
  display: flex;
  justify-content: center;
  font-size: 24px;
  filter: brightness(0) saturate(100%) invert(12%) sepia(91%) saturate(4380%)
    hue-rotate(0deg) brightness(77%) contrast(116%);
}
.bounce {
  animation: bounceIn 2s ease infinite;
}
@keyframes bounceIn {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(10px);
    opacity: 1;
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-15px);
  }
}

@keyframes shine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.btn-shine {
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--terciary),
    var(--primary)
  );
  background-size: 200% 100%;
  animation: shine 2s ease-in-out infinite;
}

.logo-animation-container {
  text-align: center;
  position: relative;
  display: inline-block;
}

.logo-wrapper {
  position: relative;
  display: inline-block;
}
.logo-wrapper img {
  filter: invert(1);
}

.animated-logo {
  padding: 10px;
  width: 120px;
  height: 90px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: logoAnimation 2s ease-in-out;
  transform-origin: center;
  object-fit: contain;
}

.success-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  border: 4px solid #4ade80;
  border-radius: 50%;
  opacity: 0;
  animation: ringExpand 1.5s ease-out 0.5s forwards;
}

.checkmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  opacity: 0;
  animation: checkmarkAppear 0.8s ease-out 1.8s forwards;
}

.checkmark::before {
  content: "✓";
  font-size: 30px;
  color: #4ade80;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.particles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fbbf24;
  border-radius: 50%;
  opacity: 0;
  animation: particleExplosion 2s ease-out forwards;
}

.particle:nth-child(1) {
  animation-delay: 1s;
  transform: rotate(0deg) translateX(80px);
}
.particle:nth-child(2) {
  animation-delay: 1.1s;
  transform: rotate(45deg) translateX(80px);
}
.particle:nth-child(3) {
  animation-delay: 1.2s;
  transform: rotate(90deg) translateX(80px);
}
.particle:nth-child(4) {
  animation-delay: 1.3s;
  transform: rotate(135deg) translateX(80px);
}
.particle:nth-child(5) {
  animation-delay: 1.4s;
  transform: rotate(180deg) translateX(80px);
}
.particle:nth-child(6) {
  animation-delay: 1.5s;
  transform: rotate(225deg) translateX(80px);
}
.particle:nth-child(7) {
  animation-delay: 1.6s;
  transform: rotate(270deg) translateX(80px);
}
.particle:nth-child(8) {
  animation-delay: 1.7s;
  transform: rotate(315deg) translateX(80px);
}

@keyframes logoAnimation {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(0deg);
    opacity: 1;
  }
  70% {
    transform: scale(0.9) rotate(0deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes ringExpand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

@keyframes checkmarkAppear {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes particleExplosion {
  0% {
    opacity: 1;
    transform: rotate(var(--rotation, 0deg)) translateX(0px) scale(0);
  }
  50% {
    opacity: 1;
    transform: rotate(var(--rotation, 0deg)) translateX(100px) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--rotation, 0deg)) translateX(120px) scale(0);
  }
}

/* Animation restart classes */
.restart-animation .animated-logo {
  animation: logoAnimation 2s ease-in-out;
}

.restart-animation .success-ring {
  animation: ringExpand 1.5s ease-out 0.5s forwards;
}

.restart-animation .checkmark {
  animation: checkmarkAppear 0.8s ease-out 1.8s forwards;
}

.restart-animation .particle {
  animation: particleExplosion 2s ease-out forwards;
}

.error {
  font-size: 0.875rem;
  color: #d00;
  display: block;
  margin-top: 0.25rem;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-flex;
}

.tooltip-trigger {
  display: inline-grid !important;
  place-items: center;
  width: 1.5rem !important;
  height: 1.5rem;
  border: none !important;
  border-radius: 999px;
  background: transparent !important;
  color: #333 !important;
  cursor: help !important;
  padding: 0 !important;
}

.tooltip-trigger:focus-visible {
  outline: 2px solid #555;
  outline-offset: 2px;
}

.tooltip-content {
  position: absolute;
  left: -92%;
  top: calc(100% + 0.5rem);
  transform: translateX(-50%);
  min-width: 90px;
  padding: 0.5rem 0.625rem;
  background: #111;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  white-space: normal;
  z-index: 999999 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
}

/* Flechita */
.tooltip-content::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #111 transparent;
}

/* Mostrar en hover/focus dentro del grupo */
.tooltip:hover .tooltip-content,
.tooltip:focus-within .tooltip-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.cf-dropdown::-ms-expand {
  display: none !important;
}

.link {
  cursor: pointer;
  color: #0000ee;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s ease;
}

#contact-wrap {
  input:focus-visible {
    outline: none;
  }
  textarea:focus-visible {
    outline: none;
  }
  button {
    white-space: normal;
  }
}
