@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #050508;
}

/* ===== HERO SECTION (tamaño original) ===== */
.hero-section {
    position: relative;
    width: 100%;
    padding: 8rem 2rem 5.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-section .bg-base {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 18% 55%, rgba(16, 185, 129, 0.14) 0%, transparent 50%),
        radial-gradient(ellipse at 82% 20%, rgba(16, 185, 129, 0.07) 0%, transparent 42%),
        linear-gradient(135deg, #0a0f1a 0%, #0c1221 50%, #0a0f1a 100%);
    z-index: 0;
    animation: gradientShift 20s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.hero-section .grid-3d {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.055) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-2px) translateX(2px); }
    100% { transform: translateY(0) translateX(0); }
}

.hero-section .laser-scan {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(16, 185, 129, 0.45) 50%, transparent 100%);
    z-index: 2;
    animation: scanPulse 3s ease-in-out infinite;
}

@keyframes scanPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-spotlight {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    transition: background 0.15s ease;
}

.hero-section .container {
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* ===== NUEVO LAYOUT: LOGO + CONTENIDO ===== */
.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== LOGO / MARCA ===== */
.hero-logo {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo-placeholder {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(16, 185, 129, 0.25);
    transition: all 0.3s ease;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.1);
}

.logo-placeholder i {
    font-size: 5rem;
    color: #10b981;
}

.logo-placeholder img {
    width: 80%;
    height: auto;
    display: block;
}

.logo-text {
    margin-top: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ===== CONTENIDO TEXTUAL (lado derecho) ===== */
.hero-content {
    flex: 1;
    text-align: left;
    max-width: 600px;
}

.hero-content .hero-badge {
    margin-bottom: 1.2rem;
}

.hero-content h1 {
    font-size: 3.8rem;
    margin-bottom: 0.4rem;
}

.hero-content .hero-title-secondary {
    font-size: 1.3rem;
    margin: 0.4rem 0 1.2rem;
}

.hero-content .hero-subtitle {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
}

.hero-content .title-underline {
    margin: 1.2rem 0 0 0;
}

/* Badge original (se mantiene) */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.32);
    color: #5eead4;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    padding: 0.38rem 1.1rem;
    border-radius: 50px;
}

.hero-badge span {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 7px rgba(16, 185, 129, 0.9);
    flex-shrink: 0;
}

/* Títulos */
.hero-content h1 {
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-content h1 span {
    color: #10b981;
}

.hero-title-secondary {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
}

.hero-title-secondary span {
    color: #34d399;
    font-weight: 600;
}

.hero-subtitle {
    display: inline-block;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    border: 1px solid rgba(16, 185, 129, 0.22);
    background: rgba(16, 185, 129, 0.05);
    transition: all 0.3s ease;
}

.hero-subtitle:hover {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.09);
}

.hero-section p {
    font-size: 0.98rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    letter-spacing: 0.01em;
}

.title-underline {
    width: 55px;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 3px;
}

/* ===== ANIMACIONES DE ENTRADA ===== */
.animate-item {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-logo.animate-item {
    animation-delay: 0.1s;
}
.hero-badge.animate-item {
    animation-delay: 0.2s;
}
h1.animate-item {
    animation-delay: 0.3s;
}
.hero-title-secondary.animate-item {
    animation-delay: 0.5s;
}
.hero-subtitle.animate-item {
    animation-delay: 0.7s;
}
.title-underline.animate-item {
    animation-delay: 0.9s;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== SECCIÓN DE SERVICIOS ===== */
.services-showcase {
    padding: 5rem 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #1a202c;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #10b981;
    border-radius: 2px;
}

.section-header p { color: #64748b; font-size: 1.1rem; }

/* ===== FLIP CARDS CON ICONOS ===== */
.box-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.box-item {
    width: 280px;
    perspective: 1000px;
    animation: fadeInUp 0.8s ease-out both;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: float 4s ease-in-out infinite;
    will-change: transform;
}

.box-item:nth-child(1) { animation-delay: 0.05s; }
.box-item:nth-child(2) { animation-delay: 0.15s; }
.box-item:nth-child(3) { animation-delay: 0.25s; }
.box-item:nth-child(4) { animation-delay: 0.35s; }
.box-item:nth-child(5) { animation-delay: 0.45s; }
.box-item:nth-child(6) { animation-delay: 0.55s; }
.box-item:nth-child(7) { animation-delay: 0.65s; }

.box-item:has(.flip-box.flipped) {
    animation-play-state: paused;
}

.box-item:not(:has(.flip-box.flipped)):hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
}

.flip-box {
    position: relative;
    width: 100%;
    height: 380px;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.flip-box.flipped {
    transform: rotateY(180deg);
}

.flip-box.flipped .flip-box-front {
    pointer-events: none;
}

.flip-box.flipped .flip-box-back,
.flip-box.flipped .flip-box-back * {
    pointer-events: auto;
}

.flip-box-front,
.flip-box-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.flip-box-front {
    background: linear-gradient(135deg, #0a0f1a, #1a2634);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.flip-box-back {
    background: linear-gradient(135deg, #0d1a2b, #1a2a3a);
    border: 1px solid rgba(16, 185, 129, 0.25);
    transform: rotateY(180deg);
}

.flip-box .inner {
    padding: 1.2rem 0.8rem;
    width: 100%;
    z-index: 2;
    position: relative;
}

.flip-box .inner i {
    display: block;
    font-size: 3.5rem;
    color: #10b981;
    margin-bottom: 0.8rem;
    transition: transform 0.3s ease;
}

.flip-box:hover .inner i {
    transform: scale(1.1) rotate(4deg);
}

.flip-box-header {
    font-size: 1.2rem;
    line-height: 1.3;
    word-break: break-word;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #ffffff;
}

.flip-box-back .inner p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.flip-box p {
    font-size: 0.9rem;
    margin: 0.5rem 0;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
}

.flip-box-button {
    display: inline-block;
    background: #10b981;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.flip-box-button:hover {
    background: #059669;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.5);
}

.color-white { color: white; }

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-wrapper {
        gap: 1.5rem;
    }
    .logo-placeholder {
        width: 140px;
        height: 140px;
    }
    .logo-placeholder i {
        font-size: 4rem;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content .hero-title-secondary {
        font-size: 1.15rem;
    }
    .box-container { gap: 1.5rem; }
    .box-item { width: 260px; }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 6rem 1.5rem 3.5rem;
    }
    .hero-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .hero-logo {
        flex: 0 0 auto;
        margin-bottom: 0.5rem;
    }
    .logo-placeholder {
        width: 120px;
        height: 120px;
    }
    .logo-placeholder i {
        font-size: 3.5rem;
    }
    .logo-text {
        font-size: 1rem;
    }
    .hero-content {
        text-align: center;
        max-width: 100%;
    }
    .hero-content h1 {
        font-size: 2.4rem;
    }
    .hero-content .hero-title-secondary {
        font-size: 1.1rem;
        margin: 0.2rem 0 0.8rem;
    }
    .hero-content .hero-subtitle {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
    .hero-content .title-underline {
        margin: 1rem auto 0;
    }
    .hero-content .hero-badge {
        font-size: 0.7rem;
        padding: 0.3rem 1rem;
    }
    .hero-section .grid-3d { background-size: 40px 40px; }
    .services-showcase { padding: 3rem 1rem; }
    .section-header h2 { font-size: 1.7rem; }
    .box-item { width: 100%; max-width: 340px; }
    .flip-box { height: 340px; }
    .flip-box-header { font-size: 1rem; }
    .flip-box .inner i { font-size: 3rem; }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 5rem 1rem 3rem;
    }
    .logo-placeholder {
        width: 90px;
        height: 90px;
    }
    .logo-placeholder i {
        font-size: 2.8rem;
    }
    .logo-text {
        font-size: 0.85rem;
    }
    .hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    .hero-content .hero-title-secondary {
        font-size: 0.95rem;
        margin: 0.3rem 0 0.8rem;
    }
    .hero-content p {
        font-size: 0.82rem;
    }
    .hero-content .hero-subtitle {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    .hero-content .hero-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.9rem;
    }
    .hero-content .title-underline {
        width: 45px;
        margin: 1rem auto 0;
    }
    .services-showcase { padding: 2.5rem 0.75rem; }
    .section-header h2 { font-size: 1.5rem; }
    .flip-box { height: 300px; }
    .flip-box-header { font-size: 0.95rem; }
    .flip-box .inner i { font-size: 2.8rem; }
    .box-item { max-width: 100%; }
}

@media (max-width: 360px) {
    .hero-section h1 { font-size: 1.45rem; }
    .hero-title-secondary { font-size: 0.9rem; }
    .hero-section p { font-size: 0.75rem; }
}