/* ==========================================================================
   G4SMARTS - Clean CSS & Theme Custom Stylesheet
   Production Ready UI/UX Fixes & Elementor Overrides
   ========================================================================== */

/* 1. CSS Custom Properties / Tokens */
:root {
  --primary-navy: #0b111e;
  --secondary-navy: #131c2e;
  --accent-cyan: #00bcd4;
  --accent-cyan-hover: #00acc1;
  --accent-blue: #00bcd4;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --bg-glass: rgba(19, 28, 46, 0.85);
  --border-glass: rgba(255, 255, 255, 0.1);
  --overlay-dark: rgba(11, 17, 30, 0.78);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* 2. Global Resets & Anti-Scrollbar Horizontal (Requirement #3) */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background-color: var(--primary-navy);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* 3. Typography & Paragraph Justification (Requirement #5) */
p, .descriptive-text, .elementor-widget-text-editor p {
  text-align: justify !important;
  text-justify: inter-word !important;
  hyphens: auto !important;
  -webkit-hyphens: auto !important;
  -ms-hyphens: auto !important;
  line-height: 1.7;
  color: var(--text-muted);
}

h1, h2, h3, h4, h5, h6, .heading-text {
  font-family: var(--font-heading);
  text-align: left;
  margin-top: 0;
}

.text-center h1, .text-center h2, .text-center h3, .text-center p {
  text-align: center !important;
}

/* 4. Subtitle Tag / Pill Badge Style (Unified Cyan Brand Color) */
.pill-badge, .pill-badge-light {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 16px !important;
  border-radius: 9999px !important;
  background: rgba(0, 188, 212, 0.12) !important;
  border: 1px solid rgba(0, 188, 212, 0.35) !important;
  color: #00bcd4 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.pill-badge-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background-color: #00bcd4 !important;
  box-shadow: 0 0 10px #00bcd4 !important;
  animation: pulse-dot 2s infinite !important;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* 5. Hero Banner Headline Inline Protection (Requirement #1) */
.hero-title-inline {
  display: inline;
  vertical-align: baseline;
  white-space: normal;
}

.hero-highlight {
  color: var(--accent-cyan);
  font-weight: 800;
  display: inline-block;
  white-space: nowrap;
  background: linear-gradient(135deg, #00bcd4 0%, #64ffda 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 6. Logo Container Protection & Unclipping (Requirement #2) */
.header-logo-container {
  overflow: visible !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 4px;
  padding-bottom: 4px;
  text-decoration: none;
}

/* 6. Centered Header Branding & Logo Styling (Clean No Shadow) */
.header-center-branding {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 16px;
  background: rgba(11, 17, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-center-logo-img {
  height: 100px !important;
  max-width: 520px !important;
  width: auto !important;
  object-fit: contain !important;
  filter: none !important;
  transition: transform 0.3s ease;
}

.header-center-branding:hover .header-center-logo-img {
  transform: scale(1.04);
  filter: none !important;
}

.header-logo-container {
  overflow: visible !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 4px;
  padding-bottom: 4px;
  text-decoration: none;
}

.header-logo-img {
  height: 52px !important;
  max-width: 240px !important;
  width: auto !important;
  object-fit: contain !important;
  filter: none !important;
  transition: transform 0.3s ease;
}

.header-logo-container:hover .header-logo-img {
  transform: scale(1.05);
  filter: none !important;
}

/* 6b. Large Hero Banner Logo Styling (Subtle Transparent Glass Box, No Heavy Blue Block) */
.hero-large-logo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 40px;
  background: rgba(11, 17, 30, 0.35) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: none !important;
  border-radius: 24px;
  box-shadow: 0 0 20px rgba(0, 188, 212, 0.08) !important;
  transition: transform 0.4s ease, background 0.4s ease;
}

.hero-large-logo-card:hover {
  transform: translateY(-2px) scale(1.01);
  border: none !important;
  background: rgba(11, 17, 30, 0.45) !important;
  box-shadow: 0 0 28px rgba(0, 188, 212, 0.12) !important;
}

.hero-large-logo-img {
  max-width: 580px;
  width: 100%;
  height: auto;
  max-height: 210px;
  object-fit: contain;
  filter: none !important;
  transition: transform 0.3s ease;
}

.hero-large-logo-card:hover .hero-large-logo-img {
  transform: scale(1.03);
  filter: none !important;
}

/* 6c. Prominent Footer Logo Styling (No Shadow) */
.footer-logo-img {
  height: 90px !important;
  max-width: 100% !important;
  width: auto !important;
  object-fit: contain !important;
  filter: none !important;
  transition: transform 0.3s ease;
}

.footer-logo-img:hover {
  transform: scale(1.04);
  filter: none !important;
}

@media (max-width: 768px) {
  .header-center-logo-img {
    height: 68px !important;
    max-width: 320px !important;
  }
  .header-logo-img {
    height: 58px !important;
  }
  .hero-large-logo-card {
    padding: 20px 28px;
  }
  .hero-large-logo-img {
    max-width: 360px;
    max-height: 130px;
  }
  .footer-logo-img {
    height: 70px !important;
  }
}

/* 7. Single Line Phone Numbers Rule (Requirement #6) */
.phone-single-line {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px;
}

/* 8. Uniform Vertical Service Cards Layout (Requirement #9) */
.service-card-uniform {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 32px;
  background: var(--secondary-navy);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.service-card-uniform:hover {
  border-color: rgba(0, 188, 212, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.service-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(0, 188, 212, 0.12);
  border: 1px solid rgba(0, 188, 212, 0.3);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.service-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  white-space: nowrap;
}

.service-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: justify;
  margin-bottom: 24px;
  flex-grow: 1;
}

.service-card-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  transition: color 0.2s ease;
}

.service-card-link:hover {
  color: #64ffda;
}

/* 9. Visión, Misión & Soporte Stacked Vertical Rows (Requirement #9) */
.stacked-block-row {
  width: 100%;
  background: var(--secondary-navy);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.stacked-block-row:hover {
  border-color: rgba(0, 188, 212, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* 10. Commercial Backgrounds with Overlay (Requirement #8) */
.bg-commercial-overlay {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-commercial-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--overlay-dark);
  z-index: 1;
}

.bg-commercial-overlay > * {
  position: relative;
  z-index: 2;
}

.bg-smart-city {
  background-image: url('https://images.unsplash.com/photo-1519501025264-65ba15a82390?auto=format&fit=crop&w=1920&q=80');
}

.bg-ai-analytics {
  background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1920&q=80');
}

.bg-digital-transform {
  background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=1920&q=80');
}

.bg-network-infrastructure {
  background-image: url('https://images.unsplash.com/photo-1544197150-b99a580bb7a8?auto=format&fit=crop&w=1920&q=80');
}

/* 11. Contact Section Anti-CLS (Requirement #6) */
.contact-map-container, .contact-form-container {
  min-height: 480px;
  height: 100%;
  border-radius: 16px;
  background-color: var(--secondary-navy);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  position: relative;
}

.contact-map-container iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: 0;
}

/* 12. Desktop Dropdowns & Header */
.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  font-weight: 500;
  font-size: 0.92rem;
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.2s ease;
  border-radius: 6px;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
  background: rgba(0, 188, 212, 0.08);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 270px;
  background: rgba(19, 28, 46, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(0, 188, 212, 0.15);
  color: #ffffff;
  padding-left: 24px;
}

.dropdown-item i {
  color: var(--accent-cyan);
  font-size: 0.9rem;
  width: 18px;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  transition: all 0.3s ease;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  color: #ffffff;
}

/* 13. Mobile Header & Drawer (< 1024px) (Requirement #3) */
@media (max-width: 1023px) {
  .desktop-nav {
    display: none !important;
  }
  .topbar-intermediate {
    display: none !important;
  }
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 30, 0.8);
  backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: var(--secondary-navy);
  border-left: 1px solid var(--border-glass);
  z-index: 1000;
  padding: 24px;
  overflow-y: auto;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-drawer.active {
  right: 0;
}

.mobile-sub-menu {
  display: none;
  padding-left: 16px;
  border-left: 2px solid var(--accent-cyan);
  margin-top: 6px;
  margin-bottom: 6px;
}

/* 14. Alternating Light Theme Sections & Cards */
.section-light {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

.section-light-alt {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

.section-light h1, .section-light h2, .section-light h3, .section-light h4,
.section-light-alt h1, .section-light-alt h2, .section-light-alt h3, .section-light-alt h4 {
  color: #0f172a !important;
}

.section-light p, .section-light-alt p {
  color: #475569 !important;
  text-align: justify !important;
}

.pill-badge-light {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 16px !important;
  border-radius: 9999px !important;
  background: rgba(0, 188, 212, 0.12) !important;
  border: 1px solid rgba(0, 188, 212, 0.35) !important;
  color: #00bcd4 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  backdrop-filter: blur(8px) !important;
}

.service-card-light {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 32px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.service-card-light:hover {
  border-color: #00bcd4;
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 188, 212, 0.15);
}

.stacked-block-row-light {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.stacked-block-row-light:hover {
  border-color: #00bcd4;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 188, 212, 0.12);
}

/* 15. Hero Slider Fade Animation */
.slide-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  z-index: 1;
}

.slide-item.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.slide-item > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 16. Floating WhatsApp Contact Button */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none !important;
}

.whatsapp-float:hover {
  transform: scale(1.12) rotate(8deg);
  box-shadow: 0 12px 35px rgba(37, 211, 102, 0.7);
  color: #ffffff !important;
}

.whatsapp-float-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.35);
  animation: whatsapp-pulse 2s infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes whatsapp-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.45); opacity: 0; }
}

