@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=Inter:wght@400;600;700&display=swap");

:root {
  --bg-color: #000;

  --btn-color: #fdfdfd;
  /* button color*/
  --btn-bg: #7e22ce;
  /* button bg color*/

  --primary-text-color: #7e22ce;
  --header-link-hover: #7e22ce;
  --input-hover-bd-color: #7e22ce;
}

html {
  scroll-behavior: smooth;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

header {
  /* background-color: #fff;
    color: #000; */
  color: #b1b1b1;
}

.link-cta {
  text-decoration: underline;
}

header > .collapsible-header {
  display: flex;
  gap: 1rem;
  width: 100%;
  background-color: inherit;
  place-content: center;
  overflow: hidden;
  transition: width 0.3s ease;
}

@media (min-width: 768px) {
  header .collapsible-header {
    position: static;
    opacity: 1;
    width: 100%;
    height: auto;
    min-height: auto;
    flex-direction: row;
    justify-content: center;
    padding: 0;
    place-items: center;
    background-color: inherit;
    color: inherit;
    box-shadow: none;
    transition: none;
  }
}

.animated-collapse {
  transition: width 0.3s ease;
}

.header-links {
  display: flex;
  align-items: center;
  min-width: fit-content;
  border-radius: 5px;
  padding: 5px 10px;
  transition: background-color 0.5s, color 0.5s;
}

.header-links:hover {
  color: #ffffff;
  /* background-color: var(--header-link-hover); */
}

.primary-text-color {
  color: var(--primary-text-color);
}

.gradient-text {
  background: rgb(215, 215, 215);
  background: linear-gradient(
    90deg,
    rgba(215, 215, 215, 1) 18%,
    rgba(136, 136, 136, 1) 71%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section {
  /* background-image: url("../assets/images/background/dots.svg"); */
  background-position: center;
  /* Center the image */
  background-repeat: no-repeat;
  /* Do not repeat the image */
  background-size: cover;
}

.hero-img-bg-grad {
  background: rgb(126, 34, 206);
  background: linear-gradient(
    90deg,
    #7e22ce91 8%,
    #625aafae 31%,
    #7badbbbc 76%,
    #54d2d0ca 89%
  );
  filter: blur(50px);
  opacity: 0.5;
}

#dashboard {
  /* transform-origin: bottom center; */
  transform: perspective(1200px) translateX(0px) translateY(12px) scale(0.8)
    rotate(0deg) rotateX(70deg);
  transition: transform 0.5;
}

.border-gradient {
  background: rgb(219, 215, 213);
  background: linear-gradient(
    180deg,
    rgba(219, 215, 213, 1) 35%,
    rgba(214, 211, 233, 0) 71%
  );
  /* background-image: linear-gradient(90deg, #7e22ce91 8%, #625aafae 31%, #7badbbbc 76%, #54d2d0ca 89%); */
  padding: 2px;
  border-radius: 10px;
}

.border-gradient > div {
  /* background-color: var(--bg-color); */
  background-color: var(--bg-color);
  border-radius: inherit;
}

.opacity-0 {
  opacity: 0 !important;
}

.opacity-100 {
  opacity: 100 !important;
}

.btn {
  padding: 10px 15px;
  width: max-content;
  border-radius: 5px;
  color: var(--btn-color);
  background-color: var(--btn-bg);
  justify-content: center;
  align-items: center;
  display: flex;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: default;
}

.input {
  padding: 10px;
  background-color: transparent;
  border-radius: 5px;
  /* outline: none; */
  min-width: 100px;
  border: 1px solid #818080;
  /* transition: border 0.3s; */
}

.input:active,
.input:focus,
.input:focus-within {
  border: 1px solid var(--input-hover-bd-color) !important;
}

.carousel-container {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  max-width: 800px;
}

.carousel {
  display: inline-block;
  animation: scroll 10s linear infinite;
}

.carousel-img {
  display: inline-block;
  margin: 0 20px;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.footer-link {
  color: #c7c6c6;
  transition: color 0.3s;
}

.footer-link:hover {
  color: #fff;
}

/* Style for the collapsible content such as faq commonly known as: accordion */

.faq-accordion {
  background-color: inherit;
  color: #f2f2f2;
  cursor: pointer;
  padding: 15px 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  transition: height 0.4s;
}

.faq .content {
  padding: 0px 18px;
  color: #e4e4e4;
  height: max-content;
  overflow: hidden;
  background-color: transparent;
  text-align: justify;
  max-height: 0px;
  transition: max-height 0.4s, padding 0.4s;
}

.faq-accordion .active,
.faq-accordion:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Consolidated mobile header rule - replaces 3 duplicate rules */
@media (max-width: 767px) {
  /* Default state - hidden */
  header .collapsible-header {
    position: fixed;
    top: 0;
    right: 0px;
    flex-direction: column;
    opacity: 0;
    height: auto;
    width: 0vw;
    justify-content: flex-start;
    align-items: center;
    padding: 2rem;
    padding-top: 15%;
    background-color: rgba(4, 4, 4, 0.98);
    backdrop-filter: blur(10px);
    color: #ffffff;
    overflow-y: auto;
    box-shadow: 3px 0px 3px 2px #9f9f9f;
    transition: width 0.4s ease, opacity 0.4s ease;
    z-index: 9998;
    pointer-events: none;
  }

  /* Open state - when tw-hidden is removed by JavaScript */
  header .collapsible-header:not(.tw-hidden) {
    opacity: 1;
    width: 100vw;
    pointer-events: all;
  }

  header .header-links {
    color: rgb(255, 255, 255);
    font-size: 1.2rem;
    font-weight: 500;
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    text-align: center;
    border: 1px solid transparent;
  }

  header .header-links:hover {
    background-color: rgba(126, 34, 206, 0.4);
    border: 1px solid rgba(126, 34, 206, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(126, 34, 206, 0.3);
  }

  /* Better scroll behavior for navigation */
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
  }
}

/* Consistent horizontal padding for all mobile views */
@media (max-width: 767px) {
  :root {
    --mobile-h-padding: 12px;
  }

  /* Apply consistent left/right padding across major layout containers */
  body,
  html,
  header,
  main,
  footer,
  section,
  .container {
    padding-left: var(--mobile-h-padding) !important;
    padding-right: var(--mobile-h-padding) !important;
  }

  /* Header specifics: override inline utility paddings that use percentage */
  header.tw-sticky,
  header[role],
  header {
    padding-left: var(--mobile-h-padding) !important;
    padding-right: var(--mobile-h-padding) !important;
  }

  /* Ensure the collapsible mobile menu uses the same inner padding */
  header .collapsible-header {
    padding-left: var(--mobile-h-padding) !important;
    padding-right: var(--mobile-h-padding) !important;
  }

  /* For sections that used tw-px utilities with large values, ensure inner content keeps the same horizontal inset */
  #contacto,
  #servicios,
  #sobre-nosotros {
    padding-left: var(--mobile-h-padding) !important;
    padding-right: var(--mobile-h-padding) !important;
  }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* Responsive utilities */
@media (max-width: 640px) {
  .tw-text-6xl {
    font-size: 2.5rem;
    line-height: 1.1;
  }

  .tw-text-5xl {
    font-size: 2rem;
    line-height: 1.2;
  }

  .tw-text-4xl {
    font-size: 1.75rem;
    line-height: 1.2;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .tw-text-6xl {
    font-size: 3.5rem;
    line-height: 1.1;
  }

  .tw-text-5xl {
    font-size: 2.5rem;
    line-height: 1.2;
  }
}

/* Desktop spacing fixes: avoid servicios overlapping hero when header is sticky */
@media (min-width: 1024px) {
  /* Center hero vertically on desktop and keep a safe gap to servicios */
  #hero {
    /* account for sticky header (~60px) + small buffer */
    min-height: calc(100vh - 80px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 1.5rem !important;
    padding-bottom: 3rem !important; /* more room so CTA sits inside viewport */
  }

  /* ensure inner flex container centers its children */
  #hero > div.tw-flex.tw-h-full {
    justify-content: center !important;
    align-items: center !important;
    padding-top: 0 !important;
  }

  /* lift hero content a bit so CTA stays visible without scrolling */
  /* Desktop transform intentionally removed; mobile-only transform applied in mobile media query below. */

  /* push servicios slightly down on large screens to avoid touching hero */
  #servicios {
    margin-top: 4.5rem !important; /* ~72px */
  }
}

/* Mobile-first responsive grid for "Por qué elegirnos" section */
@media (max-width: 767px) {
  .tw-grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  .max-md\:tw-max-w-\[90\%\] {
    max-width: 90% !important;
  }

  /* Contact buttons mobile styling */
  #contacto .tw-flex-wrap {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  #contacto .btn {
    width: 100% !important;
    max-width: 280px !important;
    margin-bottom: 1rem !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
  }

  #contacto .tw-gap-3 {
    gap: 1.5rem !important;
  }
}

/* Section spacing utilities */
.section-spacing {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  .section-spacing {
    padding: 2rem 0;
  }
}

/* Card hover effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Responsive grid improvements */
@media (max-width: 640px) {
  .tw-grid-cols-1 {
    grid-template-columns: 1fr;
  }

  .tw-gap-6 {
    gap: 1rem;
  }

  .tw-gap-8 {
    gap: 1.5rem;
  }
}

/* Hide hamburger menu button on large screens */
@media (min-width: 1024px) {
  #collapse-btn {
    display: none !important;
  }
}

/* Ensure Bootstrap Icons display correctly */
#collapse-btn {
  font-family: "bootstrap-icons" !important;
  font-style: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  z-index: 10001 !important;
  position: fixed !important;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#collapse-btn:hover {
  background-color: rgba(126, 34, 206, 0.7) !important;
  transform: scale(1.05);
}

#collapse-btn:before {
  content: "\f479"; /* bi-list */
}

#collapse-btn.bi-x:before {
  content: "\f62a"; /* bi-x */
}

#collapse-btn.bi-list:before {
  content: "\f479"; /* bi-list */
}

/* Headline font for titles and logos */
.headline {
  font-family: "Sora", "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 700;
}

:root {
  --nw-bg: #0b0b0f;
  --nw-surface: rgba(255, 255, 255, 0.04);
  --nw-border: rgba(255, 255, 255, 0.1);
  --nw-text: #ffffff;
  --nw-muted: #b7b7c0;
  /* Paletas por engine */
  --nw-eff: 145 73% 45%;
  /* verde */
  --nw-core: 258 83% 60%;
  /* índigo/púrpura */
  --nw-grow: 350 84% 60%;
  /* fucsia/rojo */
  --nw-cta: 270 79% 51%;
  /* violeta CTA */
}

.tw-glass {
  background: var(--nw-surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--nw-border);
}

.tw-gradient-hero {
  background: radial-gradient(
      90% 60% at 50% 0%,
      rgba(167, 139, 250, 0.18),
      transparent 60%
    ),
    radial-gradient(
      60% 40% at 85% 10%,
      rgba(236, 72, 153, 0.14),
      transparent 60%
    ),
    linear-gradient(180deg, #0b0b0f 10%, #0b0b0f 100%);
}

.tw-gradient-text {
  background: linear-gradient(90deg, hsl(var(--nw-cta)) 0%, #ffffff 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tw-shadow-soft {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.tw-ring-focus:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
  border-radius: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .tw-anim-none {
    animation: none !important;
    transition: none !important;
  }
}

/* Mobile-specific overrides to ensure hero content sits higher on small screens.
   These use higher specificity and !important to override precompiled Tailwind utilities
   without requiring a rebuild. */
@media (max-width: 767px) {
  /* Shrink logo link and image in header to free vertical space */
  header a[aria-label="Next Wrld Home"] {
    height: 60px !important;
    width: 48px !important;
    display: inline-block !important;
    padding: 0 !important;
  }

  header a[aria-label="Next Wrld Home"] img {
    height: 100% !important;
    width: 100% !important;
    object-fit: contain !important;
    display: block !important;
  }

  /* Make the header brand text much smaller & cleaner on mobile only
     Targets the anchor in the header with class "headline" so hero headlines aren't affected */
  header > a.headline {
    font-size: 1.05rem !important; /* slightly larger for better legibility */
    line-height: 1 !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px !important;
    padding: 0.15rem 0.45rem !important; /* balanced breathing room */
    margin-left: 0.25rem !important;
    white-space: nowrap !important; /* keep it on a single line */
    text-transform: uppercase !important;
    color: #e6e6e6 !important; /* softer than pure white */
    opacity: 0.95 !important;
  }

  /* Force hero to use less vertical space and align content to the top */
  #hero {
    /* subtract approximate header height to avoid content being hidden under sticky header */
    min-height: calc(100vh - 60px) !important;
    height: calc(100vh - 60px) !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  /* Target the immediate inner flex container used in the hero */
  #hero > div.tw-flex.tw-h-full {
    justify-content: center !important;
    align-items: center !important;
    padding-top: 0.5rem !important;
  }

  /* Reduce top margins used by reveal animations/text blocks */
  #hero .reveal-up.tw-mt-10 {
    margin-top: 0.75rem !important;
  }

  #hero .reveal-up.tw-mt-5,
  #hero .reveal-up.tw-mt-6 {
    margin-top: 0.5rem !important;
  }

  /* Make CTA button more prominent and avoid extra vertical spacing */
  #hero .btn {
    margin-top: 0.5rem !important;
    padding: 0.85rem 1.25rem !important;
  }

  /* Reduce headline size and avoid forced breaks on very small screens */
  /* Target the gradient-text container and headline spans inside the hero */
  #hero .gradient-text,
  #hero .gradient-text .headline {
    font-size: 1.95rem !important; /* ~31px */
    line-height: 1.05 !important;
    letter-spacing: -0.5px !important;
  }

  /* Hide explicit <br/> between headline parts so browser wraps naturally */
  #hero .gradient-text br {
    display: none !important;
  }

  /* Slightly reduce subtitle spacing */
  #hero [data-i18n="heroSubtitle"] {
    margin-top: 0.6rem !important;
    font-size: 0.95rem !important;
  }

  /* Lift content slightly on mobile so CTA is visible while keeping it centered */
  #hero > div.tw-flex.tw-h-full > .tw-flex.tw-flex-col {
    transform: translateY(-6%) !important;
  }
}

/* Ensure contact buttons are always the same size regardless of content */
/* This ruleset is placed at the end so it overrides earlier mobile-specific width:100% rules */
#contacto .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 220px !important; /* fixed width for visual parity */
  height: 48px !important; /* fixed height for consistent tappable area */
  padding: 0 1rem !important; /* horizontal padding inside fixed width */
  white-space: nowrap !important;
  text-align: center !important;
}

/* Make social images match Bootstrap icon sizing (tw-text-2xl) and align with text */
.social-icon {
  width: 1.5rem !important; /* matches .tw-text-2xl */
  height: 1.5rem !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Fine tune spacing so the username lines up with icons */
.tw-flex.tw-gap-4 .social-icon + span,
.tw-flex.tw-gap-4 i.tw-text-2xl + span {
  margin-left: 0.5rem !important;
}

/* Language selector visual state */
#lang-es.lang-selected,
#lang-en.lang-selected {
  background-color: #7e22ce !important; /* same purple as CTA */
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(126, 34, 206, 0.18) !important;
}

#lang-es,
#lang-en {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
