/* Alan Sandbox Soluciones Tecnologicas S.R.L. - Design System */
:root {
  --primary: #0b1329;
  --primary-light: #162244;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --secondary: #10b981;
  --bg-light: #f8fafc;
  --surface: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 30px rgba(0,0,0,0.12);
}

html, body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.65;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

/* Defensive Reset on Navigation */
ul.nav, .nav, .nav-menu, ul.navbar-nav {
  list-style: none !important;
  margin: 0 !important;
  padding-left: 0 !important;
}
ul.nav li, .nav li, .nav-menu li {
  list-style: none !important;
}

/* Sub-Menu Styling */
.nav-item-dropdown {
  position: relative !important;
}
.sub-menu {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  min-width: 270px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 35px rgba(0,0,0,0.14) !important;
  border-radius: 8px !important;
  padding: 10px 0 !important;
  list-style: none !important;
  margin: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(10px) !important;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease !important;
  z-index: 10000 !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
}
.nav-item-dropdown:hover .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}
.sub-menu li a {
  display: block !important;
  padding: 10px 22px !important;
  color: #1e293b !important;
  font-size: 0.90rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s !important;
  white-space: nowrap !important;
}
.sub-menu li a:hover {
  background: #f1f5f9 !important;
  color: var(--accent) !important;
}

/* Topbar */
.topbar {
  background-color: var(--primary);
  color: #94a3b8;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.topbar-info span {
  margin-right: 18px;
}
.topbar-info a {
  color: #e2e8f0;
  text-decoration: none;
}
.topbar-info a:hover {
  color: #38bdf8;
}

/* Header & Navbar */
.header-main {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--primary);
}
.brand-icon {
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 900;
  font-size: 20px;
}
.brand-text h1 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
  color: var(--primary);
}
.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.main-nav a.nav-link {
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 4px;
  transition: color 0.2s;
}
.main-nav a.nav-link:hover, .main-nav a.nav-link.active {
  color: var(--accent);
}
.btn-nav-arrepentimiento {
  background-color: #fee2e2;
  color: #dc2626 !important;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.2s;
}
.btn-nav-arrepentimiento:hover {
  background-color: #fecaca;
  color: #b91c1c !important;
}
.mobile-btn-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary);
}

/* Ticker Section (White Ticker Standard) */
.ticker-section {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
.ticker-track-wrap {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  gap: 30px;
  animation: ticker-slide 38s linear infinite;
}
.ticker-track:hover {
  animation-play-state: paused;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.ticker-item span.dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
@keyframes ticker-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Hero Section */
.hero-section {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 85px 0 75px 0;
  color: #ffffff;
}
.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(11, 19, 41, 0.94) 0%, rgba(15, 23, 42, 0.88) 60%, rgba(2, 132, 199, 0.40) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}
.hero-kicker-tag {
  display: inline-block;
  background: rgba(2, 132, 199, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.hero-main-title {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.18;
  margin-bottom: 18px;
  color: #ffffff;
  overflow-wrap: break-word;
}
.hero-motto-pill {
  display: inline-block;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero-lead-text {
  font-size: 18px;
  color: #cbd5e1;
  margin-bottom: 28px;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  min-height: 46px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff !important;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #ffffff;
}
.btn-dark {
  background: var(--primary);
  color: #ffffff !important;
}
.btn-dark:hover {
  background: var(--primary-light);
}

/* Sections */
.section {
  padding: 70px 0;
}
.section-alt {
  background-color: #ffffff;
}
.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 50px auto;
}
.section-badge {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  display: inline-block;
}
.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1.25;
}
.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Elastic Content Cards (Auto-Stretching) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.feature-card, .service-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 100% !important;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover, .service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.card-icon {
  width: 52px;
  height: 52px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
}
.card-body-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  flex-grow: 1 !important;
  margin-bottom: 20px;
  overflow-wrap: break-word;
}
.card-action {
  margin-top: auto !important;
}

/* Image Showcase Card */
.img-showcase-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.img-showcase-card img {
  width: 100% !important;
  aspect-ratio: 16 / 10 !important;
  object-fit: cover !important;
  display: block;
}
.img-showcase-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Interactive Calculator (Archetype 4) */
.calc-container {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
  box-shadow: var(--shadow-md);
  max-width: 900px;
  margin: 0 auto;
}
.calc-group {
  margin-bottom: 24px;
}
.calc-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 15px;
}
.calc-badge {
  background: var(--primary);
  color: #38bdf8;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
}
input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.calc-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}
.checkbox-card input {
  margin-top: 4px;
  cursor: pointer;
}
.calc-result-box {
  background: var(--primary);
  color: #ffffff;
  padding: 24px;
  border-radius: 8px;
  margin-top: 28px;
  text-align: center;
}
.calc-result-title {
  font-size: 14px;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.calc-result-amount {
  font-size: 38px;
  font-weight: 900;
  color: #38bdf8;
  line-height: 1.1;
  margin-bottom: 10px;
}
.calc-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 14px;
  text-align: center;
}

/* Forms & Selects (Zero Browser Stubs) */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 8px;
}
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100% !important;
  display: block !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border) !important;
  background: #ffffff !important;
  color: var(--text-dark) !important;
  outline: none !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230284c7' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  padding-right: 44px !important;
  cursor: pointer !important;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2) !important;
}

/* Table Responsive */
.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.table-responsive th, .table-responsive td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table-responsive th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--primary);
}

/* Accordion */
.accordion-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.accordion-header {
  padding: 18px 24px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--primary);
  background: #ffffff;
  transition: background 0.2s;
}
.accordion-header:hover {
  background: #f8fafc;
}
.accordion-body {
  padding: 0 24px 20px 24px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* Subpage Header */
.page-heading {
  background: var(--primary);
  color: #ffffff;
  padding: 60px 0;
  position: relative;
}
.page-heading h1 {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 12px;
  line-height: 1.2;
}
.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: #94a3b8;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumb a {
  color: #38bdf8;
  text-decoration: none;
}

/* Footer */
.footer-main {
  background: #070d1e;
  color: #94a3b8;
  padding: 65px 0 30px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-col h4 {
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
}
.footer-col p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
  min-height: 36px;
  line-height: 24px;
  padding: 6px 0;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #38bdf8;
}
.footer-bottom {
  margin-top: 50px;
  padding-top: 25px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

/* Mobile & iOS Safari Responsiveness */
@media (max-width: 991.98px) {
  .topbar-info { display: none; }
  .mobile-btn-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0b1329;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 10001;
  }
  .main-nav.show { display: flex; }
  .main-nav a.nav-link {
    color: #ffffff;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .sub-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    box-shadow: none !important;
    background: rgba(255,255,255,0.05) !important;
    border: none !important;
    padding-left: 15px !important;
  }
  .sub-menu li a {
    color: #cbd5e1 !important;
    padding: 8px 0 !important;
  }
}

@media (max-width: 768px) {
  input[type="text"], input[type="email"], input[type="tel"], select, textarea {
    font-size: 16px !important;
  }
  .hero-main-title { font-size: 28px; }
  .section-title { font-size: 26px; }
  .calc-container { padding: 20px 16px; }
}
