/* ===================================
   HABLO - Custom Styles
   Design System & Components
   =================================== */

/* === DESIGN TOKENS === */
:root {
  /* Colors - Corporate orange palette */
  --primary: #fd9f30;
  --primary-dark: #e88a1a;
  --primary-light: #fec163;
  --secondary: #0052FF;
  --secondary-dark: #0041CC;
  
  --dark: #0A1628;
  --dark-800: #1A2942;
  --dark-700: #2A3A52;
  
  --gray-100: #F8FAFC;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-600: #475569;
  --gray-700: #334155;
  
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  
  /* Typography */
  --font-display: 'Outfit', -apple-system, system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
  
  /* Spacing */
  --section-padding: 5rem 0;
  --container-padding: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  
  /* Border radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  
  /* Transitions */
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === GLOBAL STYLES === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark-700);
  background-color: #fff;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  line-height: 1.7;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

section {
  padding: var(--section-padding);
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* === UTILITIES === */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge-custom {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-light);
  color: white;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === NAVBAR === */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0;
  transition: var(--transition-base);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 60px;
  width: auto;
  transition: var(--transition-base);
}

.navbar-brand:hover {
  color: var(--primary);
}

.navbar-brand:hover img {
  opacity: 0.85;
  transform: scale(1.02);
}

.navbar-nav .nav-link {
  color: var(--dark-700);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: var(--transition-fast);
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition-base);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 80%;
}

/* === BUTTONS === */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 82, 255, 0.4);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-100);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

.btn-icon {
  width: 3rem;
  height: 3rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* === HERO SECTION === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #F8FAFC 0%, #E8F4FF 100%);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 82, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 217, 184, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: 1.375rem;
  color: var(--gray-600);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-visual {
  position: relative;
  animation: fadeIn 1s ease-out 0.6s both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === CHAT MOCKUP === */
.chat-mockup {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1rem;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.chat-info h6 {
  margin: 0;
  font-size: 1rem;
}

.chat-status {
  font-size: 0.875rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.chat-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  display: flex;
  gap: 0.5rem;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-bubble {
  padding: 0.875rem 1.125rem;
  border-radius: 1rem;
  max-width: 75%;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.chat-message.agent .chat-bubble {
  background: var(--gray-100);
  color: var(--dark-700);
  border-bottom-left-radius: 0.25rem;
}

.chat-message.user .chat-bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.chat-time {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

/* === SECTION HEADERS === */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.section-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--gray-100);
  color: var(--primary);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title {
  margin-bottom: 1.5rem;
}

.section-description {
  font-size: 1.25rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* === FEATURE CARDS === */
.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  height: 100%;
  transition: var(--transition-base);
  border: 1px solid var(--gray-200);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  color: white;
}

.feature-icon i {
  font-size: 2rem;
  line-height: 1;
}

.sector-icon {
  font-size: 8rem;
  margin-bottom: 1rem;
  line-height: 1;
  transition: var(--transition-base);
}

.sector-icon i {
  font-size: 8rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  transition: var(--transition-base);
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.sector-icon:hover i {
  transform: scale(1.1);
  animation-play-state: paused;
}

.feature-card h4 {
  margin-bottom: 1rem;
  color: var(--dark);
}

.feature-card p {
  color: var(--gray-600);
  font-size: 1rem;
  margin-bottom: 0;
}

/* === PROCESS STEPS === */
.process-step {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 3rem;
  position: relative;
}

.process-step::after {
  content: '';
  position: absolute;
  left: 31px;
  top: 64px;
  width: 2px;
  height: calc(100% + 3rem);
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.process-step:last-child::after {
  display: none;
}

.process-number {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}

.process-content h4 {
  margin-bottom: 0.75rem;
}

.process-content p {
  color: var(--gray-600);
  margin-bottom: 0;
}

/* === SECTOR CARDS === */
.sector-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  border: 1px solid var(--gray-200);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Ensure sector detail cards are always visible */
#restaurantes .feature-card,
#clinicas .feature-card,
#belleza .feature-card,
#fitness .feature-card,
#experiencias .feature-card {
  opacity: 1 !important;
}

.sector-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.sector-icon-wrapper {
  padding: 3rem 2rem 1.5rem;
  background: linear-gradient(135deg, var(--gray-100), #E8F4FF);
  text-align: center;
}

/* For sectores.html detailed sections - clean background */
#restaurantes .sector-icon-wrapper,
#clinicas .sector-icon-wrapper,
#belleza .sector-icon-wrapper,
#fitness .sector-icon-wrapper,
#experiencias .sector-icon-wrapper {
  background: transparent;
  padding: 2rem 0;
}

.sector-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.sector-card h4 {
  margin-bottom: 1rem;
}

.sector-card p {
  color: var(--gray-600);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.sector-cta {
  margin-top: auto;
}

/* === FAQ ACCORDION === */
.faq-accordion .accordion-item {
  border: none;
  border-bottom: 1px solid var(--gray-200);
  background: transparent;
}

.faq-accordion .accordion-button {
  background: transparent;
  border: none;
  padding: 1.5rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--dark);
  box-shadow: none;
}

.faq-accordion .accordion-button:not(.collapsed) {
  color: var(--primary);
  background: transparent;
}

.faq-accordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230052FF'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.faq-accordion .accordion-body {
  padding: 0 0 1.5rem;
  color: var(--gray-600);
  font-size: 1rem;
  line-height: 1.7;
}

/* === STATS === */
.stats-section {
  background: linear-gradient(135deg, var(--dark), var(--dark-800));
  color: white;
}

.stat-card {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, white, var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  font-size: 1.125rem;
  color: var(--gray-300);
  font-weight: 500;
}

/* === CTA SECTION === */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  text-align: center;
  border-radius: var(--radius-xl);
  padding: 5rem 2rem;
  margin: 4rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1.5rem;
}

.cta-section p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
}

.cta-section .btn-secondary {
  background: white;
  color: var(--primary);
  border: none;
}

.cta-section .btn-secondary:hover {
  background: var(--gray-100);
  color: var(--primary-dark);
}

/* === FORMS === */
.form-control,
.form-select {
  padding: 0.875rem 1.125rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-base);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.1);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.form-text {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.was-validated .form-control:valid,
.form-control.is-valid {
  border-color: var(--success);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
  border-color: var(--danger);
}

/* === PRICING CARDS === */
.pricing-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  border: 2px solid var(--gray-200);
  transition: var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, #F8FAFC, #E8F4FF);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Más popular';
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--primary);
  color: white;
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.pricing-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-200);
}

.pricing-plan {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-price {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 0;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  flex-grow: 1;
}

.pricing-features li {
  padding: 0.75rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--gray-700);
}

.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* === FOOTER === */
.footer {
  background: var(--dark);
  color: var(--gray-300);
  padding: 4rem 0 2rem;
}

.footer-section {
  margin-bottom: 2rem;
}

.footer h5 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--gray-300);
  transition: var(--transition-fast);
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: var(--secondary);
}

.footer-bottom {
  border-top: 1px solid var(--dark-700);
  padding-top: 2rem;
  margin-top: 3rem;
  text-align: center;
  color: var(--gray-600);
  font-size: 0.875rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  display: inline-block;
}

/* === MODAL === */
.modal-content {
  border-radius: var(--radius-lg);
  border: none;
}

.modal-header {
  border-bottom: 1px solid var(--gray-200);
  padding: 2rem;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--dark);
}

.modal-body {
  padding: 2rem;
}

.btn-close:focus {
  box-shadow: none;
}

/* === RESPONSIVE === */
@media (max-width: 991px) {
  .hero {
    min-height: auto;
    padding: 6rem 0 4rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
  
  .process-step {
    flex-direction: column;
    gap: 1rem;
  }
  
  .process-step::after {
    left: 31px;
    top: 64px;
  }
}

@media (max-width: 767px) {
  :root {
    --section-padding: 3rem 0;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  
  .section-header {
    margin-bottom: 2.5rem;
  }
  
  .feature-card,
  .sector-content {
    padding: 1.5rem;
  }
  
  .pricing-card {
    padding: 2rem 1.5rem;
  }
  
  /* Sector icons smaller on mobile */
  .sector-icon {
    font-size: 5rem;
  }
  
  .sector-icon i {
    font-size: 5rem;
  }
}

/* === ANIMATIONS === */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === ACCESSIBILITY === */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible improvements */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}
