/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* HireHoratio Brand Colors - Principales */
  --primary-blue: #5e9bfc;           /* Hex 9 - Azul primario */
  --primary-dark: #001b50;           /* Hex 10 - Azul profundo */
  --secondary-blue: #9fb9fc;         /* Hex 6 - Azul suave */
  --accent-yellow: #fedc6e;          /* Hex 7 - Amarillo destacado */
  --accent-red: #fc5e60;             /* Hex 8 - Rojo de alerta */
  --light-blue: #f9fcff;             /* Hex 5 - Fondo principal claro */
  
  /* HireHoratio Brand Colors - Secundarios */
  --dark-navy: #1e1d42;              /* Hex 26 - Púrpura oscuro */
  --darker-navy: #13121f;            /* Hex 29 - Negro profundo */
  --darkest-navy: #151531;           /* Hex 30 - Azul muy oscuro */
  --medium-navy: #23223a;            /* Hex 31 - Púrpura medio */
  --bright-yellow: #ffdd65;          /* Hex 32 - Amarillo brillante */
  --surface-light: #f3f4f6;          /* Hex 33 - Gris muy claro */
  --surface-lighter: #f9fafb;        /* Hex 34 - Blanco suave */
  --border-light: #d1d5db;           /* Hex 27 - Gris medio */
  --error-red: #ef4444;              /* Hex 28 - Rojo intenso */
  --success-green: #00a699;          /* Hex 25 - Verde azulado */
  --soft-blue: #e5edff;              /* Hex 22 - Azul muy suave */
  
  /* Aplicaciones de colores */
  --text-primary: var(--darker-navy);
  --text-secondary: var(--dark-navy);
  --text-muted: #9ca3af;
  --surface: #ffffff;
  --surface-elevated: var(--light-blue);
  --border-color: var(--soft-blue);
  --shadow-sm: 0 1px 2px 0 rgb(30 29 66 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(30 29 66 / 0.1), 0 2px 4px -2px rgb(30 29 66 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(30 29 66 / 0.1), 0 4px 6px -4px rgb(30 29 66 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(30 29 66 / 0.1), 0 8px 10px -6px rgb(30 29 66 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Main container */
.main-container {
  min-height: 100vh;
  position: relative;
  background: var(--surface);
}

/* App Header */
.app-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--bright-yellow) 100%);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  position: relative;
  overflow: hidden;
}

.brand-logo-text::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.logo-h {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary-dark);
  font-family: 'Inter', sans-serif;
  text-shadow: 0 1px 2px rgba(0, 27, 80, 0.2);
  z-index: 1;
  position: relative;
}

.logo-h-dot {
  font-size: 16px;
  color: var(--accent-red);
  margin-left: 2px;
  animation: pulse 2s ease-in-out infinite;
  z-index: 1;
  position: relative;
}

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

.brand-text {
  color: white;
}

.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.app-subtitle {
  font-size: 0.875rem;
  margin: 0;
  opacity: 0.8;
  font-weight: 400;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

/* Search Container */
.search-container {
  flex: 1;
  max-width: 500px;
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.search-icon {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.7);
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: white;
  font-size: 1rem;
  outline: none;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-clear {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  padding: 2px;
  border-radius: 50%;
}

.search-clear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.search-clear.visible {
  opacity: 1;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
  overflow: hidden;
  z-index: 10;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.search-suggestions.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: var(--surface-elevated);
}

.suggestion-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

/* Header decoration - floating shapes */
.header-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.shape-1 {
  width: 120px;
  height: 120px;
  top: 20%;
  right: 10%;
  animation: float 6s ease-in-out infinite;
}

.shape-2 {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 15%;
  animation: float 8s ease-in-out infinite reverse;
}

.shape-3 {
  width: 60px;
  height: 60px;
  top: 50%;
  left: 5%;
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(180deg); }
}

/* Apps section */
.apps-section {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.apps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

/* App cards */
.app-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-yellow), var(--accent-red));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.app-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at center, var(--soft-blue) 0%, transparent 70%);
  opacity: 0.5;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.app-card:hover::before {
  transform: scaleX(1);
}

.app-card:hover::after {
  opacity: 0.8;
}

.app-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--secondary-blue);
}

.app-card.hidden {
  display: none;
}

.card-animate {
  animation: slideInUp 0.6s ease-out forwards;
}

.card-animate:nth-child(2) {
  animation-delay: 0.2s;
}

/* No results */
.no-results {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.no-results-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  color: var(--text-muted);
}

.no-results-icon svg {
  width: 100%;
  height: 100%;
}

.no-results h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.no-results p {
  font-size: 1rem;
  margin: 0;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.gorgias-icon {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.gorgias-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.app-card:hover .gorgias-icon::before {
  left: 100%;
}

.ipr-icon {
  background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-red) 100%);
  color: var(--primary-dark);
  position: relative;
  overflow: hidden;
}

.ipr-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.app-card:hover .ipr-icon::before {
  left: 100%;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-content {
  margin-bottom: 2rem;
}

.card-description {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-tag {
  background: linear-gradient(135deg, var(--light-blue) 0%, var(--soft-blue) 100%);
  color: var(--text-secondary);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--secondary-blue);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.feature-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(94, 155, 252, 0.1), transparent);
  transition: left 0.5s ease;
}

.app-card:hover .feature-tag::before {
  left: 100%;
}

.feature-tag:hover {
  background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
  color: white;
  transform: translateY(-1px);
}

/* Buttons */
.card-button {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.card-button:hover::before {
  left: 100%;
}

.card-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-button:active {
  transform: translateY(0);
}

.button-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.card-button:hover .button-arrow {
  transform: translateX(4px);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--light-blue) 0%, var(--soft-blue) 100%);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 2px solid var(--secondary-blue);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-yellow), var(--accent-red), var(--primary-blue));
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { transform: translateX(-50%); }
  50% { transform: translateX(50%); }
}

/* --- Colorful Geometric Pattern Footer --- */

/* Wave animations for footer shapes */
@keyframes wave {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg) scale(1); 
    opacity: 0.85; 
  }
  50% { 
    transform: translateY(-15px) rotate(1deg) scale(1.08); 
    opacity: 1; 
  }
}

@keyframes gentleFloat {
  0%, 100% { 
    transform: translateY(0px) scale(1); 
    opacity: 0.9; 
  }
  50% { 
    transform: translateY(-8px) scale(1.05); 
    opacity: 1; 
  }
}

.pattern-container {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  max-width: 1200px;
  width: 100vw;
  padding: 30px 0 20px 0;
  justify-content: center;
  margin: 0 auto;
  min-height: 90px;
  box-sizing: border-box;
  overflow-x: auto;
}

.shape {
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(30,29,66,0.06);
  transition: transform 0.4s cubic-bezier(.23,1.01,.32,1);
  position: relative;
  z-index: 1;
  animation: wave 3s ease-in-out infinite;
  will-change: transform;
}

.shape:hover {
  transform: scale(1.15) translateY(-5px);
  transition: transform 0.3s cubic-bezier(.23,1.01,.32,1);
}

/* Progressive wave delays for synchronized effect */
.shape:nth-child(1) {
  animation-delay: 0s;
}
.shape:nth-child(2) {
  animation-delay: 0.2s;
}
.shape:nth-child(3) {
  animation-delay: 0.4s;
}
.shape:nth-child(4) {
  animation-delay: 0.6s;
}
.shape:nth-child(5) {
  animation-delay: 0.8s;
}
.shape:nth-child(6) {
  animation-delay: 1s;
}
.shape:nth-child(7) {
  animation-delay: 1.2s;
}
.shape:nth-child(8) {
  animation-delay: 1.4s;
}
.shape:nth-child(9) {
  animation-delay: 1.6s;
}
.shape:nth-child(10) {
  animation-delay: 1.8s;
}
.shape:nth-child(11) {
  animation-delay: 2s;
}
.shape:nth-child(12) {
  animation-delay: 2.2s;
}

/* Special animation for rect-group elements */
.rect-group {
  display: flex;
  gap: 10px;
}

.rect-group .rect-thin {
  animation: gentleFloat 3s ease-in-out infinite;
}

.rect-group .rect-thin:nth-child(1) {
  animation-delay: 0.6s;
}
.rect-group .rect-thin:nth-child(2) {
  animation-delay: 0.7s;
}
.rect-group .rect-thin:nth-child(3) {
  animation-delay: 0.8s;
}

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

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* Responsive design */
@media (max-width: 768px) {
  .app-header {
    padding: 1.5rem 1rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
  }
  
  .brand-section {
    justify-content: center;
  }
  
  .search-container {
    max-width: none;
  }
  
  .apps-section {
    padding: 2rem 1rem;
  }
  
  .apps-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .app-card {
    padding: 1.5rem;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .card-features {
    justify-content: flex-start;
  }
  
  @keyframes wave {
    0%, 100% { 
      transform: translateY(0px) scale(1); 
      opacity: 0.9; 
    }
    50% { 
      transform: translateY(-5px) scale(1.02); 
      opacity: 1; 
    }
  }
  
  @keyframes gentleFloat {
    0%, 100% { 
      transform: translateY(0px) scale(1); 
      opacity: 0.9; 
    }
    50% { 
      transform: translateY(-5px) scale(1.02); 
      opacity: 1; 
    }
  }
  
  .pattern-container {
    gap: 12px;
    min-height: 60px;
    padding: 20px 0 10px 0;
  }
  
  .rounded-rect-large { 
    width: 60px; 
    height: 30px; 
    border-radius: 15px; 
  }
  
  .half-circle { 
    width: 30px; 
    height: 30px; 
    border-radius: 30px 0 0 30px; 
  }
  
  .circle { 
    width: 30px; 
    height: 30px; 
  }
  
  .rect-thin { 
    width: 8px; 
    height: 30px; 
    border-radius: 3px; 
  }
  
  .rect-group { 
    gap: 5px; 
  }
  
  .half-circle-special { 
    width: 15px; 
    height: 45px; 
    border-radius: 0 15px 15px 0; 
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: 1rem 0.5rem;
  }
  
  .apps-section {
    padding: 1.5rem 0.5rem;
  }
  
  .app-card {
    padding: 1rem;
  }
  
  .section-header {
    margin-bottom: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-elevated);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Geometric shape definitions */
.rounded-rect-large {
  width: 120px;
  height: 60px;
  border-radius: 30px;
  display: block;
}

.coral { 
  background: linear-gradient(135deg, #FF6B6B, #FF5252);
}

.coral-2 { 
  background: linear-gradient(135deg, #FF5A5A, #FF4444);
}

.half-circle {
  width: 60px;
  height: 60px;
  border-radius: 60px 0 0 60px;
}

.yellow { 
  background: linear-gradient(135deg, #FFD93D, #FFC107);
}

.circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.light-blue { 
  background: linear-gradient(135deg, #74C0FC, #42A5F5);
}

.light-blue-2 { 
  background: linear-gradient(135deg, #91D5FF, #64B5F6);
}

.yellow-circle { 
  background: linear-gradient(135deg, #FFD93D, #FFCA28);
}

.half-circle-special {
  width: 30px;
  height: 90px;
  border-radius: 0 30px 30px 0;
  background: #FF6B6B;
}

.rect-thin {
  width: 15px;
  height: 60px;
  border-radius: 5px;
}

.mint { 
  background: linear-gradient(180deg, #51CF66, #40C057);
}

.mint-light { 
  background: linear-gradient(180deg, #8CE99A, #69DB7C);
}

/* Logo group styling - commented out for geometric pattern only */
/*
.logo-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
*/

/* Wave animation activation */
.pattern-container.wave-active .shape {
  animation-play-state: running;
}

.pattern-container.wave-active .rect-group .rect-thin {
  animation-play-state: running;
}
