/* Global styles following the ENVELOPE aesthetic */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap');

:root {
    --bg-blur-bg: rgba(255, 255, 255, 1);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-bg: rgba(255, 255, 255, 1);
    --inner-bg: rgba(255, 255, 255, 1);
    --primary: #0f172a;
    /* slate-900 */
    --bg-blur: 25px;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #f1f5f9;
    /* slate-100 */
    overflow-x: hidden;
    color: #000000;
    /* Texto base negro */
}

/* Base background from source SVG */
body::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 1280px;
    /* Ajustado al ancho de la tarjeta max-w-2xl */
    height: 720px;
    transform: translate(-50%, -50%) scale(1.2);
    /* Reusing the base64 SVG background from the source for consistency */
    background-image: url('static/background.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: blur(var(--bg-blur)) brightness(0.95);
    z-index: -1;
    pointer-events: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.glass-panel {
    background: var(--bg-blur-bg);
    border: none;
    box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.45);
    /* Sombra muy agresiva */
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid rgba(15, 23, 42, 0.05);
    /* Borde casi imperceptible */
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25);
    /* Sombra consistente */
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .glass-card:hover {
        box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
    }
}

.glass-inner {
    background: var(--inner-bg);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25);
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .glass-inner:hover {
        box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
    }
}

.bg-blur {
    backdrop-filter: blur(8px);
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
    .nav-button:hover {
        letter-spacing: 0.1em;
    }
}

/* Estilos de Logo */

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* RESET ESTRATÉGICO DE COLOR: Negro por defecto pero respetando utilidades */
body {
    color: #000000;
}

/* Paneles y Tarjetas con Sombras FIJAS (Sin hover) */
.glass-panel {
    background: var(--bg-blur-bg);
    border: none;
    box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.45);
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25);
}

.glass-inner {
    background: var(--inner-bg);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25);
}

/* Eliminamos efectos de hover que alteran la geometría o sombras */
@media (hover: hover) {

    .glass-card:hover,
    .glass-inner:hover,
    .nav-button:hover {
        transform: none !important;
        box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25) !important;
    }
}

/* Asegurar legibilidad en fondos claros (Tailwind utilidades) */
.text-slate-900,
.text-slate-800,
.text-slate-700 {
    color: #000000 !important;
}

.text-slate-600,
.text-slate-500,
.text-slate-400 {
    color: #1a1a1a !important;
}

/* Contenedores oscuros: Forzar blanco */
.bg-slate-900,
.bg-slate-900 * {
    color: #ffffff !important;
}

/* EXCEPCIONES: Permitir colores semánticos (Ámbar, Rojo) */
.text-amber-500,
.text-amber-400 {
    color: #fbbf24 !important;
}

.bg-amber-500,
.bg-amber-400 {
    background-color: #fbbf24 !important;
    color: #000000 !important;
}

.text-red-500,
.text-red-600,
.text-red-900 {
    color: #ef4444 !important;
}

.bg-red-600 {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

.fa-circle-xmark {
    color: #ef4444 !important;
}

.fa-lightbulb,
.fa-chevron-right,
.fa-arrow-right {
    color: #fbbf24 !important;
}

.fa-percentage {
    color: inherit;
}

/* Forzar azul oscuro para el logo o elementos específicos */
.bg-slate-900 {
    background-color: #0f172a !important;
}

/* Botones de navegación en hover (Inversión manual) */
@media (hover: hover) {
    .nav-button:hover {
        background-color: #0f172a !important;
    }

    .nav-button:hover span {
        color: #ffffff !important;
    }
}

/* Rectángulos de precio uniformes (Azul con letras blancas) */
.price-tag {
    background-color: #0f172a !important;
    color: #ffffff !important;
    padding: 0.375rem 1.25rem;
    border-radius: 9999px;
    font-weight: 900;
    display: inline-block;
    white-space: nowrap;
}

.price-tag * {
    color: #ffffff !important;
}

/* Iconos deben heredar color de sus clases de utilidad a menos que se fuerce */
i[class*="text-amber"] {
    color: #fbbf24 !important;
}

i[class*="text-red"] {
    color: #ef4444 !important;
}

i[class*="text-green"] {
    color: #22c55e !important;
}



/* Iconos de FontAwesome */
.fas,
.fab,
.far {
    color: inherit;
}

/* Captura del sistema: Preview Button */
.system-preview-btn {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 1.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(15, 23, 42, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1.5rem;
}

@media (hover: hover) {
    .system-preview-btn:hover {
        transform: scale(1.02);
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
    }
}

.system-preview-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) brightness(0.6);
    transform: scale(1.1);
    transition: all 0.6s ease;
}

@media (hover: hover) {
    .system-preview-btn:hover .system-preview-bg {
        filter: blur(3px) brightness(0.8);
        transform: scale(1.05);
    }
}

.system-preview-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem;
    z-index: 2;
}

/* Lightbox Modal */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-overlay.active,
.lightbox-overlay.closing {
    display: flex;
}

/* Lightbox Animations */
@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lightboxFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes lightboxZoomIn {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes lightboxZoomOut {
    from { transform: scale(1) translateY(0); opacity: 1; }
    to { transform: scale(0.9) translateY(20px); opacity: 0; }
}

.lightbox-overlay.active {
    animation: lightboxFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.lightbox-overlay.closing {
    animation: lightboxFadeOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.lightbox-overlay.active .lightbox-img {
    animation: lightboxZoomIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.lightbox-overlay.closing .lightbox-img {
    animation: lightboxZoomOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}


.lightbox-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    text-align: center;
}

.lightbox-container::before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}

.lightbox-img {
    display: inline-block;
    vertical-align: middle;
    max-height: 85vh;
    max-width: 90vw;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: zoom-in;
    user-select: none;
    margin: 2rem auto;
}

.lightbox-img.zoomed {
    max-width: 95vw;
    max-height: none;
    width: 800px;
    /* Tamaño máximo de lectura cómodo, no gigantesco */
    cursor: zoom-out;
    margin: 4rem auto;
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    background: white/10;
    backdrop-filter: blur(10px);
    border-radius: full;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s;
    border-radius: 50%;
}

.lightbox-close:hover {
    background: white/20;
    transform: rotate(90deg);
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    width: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
}
.carousel-container.show-controls .carousel-button {
    opacity: 1;
}

.carousel-button:hover {
    background: rgba(255, 255, 255, 0.3);
    scale: 1.1;
}

.carousel-button.prev {
    left: 1rem;
}

.carousel-button.next {
    right: 1rem;
}

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    width: 12px;
    border-radius: 3px;
}