/* ==========================================================================
   XWORK DIGITAL - MODERN UI DESIGN SYSTEM
   Clean, Responsive, Fast & Independent of Odoo
   ========================================================================== */

:root {
  /* Color Palette - Official XWORK Brand Colors (Red Gradient & Tech Blue) */
  --primary: #2b4c7e;
  --primary-hover: #1e3963;
  --primary-light: #3d66a4;
  --primary-gradient: linear-gradient(135deg, #2b4c7e 0%, #3d66a4 100%);
  --secondary-gradient: linear-gradient(90deg, #d7322c 0%, #2b4c7e 100%);
  --hero-bg: linear-gradient(135deg, #f0f4fb 0%, #e6eefa 100%);
  --section-alt: linear-gradient(135deg, #f4f7fc 0%, #ebf1fa 100%);
  --accent-purple: #2b4c7e;
  --accent-red: #d7322c;

  /* Neutral Colors */
  --dark-heading: #1a2b48;
  --body-text: #3c4a63;
  --light-text: #60708f;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;

  /* Borders & Shadows */
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-pill: 50px;
  --shadow-sm: 0 4px 12px rgba(43, 76, 126, 0.06);
  --shadow-md: 0 8px 24px rgba(43, 76, 126, 0.12);
  --shadow-hover: 0 12px 32px rgba(43, 76, 126, 0.22);
  --shadow-glow: 0 0 20px rgba(43, 76, 126, 0.35);

  /* Fonts & Transitions */
  --font-main: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--body-text);
  background-color: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

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

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Utility Layout Containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ==========================================================================
   TOP ANNOUNCEMENT BAR
   ========================================================================== */
.top-bar {
  background: var(--secondary-gradient);
  color: #ffffff;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  position: relative;
  z-index: 1001;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: var(--border-radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-btn:hover, .lang-btn.active {
  background: #ffffff;
  color: var(--accent-purple);
  font-weight: 600;
}

.lang-btn img {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
}

.top-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.top-info-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.95);
  transition: var(--transition-fast);
}

.top-info-item:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.top-info-item i {
  font-size: 0.9rem;
}

.login-top-btn {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.2rem 0.65rem;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.login-top-btn:hover {
  background: #ffffff;
  color: var(--accent-purple);
}

.btn-login-head {
  padding: 0.5rem 1.2rem;
  font-size: 0.88rem;
  border-width: 1.5px;
}

/* ==========================================================================
   MAIN NAVIGATION HEADER
   ========================================================================== */
.main-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition-normal);
}

.main-header.scrolled {
  box-shadow: 0 4px 20px rgba(107, 91, 205, 0.12);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: var(--transition-normal);
}

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

.header-logo {
  height: 65px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(107, 91, 205, 0.12));
  transition: var(--transition-normal);
}

.header-logo:hover {
  filter: drop-shadow(0 4px 14px rgba(107, 91, 205, 0.25));
  transform: scale(1.03);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--body-text);
  font-weight: 500;
  font-size: 0.98rem;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary-gradient);
  transition: var(--transition-fast);
  border-radius: 2px;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-normal);
  text-align: center;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(107, 91, 205, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 91, 205, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(107, 91, 205, 0.2);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark-heading);
  cursor: pointer;
  padding: 0.4rem;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 5rem 0 4rem;
  background: var(--hero-bg);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(128, 117, 247, 0.15);
  filter: blur(80px);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(107, 91, 205, 0.1);
  color: var(--primary);
  padding: 0.35rem 1rem;
  border-radius: var(--border-radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--dark-heading);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--body-text);
  margin-bottom: 2rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image {
  width: 100%;
  max-width: 540px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  object-fit: cover;
}

.hero-image:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Floating Stats Badge */
.floating-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: #ffffff;
  padding: 1rem 1.4rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: float 4s ease-in-out infinite;
}

.floating-badge i {
  font-size: 2rem;
  color: var(--primary);
}

.floating-badge .num {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--dark-heading);
}

.floating-badge .text {
  font-size: 0.8rem;
  color: var(--light-text);
}

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

/* ==========================================================================
   METRICS & TRUST BANNER
   ========================================================================== */
.metrics-section {
  background: #ffffff;
  padding: 2.25rem 0;
  border-bottom: 1px solid #eef2f7;
  position: relative;
  z-index: 10;
  margin-top: -2rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.metric-card {
  background: #f8fafc;
  border: 1px solid rgba(43, 76, 126, 0.08);
  padding: 1.25rem 1.5rem;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-normal);
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(43, 76, 126, 0.25);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(43, 76, 126, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.metric-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-heading);
  margin-bottom: 0.15rem;
}

.metric-info p {
  font-size: 0.85rem;
  color: var(--light-text);
  line-height: 1.3;
}

/* ==========================================================================
   SECTIONS COMMON STYLES
   ========================================================================== */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-subtitle {
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark-heading);
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.05rem;
  color: var(--light-text);
}

/* Cards Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
}

/* Feature & Service Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--border-radius-md);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(107, 91, 205, 0.08);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(107, 91, 205, 0.2);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(107, 91, 205, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  transition: var(--transition-fast);
}

.card:hover .card-icon {
  background: var(--primary-gradient);
  color: #ffffff;
  transform: scale(1.05);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark-heading);
  margin-bottom: 0.75rem;
}

.card-text {
  font-size: 0.95rem;
  color: var(--body-text);
  line-height: 1.6;
}

/* ==========================================================================
   SOLUCIONES TECNOLOGICAS
   ========================================================================== */
#soluciones-tec {
  background-color: #ffffff;
}

.card-solution {
  background: #f8fafe;
}

.card-features {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(43, 76, 126, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  list-style: none;
}

.card-features li {
  font-size: 0.88rem;
  color: var(--body-text);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}

.card-features li::before {
  content: "✓";
  color: var(--accent-red);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ==========================================================================
   EXPERIENCIA GLOBAL
   ========================================================================== */
#experiencia {
  background-color: #ffffff;
}

.country-card {
  text-align: center;
  align-items: center;
}

.country-flag-img {
  width: 52px;
  height: 35px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  margin-bottom: 0.85rem;
  transition: var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.country-card:hover .country-flag-img {
  transform: scale(1.12);
  box-shadow: 0 6px 16px rgba(43, 76, 126, 0.25);
}

.mini-flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   METODOLOGIA & BENEFICIOS
   ========================================================================== */
#metodologia {
  background: var(--section-alt);
}

#beneficios {
  background-color: #ffffff;
}

#porque {
  background: var(--section-alt);
}

.step-card {
  text-align: center;
  align-items: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   CONTACTO / CTA SECTION
   ========================================================================== */
.contact-section {
  background: var(--hero-bg);
  padding: 5rem 0;
  position: relative;
}

.contact-wrapper {
  background: #ffffff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.contact-info-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-heading);
  margin-bottom: 1rem;
}

.contact-info-text {
  font-size: 1rem;
  color: var(--body-text);
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-item-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(107, 91, 205, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item-details h4 {
  font-size: 0.9rem;
  color: var(--light-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-item-details p, .contact-item-details a {
  font-weight: 600;
  color: var(--dark-heading);
  font-size: 1.05rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-heading);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
  background: #f8fafc;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(107, 91, 205, 0.15);
}

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

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 32px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: #ffffff;
  padding: 3rem 0 2rem;
  border-top: 1px solid #edf2f7;
  text-align: center;
}

.footer-logo {
  height: 95px;
  width: auto;
  margin: 0 auto 0.75rem;
  filter: drop-shadow(0 4px 14px rgba(107, 91, 205, 0.18));
  transition: var(--transition-normal);
}

.footer-logo:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 6px 20px rgba(107, 91, 205, 0.35));
}

.footer-tagline {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-heading);
  letter-spacing: 0.5px;
  margin-bottom: 1.75rem;
  text-transform: uppercase;
  background: linear-gradient(135deg, #2b4c7e 0%, #d7322c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--body-text);
  font-size: 0.95rem;
  font-weight: 500;
}

.footer-link:hover {
  color: var(--primary);
}

.footer-copyright {
  font-size: 0.9rem;
  color: var(--light-text);
}

.footer-legal {
  margin-top: 0.5rem;
}

.footer-legal a {
  color: var(--light-text);
  text-decoration: underline;
  margin: 0 0.5rem;
}

.footer-legal a:hover {
  color: var(--primary);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLETS)
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle {
    margin: 0 auto 2rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    transition: var(--transition-normal);
    z-index: 1005;
  }

  .nav-menu.active {
    right: 0;
  }

  .mobile-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .top-bar .container {
    flex-direction: column;
    text-align: center;
  }

  .top-info {
    justify-content: center;
    gap: 0.75rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .floating-badge {
    left: 50%;
    transform: translateX(-50%);
    bottom: -15px;
    white-space: nowrap;
  }
}
