*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    background-color: #0e1417;
    color: #dee3e8;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
}

.hero-gradient-mesh {
    background-color: #0e1417;
    background-image:
        radial-gradient(at 0% 0%, hsla(197, 100%, 72%, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, hsla(81, 64%, 56%, 0.1) 0px, transparent 50%);
}

.cases-section {
    background:
        linear-gradient(180deg, rgba(14, 20, 23, 0.96) 0%, rgba(11, 17, 20, 1) 16%, rgba(9, 15, 18, 1) 100%),
        radial-gradient(circle at top center, rgba(113, 210, 255, 0.06) 0%, transparent 46%),
        radial-gradient(circle at bottom right, rgba(164, 214, 76, 0.04) 0%, transparent 28%);
}

.cases-section::before {
    content: '';
    position: absolute;
    inset: -1px 0 0 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(9, 15, 18, 0) 0%, rgba(9, 15, 18, 0.35) 18%, rgba(14, 20, 23, 0.65) 55%, rgba(14, 20, 23, 0) 100%),
        radial-gradient(circle at 50% 0%, rgba(164, 214, 76, 0.08) 0%, transparent 28%);
    opacity: 1;
}

.cases-section > * {
    position: relative;
    z-index: 1;
}

.glass-card {
    background: rgba(27, 32, 36, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(113, 210, 255, 0.15);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.glass-card:hover {
    border-color: #a4d64c;
    background: rgba(27, 32, 36, 0.6);
    box-shadow: 0 0 24px rgba(164, 214, 76, 0.08);
    transform: translateY(-3px);
}

.nav-link {
    position: relative;
    transition: color 0.24s ease, transform 0.24s ease, opacity 0.24s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.45rem;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #a4d64c 0%, #71d2ff 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.24s ease;
    opacity: 0.95;
}

.nav-link.is-active {
    color: #71d2ff;
    transform: translateY(-1px);
}

.nav-link.is-active::after {
    transform: scaleX(1);
}

.nav-link-mobile.is-active {
    color: #71d2ff;
    background: rgba(113, 210, 255, 0.08);
}

#mobile-menu {
    max-height: calc(100vh - 4.5rem);
    overflow-y: auto;
}

.field-invalid,
.field-invalid:focus {
    border-color: #ffb4ab !important;
    box-shadow: 0 0 0 3px rgba(255, 180, 171, 0.15);
}

.select-shell.field-invalid .custom-select-trigger {
    border-color: #ffb4ab;
    box-shadow: 0 0 0 3px rgba(255, 180, 171, 0.15);
}

.select-shell {
    position: relative;
}

.custom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(27, 32, 36, 0.92) 0%, rgba(22, 26, 30, 0.98) 100%);
    border: 1px solid rgba(113, 210, 255, 0.28);
    border-radius: 1rem;
    color: #dee3e8;
    padding: 1rem 1.25rem;
    outline: none;
    transition: border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, transform 0.24s ease;
    text-align: left;
}

.custom-select-trigger:hover {
    border-color: rgba(164, 214, 76, 0.45);
}

.custom-select-trigger:focus,
.custom-select-trigger.is-open {
    border-color: #71d2ff;
    box-shadow: 0 0 0 3px rgba(113, 210, 255, 0.14);
}

.custom-select-value {
    font-size: 1rem;
    line-height: 1.25rem;
}

.custom-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 30;
    display: none;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(113, 210, 255, 0.22);
    background: rgba(15, 20, 24, 0.98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.select-shell.is-open .custom-select-menu {
    display: block;
}

.select-shell.is-open .select-icon {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-option {
    width: 100%;
    text-align: left;
    padding: 0.9rem 1.1rem;
    color: #dee3e8;
    background: transparent;
    border: 0;
    outline: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.custom-select-option:hover,
.custom-select-option.is-active {
    background: rgba(113, 210, 255, 0.12);
    color: #ffffff;
}

.custom-select-option.is-placeholder {
    color: #94a3b8;
    border-bottom: 1px solid rgba(113, 210, 255, 0.12);
}

.select-icon {
    pointer-events: none;
    color: #71d2ff;
    font-size: 1.25rem;
    transition: transform 0.24s ease;
}

.hero-glow {
    background: radial-gradient(circle at center, rgba(113, 210, 255, 0.2) 0%, transparent 70%);
}

.text-gradient {
    background: linear-gradient(135deg, #71d2ff 0%, #a4d64c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #a4d64c;
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #a4d64c;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.logo-glow {
    filter: drop-shadow(0 0 15px rgba(113, 210, 255, 0.4));
}

.floating-element {
    animation: floating 6s ease-in-out infinite;
}

#threejs-container-ANIMATION_16 canvas {
    display: block;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes floating {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@media (max-width: 639px) {
    .glass-card:hover {
        transform: none;
    }

    .custom-select-trigger,
    #formulario-contacto input,
    #formulario-contacto textarea {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .swal2-popup {
        width: calc(100% - 2rem) !important;
        margin: 0 1rem !important;
        font-size: 0.95rem !important;
    }
}
