/* CSS Design System - E&M Servicios Generales Premium (Blue & Orange Scheme) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* HSL Color Palette matching the Blue & Orange Flyer */
  --primary-hue: 215;
  --primary-sat: 90%;
  --primary-light: 50%;
  
  --primary: hsl(var(--primary-hue), var(--primary-sat), var(--primary-light));
  --primary-hover: hsl(var(--primary-hue), var(--primary-sat), calc(var(--primary-light) - 8%));
  --primary-glow: hsla(var(--primary-hue), var(--primary-sat), var(--primary-light), 0.35);
  
  --accent-hue: 24; /* Vibrant Orange matching the flyer accent */
  --accent-sat: 100%;
  --accent-light: 50%;
  --accent: hsl(var(--accent-hue), var(--accent-sat), var(--accent-light));
  --accent-hover: hsl(var(--accent-hue), var(--accent-sat), 42%);
  --accent-glow: hsla(var(--accent-hue), var(--accent-sat), var(--accent-light), 0.35);
  
  --warning: hsl(38, 100%, 55%);
  --success: hsl(142, 70%, 45%);
  --error: hsl(350, 80%, 55%);
  
  /* Dark Mode Surfaces with Deep Blue Tint */
  --bg: hsl(215, 45%, 6%);
  --surface: hsl(215, 35%, 10%);
  --surface-secondary: hsl(215, 25%, 15%);
  --border: hsla(215, 10%, 80%, 0.08);
  --border-focus: hsla(var(--primary-hue), var(--primary-sat), var(--primary-light), 0.5);
  
  /* Text Colors */
  --text: hsl(0, 0%, 98%);
  --text-muted: hsl(215, 15%, 75%);
  --text-dim: hsl(215, 10%, 55%);
  
  /* Typography */
  --font-title: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Glassmorphism & Shadows */
  --backdrop-blur: blur(16px);
  --glass-bg: rgba(10, 18, 36, 0.75);
  --glass-border: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 24px -6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--primary-glow);
  
  /* Layout */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-secondary);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-title {
  font-family: var(--font-title);
  font-size: 38px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 50px;
  letter-spacing: -1px;
}

.section-title span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), hsl(var(--accent-hue), var(--accent-sat), 45%));
  color: var(--text);
  box-shadow: 0 4px 15px rgba(251, 146, 60, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: 0.75s;
  opacity: 0;
}

.btn-primary:hover::after {
  opacity: 1;
  left: 125%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(251, 146, 60, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: var(--backdrop-blur);
}

.btn-secondary:hover {
  background: var(--surface-secondary);
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* Header / Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 18, 36, 0.45);
  backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.navbar.scrolled {
  background: var(--bg);
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 24px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
}

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: saturate(1.1) brightness(0.9);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(circle at 60% 30%, hsla(var(--accent-hue), var(--accent-sat), 30%, 0.12), transparent 60%),
              radial-gradient(circle at 20% 70%, hsla(var(--primary-hue), var(--primary-sat), 30%, 0.25), transparent 50%),
              linear-gradient(to bottom, transparent, var(--bg));
}

.hero-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 40px;
  position: relative;
  z-index: 10;
}

.hero-content {
  flex: 1.2;
  max-width: 600px;
  position: relative;
  z-index: 10;
}

.hero-emergency-card {
  flex: 0.95;
  background: rgba(10, 18, 36, 0.7);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 380px;
  justify-content: center;
}

/* Specific glows matching red and blue indicators */
.hero-emergency-card.emergency-electric {
  border-color: rgba(239, 68, 68, 0.35); /* Red glow for electric emergency */
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.15);
}

.hero-emergency-card.emergency-electric:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 12px 40px rgba(239, 68, 68, 0.45);
}

.hero-emergency-card.emergency-plumb {
  border-color: rgba(59, 130, 246, 0.35); /* Blue glow for plumbing emergency */
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
}

.hero-emergency-card.emergency-plumb:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.45);
}

.emergency-badge {
  background: var(--error);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { opacity: 0.8; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { opacity: 1; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { opacity: 0.8; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.hero-emergency-card h2 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  line-height: 1.1;
}

.emergency-electric h2 {
  color: hsl(15, 100%, 60%); /* Orange-Red color for title */
}

.emergency-plumb h2 {
  color: hsl(200, 100%, 55%); /* Blue color for title */
}

.hero-emergency-card p {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.emergency-time {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 900;
  color: var(--accent); /* Resaltante (Orange) */
  margin-bottom: 8px;
  animation: neon-blink-text 1.2s infinite alternate ease-in-out;
}

@keyframes neon-blink-text {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(251, 146, 60, 0.8), 0 0 25px rgba(251, 146, 60, 0.4);
  }
  50% {
    opacity: 0.15;
    text-shadow: none;
  }
}

.emergency-zone {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 2px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
}

.emergency-btn {
  background: var(--accent);
  color: var(--text);
  border: 1px solid var(--accent);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 800;
  transition: var(--transition);
  width: 100%;
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.2);
}

.hero-emergency-card:hover .emergency-btn {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
}

@media(max-width: 1100px) {
  .hero-container {
    flex-direction: column;
    padding-top: 120px;
    gap: 30px;
    text-align: center;
  }
  .hero-content {
    order: 1; /* Center content first */
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-emergency-card {
    order: 2; /* Emergency cards stack below */
    width: 100%;
    max-width: 500px;
    min-height: auto;
    padding: 24px;
  }
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-family: var(--font-title);
  font-size: 60px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent), #ffedd5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 35px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-glow);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 65px;
  height: 65px;
  border-radius: var(--radius-sm);
  background: var(--surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 24px;
  color: var(--accent);
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.03);
}

.service-card:hover .service-icon {
  background: var(--accent);
  color: var(--text);
  transform: scale(1.1);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.service-card h3 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 14px;
  flex-grow: 1;
  margin-bottom: 20px;
  line-height: 1.5;
}

.service-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.service-card:hover .service-link {
  color: var(--text);
}

/* Calculator Section (Cotizador) */
.calculator-card {
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  margin: 0 auto;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
}

@media(max-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.form-control {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.25);
}

.calc-result {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.result-header h4 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.price-display {
  font-family: var(--font-title);
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 20px;
}

.price-display span {
  font-size: 24px;
}

.calc-summary {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
  text-align: left;
  background: rgba(0,0,0,0.15);
  padding: 15px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.03);
}

.calc-summary ul {
  list-style: none;
}

.calc-summary ul li {
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

/* Testimonials Carousel */
.testimonials-wrapper {
  overflow: hidden;
  position: relative;
  padding: 20px 0;
}

.testimonials-track {
  display: flex;
  gap: 30px;
  transition: transform 0.5s ease-in-out;
}

.testimonial-card {
  flex: 0 0 calc(33.333% - 20px);
  min-width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 35px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stars {
  color: var(--warning);
  font-size: 18px;
  margin-bottom: 15px;
}

.testi-content {
  font-size: 15px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 20px;
}

.client-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
  border: 2px solid var(--border);
}

.client-meta h5 {
  font-size: 15px;
  font-weight: 700;
}

.client-meta span {
  font-size: 12px;
  color: var(--text-dim);
}

/* FAQ Accordion */
.faq-wrapper {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}

.faq-question:hover {
  background: var(--surface-secondary);
}

.faq-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.35s ease;
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid transparent;
}

.faq-item.active {
  border-color: rgba(255,255,255,0.1);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 20px 24px;
  border-top-color: var(--border);
}

/* Footer */
.footer {
  background: hsl(215, 50%, 4%);
  border-top: 1px solid var(--border);
  padding: 80px 0 30px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

@media(max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand p {
  margin: 15px 0 20px 0;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-family: var(--font-title);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 30px;
  font-size: 12px;
  color: var(--text-dim);
}
