/* ---------------------------- RESET BÁSICO ---------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  line-height: 1.5;
  color: #fff;
  background: linear-gradient(270deg, #14a895, #135ac4, #14a895);
  background-size: 600% 600%;
  animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------------------------- HEADER ---------------------------- */
.header-SuperColor {
  background: linear-gradient(135deg, #14a895, #135ac4);
  color: white;
  padding: 20px 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.branding {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.logo-principe {
  max-height: 180px;
  width: auto;
  margin: 0;
}

.logo-anios {
  max-height: 90px;
  width: auto;
  margin: 0;
}

.logo-anios:hover {
  filter: drop-shadow(0 0 8px #FFD700) brightness(1.2);
}

@media (max-width: 768px) {
  .branding {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .logo-principe { max-height: 140px; }
  .logo-anios { max-height: 70px; }
}

/* ---------------------------- INTRO ---------------------------- */
.intro {
  background: linear-gradient(135deg, #14a895, #135ac4);
  color: #fff;
  text-align: center;
  padding: 60px 20px;
  border-bottom: 6px solid #ffd600;
  border-radius: 0 0 15px 15px;
}

.intro .tagline {
  font-size: 38px;
  font-style: italic;
  margin-bottom: 25px;
  line-height: 1.4;
  color: #fff;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

.intro .subline {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  font-style: italic;
  color: #ffd600;
}

.intro h1 {
  font-size: 2.2rem;
  margin-top: 20px;
  color: #f0f0f0;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.4);
}

/* ---------------------------- MENÚ ---------------------------- */
.nav .menu {
  list-style: none;
  display: flex;
  gap: 32px;
  padding: 16px;
  background: transparent;
  animation: fadeInDown 1s ease-in-out both;
}

.nav .menu li { position: relative; }

.nav .menu a {
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  display: inline-block;
  border-radius: 10px;
  transition: background 0.3s ease, transform 0.3s ease;
  font-weight: 500;
}

.nav .menu a:hover {
  background: #fca311;
  color: #000;
  transform: translateY(-2px);
}

/* Submenu */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #203a43;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 999;
}

.dropdown:hover .submenu {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  padding: 10px 0;
}

.submenu li a {
  padding: 10px 20px;
  color: #fff;
  transition: background 0.3s ease;
}

.submenu li a:hover {
  background: #fca311;
  color: #000;
}

/* ---------------------------- MAIN CONTENT ---------------------------- */
.main-content {
  padding: 40px 32px;
  background: linear-gradient(135deg, #14a895, #135ac4);
  color: #fff;
  text-align: center;
  border-bottom: 6px solid #ffd600; 
}

/* ---------------------------- SERVICIOS ---------------------------- */
.servicios {
  padding: 60px 20px;
  background: linear-gradient(135deg, #12a9bd, #0c28ca);
  color: #fff;
  text-align: center;
}

.servicios h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #ffd600;
  animation: fadeIn 1s ease, bounceIn 1.2s;
}

.servicio-columnas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.servicio-col {
  flex: 1 1 250px;
  max-width: 300px;
  min-height: 220px;
  padding: 25px 20px;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.25);
  color: #fff;
  text-align: left;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.servicio-col:hover {
  transform: translateY(-5px) rotate3d(1, 1, 0, 6deg);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.servicio-col h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  border-bottom: 2px solid #ffd600;
  padding-bottom: 5px;
}

.servicio-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.servicio-col li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.servicio-col li:hover::before {
  transform: translateY(-4px) scale(1.2);
}

.servicio1 { background-image: url('img/fondo1.jpg'); }
.servicio2 { background-image: url('img/fondo2.jpg'); }
.servicio3 { background-image: url('img/fondo3.jpg'); }

/* ---------------------------- CARRUSEL 3D ---------------------------- */
.imagen-servicio {
  position: relative;
  perspective: 1200px;
  height: 280px;
  width: 100%;
  max-width: 450px;
  margin: auto;
}

.imagen-servicio.carrusel-3d img {
  position: absolute;
  width: 100%;
  height: 280px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  top: 0;
  left: 0;
  object-fit: cover;
  backface-visibility: hidden;
  opacity: 0;
  transform-style: preserve-3d;
  animation: rotarImagen 9s ease-in-out infinite;
  transition: box-shadow 0.3s ease;
}

.imagen-servicio.carrusel-3d img:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.imagen-servicio.carrusel-3d img:nth-child(1) { animation-delay: 0s; }
.imagen-servicio.carrusel-3d img:nth-child(2) { animation-delay: 3s; }
.imagen-servicio.carrusel-3d img:nth-child(3) { animation-delay: 6s; }

@keyframes rotarImagen {
  0%{opacity:0; transform:rotateY(90deg);}
  10%,30%{opacity:1; transform:rotateY(0deg);}
  40%,100%{opacity:0; transform:rotateY(-90deg);}
}

/* ---------------------------- PRELOADER ---------------------------- */
#preloader {
  position: fixed; inset:0;
  background-color:#162a56;
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:9999;
  transition:opacity 0.4s ease;
}

.spinner {
  width:60px;
  height:60px;
  border:6px solid #ffd600;
  border-top:6px solid transparent;
  border-radius:50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to{ transform: rotate(360deg); } }

/* ---------------------------- ANIMACIONES ---------------------------- */
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeInDown { from { opacity:0; transform: translateY(-20px); } to { opacity:1; transform:translateY(0); } }
@keyframes bounceIn { 0%{transform:scale(0.8);opacity:0;} 60%{transform:scale(1.1);opacity:1;} 100%{transform:scale(1);} }

/* ---------------------------- BOTONES ---------------------------- */
.btn-cotizar, .btn-wsp {
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
  padding: 10px 20px;
  display: inline-block;
  margin-right: 10px;
  color: white;
  border: none;
  font-size: 17px;
  user-select: none;
  box-shadow: 0 0 10px #ffd600;
  transition: background-color 0.3s ease, transform 0.2s;
}

.btn-cotizar { background-color: #a52f2f; }
.btn-cotizar:hover { background-color: #7a2222; }

.btn-wsp { background-color: #14af26; text-decoration: none; }
.btn-wsp:hover { background-color: #0f7f1a; }

/* ---------------------------- FOOTER ---------------------------- */
.footer {
  background-color: #2895ce;
  padding: 40px 20px;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
  animation: fadeIn 1.2s ease;
}

/* ---------------------------- DARK MODE ---------------------------- */
@media (prefers-color-scheme: dark) {
  body { background:#181a1b; color:#f1f1f1; }
  .header-SuperColor, .footer { background:#232526; color:#f1f1f1; }
  h1,h2,h3,p,a { color:#ffd600; }
  .btn-wsp, .btn-cotizar { background:#333; color:#ffd600; }
  .btn-wsp:hover, .btn-cotizar:hover { color:#232526; }
}
