/* Hero Section Mejorado */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Usa dvh para móviles */
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    animation: kenburns 30s ease-in-out infinite alternate;
}

@keyframes kenburns {
    0% {
        transform: scale(1) translateX(0);
    }

    50% {
        transform: scale(1.1) translateX(-2%);
    }

    100% {
        transform: scale(1.05) translateX(2%);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(8, 145, 178, 0.2) 0%,
            rgba(14, 116, 144, 0.3) 50%,
            rgba(12, 74, 110, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    color: var(--white);
    max-width: 1100px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 7vw, 5rem);
    font-weight: 900;
    margin-bottom: 1.8rem;
    line-height: 1.1;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    letter-spacing: -0.04em;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: #fff;
    background-clip: text;
    position: relative;
}

.hero-content h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: linear-gradient(90deg, transparent, #06b6d4, transparent);
    border-radius: 10px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        opacity: 0.5;
        box-shadow: 0 0 10px #06b6d4;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 25px #06b6d4;
    }
}

.hero-content p {
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    margin-bottom: 2.5rem;
    margin-top: 1.5rem;
    line-height: 1.85;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
    opacity: 0.98;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.4);
    padding: 0 1rem;
    color: #fcfcfc;
}

.cta-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1.35rem 2.8rem;
    text-decoration: none;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 1.08rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: var(--transition-smooth);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    color: var(--primary-dark);
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.4);
}

.btn i {
    transition: var(--transition-smooth);
}

.btn:hover i {
    transform: translateX(5px);
}

#nosotros,
#trabajos {
    padding: 4rem 1rem 2rem;
    max-width: 1500px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 650;
    color: #347bc1;
    text-align: center;
    padding: 0;
    margin: 0 0 1.1rem;
}

/* Alternativa con JavaScript para mejor compatibilidad */
@media (max-width: 768px) {
    .hero {
        height: calc(var(--vh, 1vh) * 100);
        min-height: calc(var(--vh, 1vh) * 100);
    }
}