:root {
    --bg-color: #02040a;
    --card-bg: #040817;
    --tech-glow: radial-gradient(circle at 50% 50%, rgba(0, 162, 255, 0.3) 0%, transparent 70%),
                 radial-gradient(circle at 80% 20%, rgba(0, 85, 255, 0.2) 0%, transparent 50%);
    --accent-blue: #00d2ff;
    --accent-yellow: #ffcc00;
    --text-main: #ffffff;
    --text-muted: #c0c0e0;
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    color-scheme: dark; /* Signals browser to use dark UI elements */
}

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

html {
    background-color: #02040a !important;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed; /* Prevents bounce */
}

body {
    background-color: #02040a;
    background: linear-gradient(180deg, #02040a 0%, #02040a 100%); /* Solid gradient for bars */
    color: var(--text-main);
    font-family: var(--font-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    width: 100vw;
    margin: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overscroll-behavior: none;
    touch-action: pan-y;
}

.container {
    perspective: 2000px;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    z-index: 2;
}

.card {
    width: 95vw;
    height: 85vh;
    max-width: 500px;
    max-height: 820px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    background: rgba(2, 4, 10, 0.75);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5) inset;
}

/* Shimmer Effect */
.card-face::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 55%
    );
    animation: shimmer 6s infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%); }
    100% { transform: translateX(100%) translateY(100%); }
}

/* CARA FRONTAL */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    border-radius: 20px;
}

.card-front {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(2, 4, 10, 0.95));
    z-index: 2;
    transform: translateZ(5px);
}

.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    margin-bottom: 20px;
}

.logo {
    width: 350px; /* Massive Logo! */
    height: 350px;
    max-width: 85vw;
    max-height: 40vh;
    object-fit: contain;
    filter: drop-shadow(0 0 30px var(--accent-blue));
    animation: pulseLogo 4s infinite alternate ease-in-out;
}

@keyframes pulseLogo {
    0% { transform: scale(1); filter: drop-shadow(0 0 20px var(--accent-blue)); }
    100% { transform: scale(1.05); filter: drop-shadow(0 0 50px var(--accent-blue)); }
}

/* CARA TRASERA */
.card-back {
    background: linear-gradient(135deg, rgba(2, 4, 10, 0.95), rgba(0, 210, 255, 0.15));
    transform: rotateY(180deg);
    padding: 25px;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.logo-back {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 0 10px var(--accent-blue));
    opacity: 0.8;
}

.header {
    width: 100%;
    margin-bottom: 5px;
}

.header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.underline {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-yellow));
    margin-top: 5px;
}

.services-grid-new {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.service-item-new {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 22px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.service-item-new:hover {
    background: rgba(0, 210, 255, 0.12);
    border-color: var(--accent-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.15);
}

.service-item-new .icon-wrap {
    color: var(--accent-blue);
    filter: drop-shadow(0 0 8px var(--accent-blue));
}

.service-item-new h3 {
    font-size: 0.8rem;
    color: #fff;
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(2, 4, 10, 0.98);
    backdrop-filter: blur(30px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

#welcome-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.welcome-content {
    animation: fadeIn 1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    gap: 0; /* More compact */
}

.welcome-logo {
    width: 380px !important; /* Slightly smaller than 450px for better fit */
    height: 380px !important;
    margin-bottom: -10px !important; /* Move elements closer */
    max-width: 85vw;
    object-fit: contain;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.footer {
    width: 100%;
    display: flex;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.share-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.65rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}

.share-btn:hover {
    background: var(--accent-blue);
    color: #000;
    border-color: var(--accent-blue);
    transform: scale(1.02);
}

.card:hover {
    box-shadow: 0 40px 100px rgba(0, 210, 255, 0.2);
}

/* Flip Hint Style */
.flip-hint {
    position: absolute;
    bottom: 40px;
    width: 100%;
    left: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
    animation: fadeInOut 2.5s infinite ease-in-out;
    pointer-events: none;
    z-index: 20;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.1; transform: translateY(0); }
    50% { opacity: 0.5; transform: translateY(-3px); }
}

/* Social Icon Buttons */
.social-icon-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-icon-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.social-icon-btn:hover {
    transform: translateY(-5px) scale(1.1);
    background: rgba(255, 255, 255, 0.15);
}

.social-icon-btn:hover svg {
    transform: scale(1.1);
}

.social-icon-btn.whatsapp:hover {
    border-color: #25d366;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
    color: #25d366;
}

.social-icon-btn.facebook:hover {
    border-color: #1877f2;
    box-shadow: 0 0 20px rgba(24, 119, 242, 0.4);
    color: #1877f2;
}

.social-icon-btn.web:hover {
    border-color: #00f3ff;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    color: #00f3ff;
}

.social-icon-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon-btn:hover::after {
    opacity: 1;
}
