/* ============================================
   AUTONEX - GLOBAL STYLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');
@import 'variables.css';

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 18px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition-base); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 64px);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }
p { line-height: 1.75; color: var(--color-text-light); font-size: 1.1rem; }

/* ── Section Headings ── */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(200, 168, 0, 0.12);
  border: 1px solid rgba(200, 168, 0, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 1rem;
  line-height: 1.15;
}
.section-title span { color: var(--color-accent); }
.section-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-light);
  max-width: 600px;
  line-height: 1.75;
}
.section-header { margin-bottom: 3.5rem; }
.section-header.centered { text-align: center; }
.section-header.centered .section-subtitle { margin: 0 auto; }
.divider {
  width: 60px; height: 4px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  margin: 1rem 0;
}
.divider.centered { margin: 1rem auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-lg);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-primary);
  letter-spacing: 0.02em;
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 51, 102, 0.4);
}
.btn-accent {
  background: var(--gradient-accent-vibrant);
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-accent);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(200, 168, 0, 0.5);
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}
.btn-outline-white {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--color-white);
  transform: translateY(-2px);
}
.btn-ghost {
  background: rgba(0,51,102,0.06);
  color: var(--color-primary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: rgba(0,51,102,0.12);
  transform: translateY(-1px);
}
.btn-whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: var(--color-white);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
}
.btn-sm { padding: 8px 18px; font-size: 0.82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-xl { padding: 18px 44px; font-size: 1.05rem; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: var(--radius-lg); }

/* ── Cards ── */
.card {
  background: var(--color-card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-slow);
  overflow: hidden;
  border: 1px solid var(--color-light-mid);
}
.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
  border-color: rgba(0, 51, 102, 0.15);
}
.card-body { padding: 1.5rem; }

/* ── Glass Card ── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-primary { background: rgba(0,51,102,0.1); color: var(--color-primary); }
.badge-accent { background: rgba(200,168,0,0.15); color: var(--color-accent-dark); }
.badge-success { background: rgba(56,161,105,0.1); color: var(--color-success); }
.badge-danger { background: rgba(229,62,62,0.1); color: var(--color-danger); }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

/* ── Flex utilities ── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ── Text utilities ── */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-white { color: var(--color-white); }
.text-muted { color: var(--color-text-muted); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* ── Spacing ── */
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

/* ── Section ── */
.section { padding: var(--section-padding) 0; }
.section-light { background: var(--color-offwhite); }
.section-primary { background: var(--gradient-primary); color: white; }
.section-industrial { background: var(--color-light); }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  padding: 1rem 0;
}
.breadcrumb a { color: var(--color-primary); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb .sep { opacity: 0.4; }

/* ── Page Banner ── */
.page-banner {
  background: var(--gradient-hero);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { color: white; margin-bottom: 0.5rem; }
.page-banner p { color: rgba(255,255,255,0.75); max-width: 600px; }

/* ── Animated Background Shapes ── */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  background: var(--color-accent);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

/* ── Spinner / Loader ── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--color-light-mid);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.animate-fadeInUp { animation: fadeInUp 0.6s ease forwards; }
.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-slideInLeft { animation: slideInLeft 0.6s ease forwards; }
.animate-slideInRight { animation: slideInRight 0.6s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.5s ease forwards; }

/* Staggered delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ── Intersection Observer trigger ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Form Styles ── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-light-mid);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: all var(--transition-base);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
}
.form-textarea { resize: vertical; min-height: 140px; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--color-light-mid); margin-bottom: 1.5rem; }
.tab-btn {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-base);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.tab-btn:hover { color: var(--color-primary); background: rgba(0,51,102,0.04); }
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); background: rgba(0,51,102,0.06); }
.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }

/* ── Modals ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal-backdrop);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: white;
  border-radius: var(--radius-2xl);
  max-width: 600px;
  width: 100%;
  padding: 2rem;
  position: relative;
  animation: scaleIn 0.3s ease;
  box-shadow: var(--shadow-2xl);
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--transition-base);
}
.modal-close:hover { background: var(--color-danger); color: white; }

/* ── WhatsApp Floating Button ── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: var(--z-fixed);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.whatsapp-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-spring);
  cursor: pointer;
  position: relative;
}
.whatsapp-btn svg { width: 30px; height: 30px; fill: white; }
.whatsapp-btn:hover { transform: scale(1.1); box-shadow: 0 12px 35px rgba(37, 211, 102, 0.55); }
.whatsapp-btn .pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid rgba(37, 211, 102, 0.4);
  animation: whatsapp-pulse 2s ease-in-out infinite;
}
.whatsapp-tooltip {
  background: var(--color-primary);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--transition-base);
  pointer-events: none;
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; transform: translateX(0); }
@keyframes whatsapp-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0; }
}

/* ── Scroll to Top ── */
.scroll-top {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 44px; height: 44px;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: var(--z-fixed);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { background: var(--color-accent); transform: translateY(-3px); }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-header { margin-bottom: 2.5rem; }
}
@media (max-width: 480px) {
  .btn-xl { padding: 14px 28px; font-size: 0.95rem; }
}

/* ── LTR overrides for telephone links and fields ── */
a[href^="tel:"], input[type="tel"], .phone-number {
  direction: ltr !important;
  unicode-bidi: embed !important;
  display: inline-block;
}
