/* ============================================================
   VILLALVA - Pruebas No Destructivas S.A. de C.V.
   Main Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #0A2F41;
  --primary-light: #134B63;
  --secondary: #E97132;
  --secondary-hover: #d45d1f;
  --accent: #0B769F;
  --accent-light: #0E96C9;
  --gray: #6B7280;
  --gray-light: #9CA3AF;
  --gray-dark: #374151;
  --light: #F8FAFC;
  --white: #FFFFFF;
  --black: #111111;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;

  --font-heading: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;

  --container: 1200px;
  --container-wide: 1400px;
  --container-narrow: 900px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;

  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--gray-dark);
  background: var(--light);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--secondary);
}

ul, ol {
  list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

p { margin-bottom: 1rem; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-muted { color: var(--gray); }
.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-secondary { color: var(--secondary); }
.text-primary { color: var(--primary); }

/* ---------- Container & Grid ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col {
  flex: 1;
  padding: 0 15px;
  min-width: 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }

@media (max-width: 992px) {
  .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; }
}

/* ---------- Spacing ---------- */
.section {
  padding: 80px 0;
}

.section-sm {
  padding: 40px 0;
}

.section-lg {
  padding: 120px 0;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 60px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 60px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--secondary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--secondary-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(233, 113, 50, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  background: var(--accent-light);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--primary);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--primary-light);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.125rem;
}

/* ---------- Section Titles ---------- */
.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--secondary);
  margin: 12px auto 0;
}

.section-title p {
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.section-title.text-white h2,
.section-title.text-white p { color: var(--white); }
.section-title.text-white h2::after { background: var(--secondary); }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.card-body p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
  background: var(--primary);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img,
.hero-bg picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,47,65,0.92) 0%, rgba(10,47,65,0.7) 50%, rgba(11,118,159,0.5) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 20px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 30px;
  opacity: 0.9;
  max-width: 600px;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(233, 113, 50, 0.2);
  border: 1px solid var(--secondary);
  color: var(--secondary);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

/* Hero Mini (inner pages) */
.hero-mini {
  position: relative;
  padding-top: var(--nav-height);
  min-height: 350px;
  display: flex;
  align-items: center;
  background: var(--primary);
  overflow: hidden;
}

.hero-mini-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-mini-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}

.hero-mini-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,47,65,0.75) 0%, rgba(10,47,65,0.45) 100%);
  z-index: 1;
}

.hero-mini .container {
  position: relative;
  z-index: 2;
}

.hero-mini h1 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.hero-mini .breadcrumb {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.hero-mini .breadcrumb a {
  color: rgba(255,255,255,0.7);
}

/* ---------- Header/Nav ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--primary);
  transition: all var(--transition);
}

.header.scrolled {
  background: rgba(10,47,65,0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 20px;
  max-width: var(--container-wide);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--secondary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--white);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text strong {
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.logo-text small {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.7;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Main Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav a {
  color: rgba(255,255,255,0.85);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav-lang {
  display: flex;
  gap: 4px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.2);
}

.nav-lang a {
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.nav-lang a.active {
  background: var(--secondary);
  color: var(--white);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 992px) {
  .menu-toggle { display: flex; }

  .nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    flex-direction: column;
    background: var(--primary);
    padding: 80px 30px 30px;
    gap: 0;
    transition: right var(--transition);
    z-index: 999;
    overflow-y: auto;
    align-items: stretch;
  }

  .nav.open { right: 0; }

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: block;
  }

  .nav-lang {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 15px;
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}

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

.footer h3, .footer h4 {
  color: var(--white);
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 0.95rem;
  margin-bottom: 20px;
  opacity: 0.7;
}

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

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: all var(--transition);
  font-size: 1.1rem;
}

.footer-social a:hover {
  background: var(--secondary);
  transform: translateY(-3px);
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.6);
  padding: 6px 0;
  font-size: 0.9rem;
  transition: all var(--transition);
}

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

.footer-contact p {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer-contact .icon {
  width: 18px;
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 10px;
}

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

/* ---------- Services Grid ---------- */
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border-top: 4px solid var(--secondary);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(11,118,159,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

/* ---------- Stats Counter ---------- */
.stats-section {
  background: var(--primary);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.stat-item {
  text-align: center;
  color: var(--white);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-top: 5px;
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sectors Grid ---------- */
.sector-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 320px;
  cursor: pointer;
}

.sector-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.sector-card:hover img {
  transform: scale(1.08);
}

.sector-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,47,65,0.8) 0%, rgba(10,47,65,0.15) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  transition: all var(--transition);
}

.sector-card-overlay h3 {
  color: var(--white);
  margin-bottom: 5px;
}

.sector-card-overlay p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--secondary);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  width: 50%;
  padding: 0 40px;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-dot {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--secondary);
  border: 4px solid var(--primary);
  z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -10px;
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
}

.timeline-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .timeline::before { left: 20px; }

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    text-align: left;
    padding-left: 50px;
    padding-right: 0;
  }

  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 10px;
    right: auto;
  }
}

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-size: 4rem;
  color: var(--secondary);
  opacity: 0.2;
  position: absolute;
  top: 10px;
  right: 20px;
  line-height: 1;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
  color: var(--gray-dark);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.testimonial-role {
  color: var(--gray);
  font-size: 0.85rem;
}

/* ---------- Certifications ---------- */
.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

.cert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 15px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  padding: 10px 0;
  font-size: 1.05rem;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--secondary);
  transition: transform var(--transition);
}

.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
  color: var(--gray);
  font-size: 0.95rem;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 15px;
}

/* ---------- Project Filter ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 50px;
  background: var(--white);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  color: var(--gray-dark);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 280px;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover img {
  transform: scale(1.08);
}

.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 25px;
  background: linear-gradient(to top, rgba(10,47,65,0.95), transparent);
  color: var(--white);
  transform: translateY(60px);
  transition: transform var(--transition);
}

.project-card:hover .project-info {
  transform: translateY(0);
}

.project-info h3 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 5px;
}

.project-info p {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ---------- Contact Form ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--gray-dark);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition);
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11,118,159,0.1);
}

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

select.form-control {
  appearance: auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

/* ---------- Blog Cards ---------- */
.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card-body {
  padding: 20px;
}

.blog-card-meta {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 8px;
}

.blog-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.blog-card-body h3 a {
  color: var(--primary);
}

.blog-card-body h3 a:hover {
  color: var(--secondary);
}

.blog-card-body p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* ---------- Language Switcher ---------- */
[lang="es"] { display: block; }
[lang="en"] { display: none; }

html[lang="en"] [lang="en"] { display: block; }
html[lang="en"] [lang="es"] { display: none; }

/* ---------- Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.6s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.6s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.5s ease;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Float animation */
.float-anim {
  animation: float 3s ease-in-out infinite;
}

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

/* ---------- Utility ---------- */
.bg-primary { background: var(--primary); }
.bg-secondary { background: var(--secondary); }
.bg-accent { background: var(--accent); }
.bg-light { background: var(--light); }
.bg-white { background: var(--white); }
.bg-dark { background: var(--gray-dark); }

.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 15px; }
.gap-4 { gap: 20px; }
.flex-wrap { flex-wrap: wrap; }

/* ---------- Process Steps ---------- */
.step-list {
  counter-reset: step;
}

.step-item {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.step-number {
  counter-increment: step;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.step-content h4 {
  margin-bottom: 4px;
}

.step-content p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* ---------- Responsive Tables ---------- */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  font-family: var(--font-heading);
}

tr:nth-child(even) {
  background: rgba(0,0,0,0.02);
}

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.tag-secondary { background: rgba(233,113,50,0.15); color: var(--secondary); }
.tag-accent { background: rgba(11,118,159,0.15); color: var(--accent); }
.tag-primary { background: rgba(10,47,65,0.15); color: var(--primary); }

/* ---------- Norms/Specs ---------- */
.norm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.norm-item {
  background: rgba(11,118,159,0.08);
  border: 1px solid rgba(11,118,159,0.2);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ---------- What's App Button ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: all var(--transition);
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37,211,102,0.5);
  color: var(--white);
}

/* ---------- Page 404 ---------- */
.page-404 {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.page-404 h1 {
  font-size: 8rem;
  color: var(--secondary);
  line-height: 1;
}

/* ---------- Service Detail ---------- */
.service-detail-header {
  background: var(--primary);
  color: var(--white);
  padding: 40px 0;
}

.service-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

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

/* ---------- Eng blueprint pattern ---------- */
.blueprint-bg {
  background-image:
    linear-gradient(rgba(11,118,159,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,118,159,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ---------- Loading spinner ---------- */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(11,118,159,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Print ---------- */
@media print {
  .header, .footer, .whatsapp-float { display: none; }
  .hero-mini { min-height: auto; padding: 40px 0; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }
