/* --- Contenedor Principal --- */
.main-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Bloque: Fondo Decorativo --- */
.page-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #000;
}

.page-background__grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(79, 79, 79, 0.18) 1px, transparent 1px), 
        linear-gradient(to bottom, rgba(79, 79, 79, 0.18) 1px, transparent 1px);
    background-size: 14px 24px;
}

.page-background__glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    height: 1000px;
    width: 1000px;
    border-radius: 50%;
    background-image: radial-gradient(circle 400px at 50% 300px, rgba(251, 251, 251, 0.21), var(--color-background));
}


/* --- Bloque: Encabezado --- */
.header {
    position: absolute;
    top: 2rem;
}

.header__title {
    font-size: 1.5rem;
    /* font-size: 0.1rem; */
    font-weight: 700;
    letter-spacing: 0.05em;
    /* color: var(--color-text-header); */
    color: transparent;
    text-align: center;
}

.header__logo {
    width: 300px;
    height: auto;
    margin-bottom: 1rem;
}


/* --- Bloque: Burbujas de Servicio --- */
.service-bubble {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab; /* Cambiado para indicar que se puede arrastrar */
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 1.5rem;
    text-align: center;
}

.service-bubble__gradient {
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #1a1a2e);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    inset: 0;
    z-index: 0;
    filter: brightness(0.6);
}

.service-bubble__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.service-bubble__title {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    position: absolute;
}

.service-bubble__description {
    position: absolute;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    transition-delay: 0.1s;
}

.service-bubble:hover .service-bubble__gradient,
.service-bubble--active .service-bubble__gradient {
    opacity: 1;
}

.service-bubble:hover .service-bubble__title,
.service-bubble--active .service-bubble__title {
    opacity: 0;
    transform: translateY(-20px);
}

.service-bubble:hover .service-bubble__description,
.service-bubble--active .service-bubble__description {
    opacity: 1;
    transform: translateY(0);
}


/* Modificadores de Burbuja */
.service-bubble--marketing {
    width: 200px; height: 200px;
    top: 15%; left: 20%;
    border-radius: 41% 59% 61% 39% / 53% 44% 56% 47%;
    animation: float 10s ease-in-out infinite;
}

.service-bubble--video {
    width: 250px; height: 250px;
    top: 50%; right: 15%;
    border-radius: 61% 39% 41% 59% / 43% 54% 46% 57%;
    animation: float 12s ease-in-out infinite reverse;
}

.service-bubble--apps {
    width: 180px; height: 180px;
    bottom: 10%; left: 30%;
    border-radius: 41% 59% 31% 69% / 53% 64% 36% 47%;
    animation: float 9s ease-in-out infinite;
}


/* --- Bloque: Icono Central --- */
.central-icon {
    z-index: 20;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.central-icon__svg {
    color: white;
}

.central-icon:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px rgba(225, 48, 108, 0.8));
}


/* --- Bloque: Botón de Contacto --- */
.contact-button {
    position: absolute;
    bottom: 2rem; right: 2rem;
    z-index: 30;
    padding: 0.75rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    color: white;
    backdrop-filter: blur(16px);
    transition: background-color 0.3s;
    cursor: pointer;
}

.contact-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


/* --- Bloque: Popup de Contacto --- */
.contact-popup {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease;
    transform: scale(0);
    opacity: 0;
}

.contact-popup--active {
    transform: scale(1);
    opacity: 1;
}

.contact-popup__content {
    position: relative;
    width: 20rem; height: 20rem;
    background-color: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.2);
}

.contact-popup__close-btn {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    color: var(--color-text-muted);
    transition: color 0.3s;
    background: none;
    border: none;
    cursor: pointer;
}

.contact-popup__close-btn:hover {
    color: white;
}

.contact-popup__form-wrapper {
    width: 100%;
    max-width: 20rem;
    text-align: center;
}

.contact-popup__label {
    display: block;
    font-size: 0.875rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.contact-popup__textarea {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    color: white;
    transition: all 0.3s;
    resize: none;
}

.contact-popup__textarea::placeholder {
    color: var(--color-text-muted);
}

.contact-popup__textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary);
}

.contact-popup__submit-btn {
    margin-top: 1.5rem;
    width: 100%;
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
    cursor: pointer;
}

.contact-popup__submit-btn:hover {
    background-color: var(--color-primary-hover);
}


/* --- Media Queries (Responsividad) --- */
@media (min-width: 768px) {
    .header {
        top: 3rem;
    }
    .header__title {
        font-size: 1.875rem;
    }
    .header__logo {
        width: 400px;
    }
    .contact-button {
        bottom: 3rem;
        right: 3rem;
    }
    .contact-popup__content {
        width: 24rem;
        height: 24rem;
    }
}


/* --- Animaciones (Keyframes) --- */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
        border-radius: 41% 59% 61% 39% / 53% 44% 56% 47%;
    }
    50% {
        transform: translate(15px, 20px) rotate(10deg);
        border-radius: 61% 39% 41% 59% / 43% 54% 46% 57%;
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
        border-radius: 41% 59% 61% 39% / 53% 44% 56% 47%;
    }
}

/* --- Bloque: Notificaciones --- */
.notification-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.notification {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    color: white;
    font-size: 0.9rem;
    background-color: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification--success {
    box-shadow: 0 0 15px rgba(22, 163, 74, 0.5); /* Verde */
}

.notification--error {
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.5); /* Rojo */
}

/* --- Estado de Carga del Botón --- */
.contact-popup__submit-btn--loading {
    cursor: not-allowed;
    background-color: var(--color-primary-hover);
}

.contact-popup__submit-btn .btn-text {
    transition: opacity 0.3s ease;
}

.contact-popup__submit-btn--loading .btn-text {
    opacity: 0;
}

.contact-popup__submit-btn .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-popup__submit-btn--loading .spinner {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}