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

#blob, #blur { pointer-events: none; }
#blur {
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    backdrop-filter: blur(200px);
    z-index: -1;
    pointer-events: none;
}

#blob {
    background: linear-gradient(
        to right,
        var(--primary-color),
        var(--accent-color)
    );    
    height: 340px;
    width: 340px;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: rotate 20s infinite;
    opacity: 0.5;
    filter: blur(150px);
    z-index: -2;
    pointer-events: none;
}

:root {
    --primary-color: #00BFFF;      /* Azul Eléctrico */
    --accent-color: #FF00A0;       /* Rosa Neón */
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    --dark-bg: #0A0A1A;
    --light-text: #EAEAEA;
    --text-color: #9999A1;
    --white-color: #FFFFFF;
    --navbar-bg: rgba(10, 10, 26, 0.7); /* Dark color with transparency */
    --card-bg: rgba(26, 26, 46, 0.5);
    --card-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    background: linear-gradient(-45deg, #0a0a1a, #1a0a2e, #0a0a1a, #2e0a1a);
	background-size: 400% 400%;
	animation: gradient-animation 15s ease infinite;
    background-attachment: fixed;
    overflow-x: hidden; /* Prevents blob from creating a scrollbar */
}

/* --- Navbar --- */
.navbar {
    background-color: transparent;
    transition: background-color 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
}

/* Navbar when at the top (NOT scrolled) */
.navbar:not(.scrolled) .navbar-brand {
    color: var(--white-color) !important;
}

.navbar:not(.scrolled) .nav-link {
    color: var(--light-text) !important;
}

/* Hamburger icon color for light background */
.navbar:not(.scrolled) .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar when scrolled down */
.navbar.scrolled {
    background-color: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled .navbar-brand,
.navbar.scrolled .nav-link {
    color: var(--white-color) !important;
}
.navbar.scrolled .nav-link:hover {
    color: var(--primary-color) !important;
}

/* General navbar styles */
.navbar-brand {
    font-weight: 700;
    transition: color 0.3s ease-in-out;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    color: var(--light-text); /* Changed for visibility on light background */
    position: relative;
    /* Removed background to show the body's pastel gradient */
}

.hero-section h1 {
    font-weight: 700;
    color: var(--white-color);
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.5), 0 0 10px rgba(0, 191, 255, 0.5);
}

.hero-section .lead {
    font-size: 1.25rem;
    color: var(--text-color); /* Changed to secondary text color */
}

/* --- Buttons --- */
.btn-primary {
    background: transparent;
    border: 1px solid var(--white-color);
    color: var(--white-color) !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease-in-out;
    box-shadow: none;
}

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--primary-color), 0 0 25px var(--accent-color);
}

.btn-primary:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 0 8px var(--primary-color), 0 0 15px var(--accent-color);
}

.btn .icon-arrow {
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.btn:hover .icon-arrow {
    transform: translateX(4px);
}

.icon-arrow::before {
    content: '→';
}

/* --- How it Works Section --- */
#how-it-works {
    background-color: rgba(10, 10, 26, 0.4);
}

/* --- Conocer Mas Section --- */
#conocer-mas {
    background-color: transparent;
}

.section-title {
    color: var(--light-text);
    font-weight: 700;
}

.card {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.3s ease-in-out;
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    color: var(--light-text);
}

.card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px; 
    padding: 1px;
    background: var(--primary-gradient); 
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude; 
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.card:hover::before {
    opacity: 1;
}



.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.5), inset 0 0 10px rgba(0, 191, 255, 0.3);
    color: var(--white-color);
    text-shadow: 0 0 5px var(--white-color), 0 0 10px var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* --- CTA Section --- */
.cta-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--white-color);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.cta-card .btn-light {
    background-color: transparent;
    border: 1px solid var(--white-color);
    color: var(--white-color);
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}

.cta-card .btn-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--white-color);
    box-shadow: 0 0 15px var(--primary-color), 0 0 25px var(--accent-color);
}

/* --- Footer --- */
.footer {
    background-color: var(--dark-color);
    color: rgba(255, 255, 255, 0.7);
}

/* --- Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for cards */
.row .animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.row .animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.row .animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }

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

/* --- Chessboard --- */
#myBoard {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 191, 255, 0.4);
    border-radius: 12px;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
}

/* --- Navbar on Mobile --- */
@media (max-width: 991.98px) {
    /* Apply a glassmorphism background to the expanded navbar menu */
    .navbar .navbar-collapse.show,
    .navbar .navbar-collapse.collapsing {
        background-color: var(--navbar-bg);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: 0.5rem;
        padding: 1rem;
        margin-top: 0.5rem;
        border: 1px solid var(--card-border);
    }

    .hero-section {
        /* Add padding to the top on mobile to avoid content being too close to the navbar */
        padding-top: 80px; 
        /* Adjust min-height to ensure content fits well on smaller screens */
        min-height: auto; 
        padding-bottom: 40px; /* Add some space at the bottom as well */
    }
}