/* --- Estilos autocad.html --- */
.autocad-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(211,47,47,0.32) 0%, rgba(0,118,214,0.82) 60%, rgba(255,255,255,0.12) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero > .container .autocad-hero-overlay { z-index: 1; }

.autocad-benefit-card {
  border-left: 6px solid #d32f2f;
  background: linear-gradient(90deg,#fff 80%,#f3f7fa 100%);
  transition: box-shadow 0.3s, transform 0.3s;
  position: relative;
}
.autocad-benefit-card:hover {
  box-shadow: 0 8px 24px rgba(211,47,47,0.12);
  transform: translateY(-4px) scale(1.03);
}

.autocad-type-card {
  border-top: 5px solid #0076d6;
  border-radius: 1rem;
  transition: box-shadow 0.3s, transform 0.3s;
  background: linear-gradient(120deg, #fff 80%, #e3f2fd 100%);
}
.autocad-type-card:hover {
  box-shadow: 0 10px 32px rgba(0,118,214,0.10);
  transform: translateY(-6px) scale(1.04);
}

/* Formulario moderno para autocad */
.contact-form .input-group-text {
  background: #f3f7fa;
  border: none;
  color: #0076d6;
  font-size: 1.1rem;
}
.contact-form .form-control, .contact-form .form-select {
  border-radius: 0.5rem;
  border: 1px solid #e0e7ef;
}
.contact-form .form-label {
  font-weight: 500;
  color: #1E2A4A;
}
.contact-form .btn-coral {
  font-size: 1.1rem;
  padding: 0.7rem 0;
}
.contact-form .btn-coral i { font-size: 1.1rem; }

/* Navbar y footer detalles para autocad */
.navbar .nav-link.active {
  color: #FF7F66 !important;
  font-weight: 600;
  border-bottom: 2px solid #FF7F66;
}
.navbar .nav-link {
  transition: color 0.2s, border-bottom 0.2s;
}
.navbar .nav-link:hover {
  color: #0076d6 !important;
}
.footer {
  background: linear-gradient(90deg,#1E2A4A 80%,#0076d6 100%);
}
body {
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

/* Color variables for light/dark mode */
:root {
  --bg: #ffffff;
  --text: #1e293b;
  --muted: #6b7280;
  --primary: #1E2A4A; /* navbar */
  --card-bg: #ffffff;
  --btn-coral: #FF7F66;
  --btn-coral-hover: #ff5733;
  --hero-overlay-start: rgba(30,42,74,0.72);
  --hero-overlay-end: rgba(30,42,74,0.82);
}

/* Dark theme overrides -> toggled by .dark on html */
html.dark {
  --bg: #0b1220;
  --text: #e6eef8;
  --muted: #a3b3c8;
  --primary: #0f1724;
  --card-bg: #0f1724;
  --btn-coral: #ff8f74;
  --btn-coral-hover: #ff6b47;
  --hero-overlay-start: rgba(3,7,18,0.65);
  --hero-overlay-end: rgba(3,7,18,0.8);
}

/* Smooth theme transitions */
html, body {
  transition: background-color 0.32s ease, color 0.32s ease;
}

.navbar {
  background-color: var(--primary) !important;
}

.hero {
  background-image: url('../img/fondo.jpg');
  background-position: center;
  background-size: cover;
  min-height: 100vh;
  padding-top: 5.5rem; /* offset para navbar fija */
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--hero-overlay-start, rgba(30,42,74,0.72)), var(--hero-overlay-end, rgba(30,42,74,0.82)));
  z-index: 0;
}
.hero > .container { position: relative; z-index: 2; }

.hero-logo {
  max-width: 150px;
}

.hero .lead {
  font-size: 1.125rem;
  max-width: 720px;
  margin: 0 auto;
}

.btn-coral {
  background-color: var(--btn-coral);
  color: white;
  transition: 0.3s;
}

.btn-coral:hover {
  background-color: var(--btn-coral-hover);
}

.text-coral {
  color: var(--btn-coral);
}

.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--card-bg);
  color: var(--text);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

/* Flip card styles */
.flip-card {
  perspective: 1200px;
  cursor: pointer;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s ease;
  transform-style: preserve-3d;
}
.flip-card-front, .flip-card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.flip-card-front { z-index: 2; }
.flip-card-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hover (desktop) */
.flip-card:hover .flip-card-inner,
.flip-card:focus .flip-card-inner,
.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

/* Make sure card content fits */
.flip-card .card { border: none; }

/* Improve readability on back */
.flip-card-back p { margin-bottom: 0.8rem; }

@media (max-width: 767px) {
  /* On narrow screens, avoid hover flipping; use tap (JS toggles class) */
  .flip-card:hover .flip-card-inner { transform: none; }
}

/* Services grid spacing and card sizing */
.services-grid .col-md-6 { padding: 1.25rem; }
.services-grid .flip-card { margin-bottom: 1.25rem; }
.flip-card { box-sizing: border-box; padding: 0.25rem; }
.flip-card { min-height: 260px; }
.flip-card .card { height: 100%; border-radius: 0.75rem; overflow: hidden; }
.flip-card .card-body { padding: 1rem; }
.flip-card .card-title { font-size: 1.05rem; margin-bottom: 0.35rem; }
.flip-card .card-text { font-size: 0.97rem; color: #374151; }
.service-list li { padding: 0.6rem 0; font-size: 1rem; }
.service-list { line-height: 1.6; }

/* Ensure cards don't touch each other: add gap and prevent overlap */
.services-grid .row { gap: 0.5rem 1rem; }
.services-grid [class*="col-"] { display: flex; }
.services-grid [class*="col-"] > .flip-card { flex: 1 1 auto; width: 100%; }

/* Larger gutters for bigger screens */
@media (min-width: 1200px) {
  .services-grid .row { gap: 1.5rem 1.5rem; }
  .services-grid [class*="col-"] { padding: 1.5rem; }
  .flip-card { min-height: 320px; }
}

/* Ensure proper wrapping: 3 per row on lg, 2 per row on sm, 1 on xs (Bootstrap classes already handle it) */
/* But enforce max-width none so custom CSS doesn't override Bootstrap sizing */
.services-grid [class*="col-"] { max-width: none; }

.contact-form {
  border-top: 4px solid var(--btn-coral);
}

.contact-card a {
  color: inherit;
}

.contact-card p a {
  color: var(--primary);
  font-weight: 600;
}

.service-list {
  list-style: none;
  padding: 0;
}
.service-list li::before {
  content: "\f00c"; /* FontAwesome check */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 0.6rem;
  color: var(--btn-coral);
}

/* Ajustes responsivos */
@media (max-width: 767px) {
  .hero { padding-top: 6rem; }
  .hero-logo { max-width: 120px; }
}

footer {
  background-color: var(--primary);
}

.social-icons a {
  color: white;
  margin: 0 10px;
  font-size: 1.5rem;
  transition: color 0.3s, transform 0.3s;
}

.social-icons a:hover {
  color: #FF7F66;
  transform: scale(1.2);
}

/* Reveal animation helper */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

.stat h3 { margin: 0; }

/* Testimonios */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 1rem;
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.testimonial-quote-icon {
  bottom: 1rem;
  right: 1rem;
}

.testimonial-card blockquote p {
  position: relative;
  font-size: 1rem;
  line-height: 1.6;
}

.testimonial-card .blockquote-footer {
  font-size: 0.9rem;
}

/* Proyectos carousel */
#carouselProyectos .carousel-inner img {
  max-height: 420px;
  object-fit: cover;
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background-color: #25D366;
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  z-index: 1050;
}
.whatsapp-float i { font-size: 1.4rem; }

/* Theme floating button (above WhatsApp) */
.theme-float {
  position: fixed;
  right: 18px;
  bottom: 86px; /* above whatsapp */
  background-color: var(--card-bg);
  color: var(--text);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 1060;
  border: none;
}
.theme-float i { font-size: 1.15rem; }
.theme-float:hover { transform: translateY(-4px); }

/* Small decorative badges */
.badge-trust {
  background: linear-gradient(90deg,#FF7F66,#FFB199);
  color: white;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
}

/* Ajustes de accesibilidad: focus */
a:focus, button:focus, .btn:focus { outline: 3px solid rgba(255,127,102,0.25); outline-offset: 2px; }

/* Visible social icons inside contact card */
.social-icons-visible { gap: 12px; }
.social-icons-visible .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f2f2f2;
  color: #1E2A4A;
  font-size: 1.25rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform 0.18s ease, background 0.18s ease;
}
.social-icons-visible .social-link:hover {
  transform: translateY(-4px);
  background: linear-gradient(90deg,#FF7F66,#FFB199);
  color: white;
}

/* Footer social icons larger and with background */
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  font-size: 1.1rem;
}
.social-icons a:hover {
  background: linear-gradient(90deg,#FF7F66,#FFB199);
  color: white;
  transform: scale(1.08);
}

/* Branded social buttons (contact card) */
.social-link { position: relative; }
.social-link::after {
  content: attr(data-label);
  position: absolute;
  bottom: -34px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  white-space: nowrap;
}
.social-link:hover::after, .social-link:focus::after { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* platform colors */
.social-youtube { background: linear-gradient(180deg,#FF4E42 0%, #E52020 100%); color: white; }
.social-facebook { background: linear-gradient(180deg,#3b5998 0%, #2d4373 100%); color: white; }
.social-instagram { background: radial-gradient(circle at 30% 30%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: white; }
.social-tiktok { background: linear-gradient(180deg,#010101 0%, #161616 100%); color: white; }

.social-link:hover { transform: translateY(-6px) scale(1.03); box-shadow: 0 10px 24px rgba(0,0,0,0.18); }

/* footer-specific overrides (slightly smaller, subtle background) */
.social-link-footer { width: 48px; height: 48px; display:inline-flex; align-items:center; justify-content:center; border-radius: 50%; margin: 0 6px; color: white; }
.social-link-footer.social-youtube { background: #ff0000; }
.social-link-footer.social-facebook { background: #3b5998; }
.social-link-footer.social-instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-link-footer.social-tiktok { background: linear-gradient(180deg,#25F4EE,#25F4EE 45%, #FE2C55 45%); color: #0a0a0a; }
.social-link-footer::after { display: none; }

/* subtle pulse on WhatsApp button to attract attention */
.whatsapp-float { animation: pulse 4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 6px 18px rgba(37,211,102,0.22); }
  50% { box-shadow: 0 18px 36px rgba(37,211,102,0.14); transform: translateY(-2px); }
  100% { box-shadow: 0 6px 18px rgba(37,211,102,0.22); transform: none; }
}
