.inicioH {
    position: relative;
    width: 100%;
    height: 100vh; /* Altura completa del viewport */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Hace que la imagen cubra el área del contenedor */
    z-index: 1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 102, 0.7); /* Azul con 70% de opacidad */
    z-index: 2; /* Capa encima de la imagen */
}

.inicioH .hero-content {
    position: relative;
    text-align: center;
    color: #fff;
    z-index: 3; /* Asegura que el contenido esté encima de la superposición */
}

.inicioH h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.inicioH p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.inicioH .btn {
   display: inline-block;
    background: #ffd700;
    color: #003366;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.inicioH .btn:hover {
    background-color: #0099cc;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #ffffff;
    color: #333;
    overflow-x: hidden;
}

.blue-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 102, 0.7); /* Azul corporativo con 70% opacidad */
    z-index: 2;
}

/* Header */
header {
    background: linear-gradient(135deg, #2997c3, #003366);
    color: white;
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.logo-container {
    display: flex;
    align-items: center;
}

.logo-3d {
    width: 220px;
    height: 70px;
    margin-right: 15px;
    transition: transform 0.5s ease;
}

.logo-3d:hover {
    transform: rotateY(180deg);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

nav ul li a:hover {
    color: #ffd700;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #ffd700;
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 80px;
    overflow: hidden;
}

.hero-content {
    z-index: 10;
    max-width: 800px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn {
    display: inline-block;
    background: #ffd700;
    color: #003366;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: #003366;
    color: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.services {
    position: relative; /* Muy importante para que el canvas se coloque relativo a esta sección */
    padding: 5rem 2rem;
    background-color: transparent; /* o elimina si prefieres */
    z-index: 2;
    overflow: hidden; /* Evita que el canvas se salga */
}

#canvas3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Por debajo de las tarjetas */
    pointer-events: none; /* Importante si no quieres que interfiera con clics */
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #003366;
    font-size: 2.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    perspective: 1000px;
    height: 400px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front, .service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-card-front {
    background: linear-gradient(135deg, #2997c3, #003366);
    color: white;
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #ffd700;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.service-card-back {
    background: white;
    color: #333;
    transform: rotateY(180deg);
    border: 2px solid #003366;
}

.service-card-back ul {
    list-style: none;
    margin-top: 1rem;
}

.service-card-back ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-card-back ul li::before {
    content: '⚡';
    position: absolute;
    left: 0;
}

/* 3D Electrical Scene */
.electrical-scene {
    height: 500px;
    position: relative;
    background: #f0f0f0;
    margin: 5rem 0;
}

#electricalCanvas {
    width: 100%;
    height: 100%;
}

.scene-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    border-radius: 5px;
    max-width: 400px;
    z-index: 10;
}

/* Footer */


footer {
    background: #2997c3;
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: left;
}
nav ul ul {
    display: none;
    position: absolute;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 0;
    margin: 0;
    top: 100%; /* para que aparezca justo debajo del elemento padre */
    left: 0;
    z-index: 999;
}
  
nav ul li:hover > ul {
    display: block;
}
  
nav ul ul li {
    width: 200px;
    padding: 10px;
}
  

.footer-column h3 {
    margin-bottom: 1.5rem;
    color: #ffd700;
}

.footer-column ul {
    list-style: none;
}

nav ul ul li a {
    color: #003366;
    text-decoration: none;
    display: block;
    padding: 0.5rem 1rem;
  }
  
nav ul ul li a:hover {
    background-color: #f0f0f0;
  }
  

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #ffd700;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #ffd700;
}

.copyright {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }

    nav ul {
        margin-top: 1rem;
    }

    nav ul li {
        margin-left: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .service-card {
        height: 350px;
    }
}

.image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #003366;
  }
  
  .image-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: fadeImages 16s infinite;
  }
  
  .image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
  }
  
  /* Animaciones escalonadas para cada imagen */
  .image-item:nth-child(1) {
    animation-delay: 0s;
  }
  .image-item:nth-child(2) {
    animation-delay: 4s;
  }
  .image-item:nth-child(3) {
    animation-delay: 8s;
  }
  .image-item:nth-child(4) {
    animation-delay: 12s;
  }
  
  /* Keyframes para mostrar una imagen a la vez */
  @keyframes fadeImages {
    0% { opacity: 0; }
    5% { opacity: 1; }
    25% { opacity: 1; }
    30% { opacity: 0; }
    100% { opacity: 0; }
  }
  