:root {
    --primary-color: #00d4ff;
    --secondary-color: #9d00ff;
    --bg-dark: #0f0f1a;
    --bg-light: #1e1e2e;
    --text-color: #e0e0e0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    overflow-x: hidden;
}

/* --- Navbar --- */
.bg-transparent-transition {
    background-color: transparent;
    transition: background-color 0.4s ease;
}
.bg-transparent-transition.scrolled {
    background-color: rgba(15, 15, 26, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.navbar-brand, .nav-link {
    color: #fff !important;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://source.unsplash.com/1600x900/?technology,circuit') no-repeat center center/cover;
    opacity: 0.15;
    z-index: 0;
}

.hero-shapes .shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.3;
    filter: blur(60px);
    animation: float 10s infinite ease-in-out;
}

.shape-1 { width: 300px; height: 300px; top: 10%; left: 10%; }
.shape-2 { width: 400px; height: 400px; bottom: 10%; right: 10%; animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

/* Animaciones de entrada */
.animate-fade-down {
    animation: fadeDown 1s ease-out forwards;
}
.animate-fade-up {
    animation: fadeUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

@keyframes fadeDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* --- Sections --- */
.section-title {
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}
.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}


/* --- Estilos Generales de Tarjetas --- */
.card {
    background-color: var(--bg-dark);
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; /* Bordes más suaves */
}

/* --- Colores de Texto Específicos para Sensores --- */

/* Títulos de las tarjetas: Blanco puro para máximo contraste */
.sensor-card .card-title {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Subtítulos (ID del sensor): Gris claro en lugar del gris oscuro de Bootstrap */
.sensor-card .text-muted {
    color: #a0a0a0 !important; /* Importante para sobrescribir Bootstrap */
}

/* Etiquetas pequeñas (ej: "Tipo: temperatura") */
.data-label {
    color: #b0b0b0;
}

/* --- Valores y Estados (Lo más importante) --- */
.data-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff; /* Base: Blanco puro */
    line-height: 1;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Colores Neón para Switches (Estados ON/OFF) */
.data-value.text-success {
    /* Verde Neón Brillante */
    color: #00ff88 !important; 
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.6); /* Efecto brillo */
}

.data-value.text-danger {
    /* Rojo Neón Brillante */
    color: #ff4d4d !important;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.6); /* Efecto brillo */
}

/* --- Badges de Estado --- */
.badge.bg-success {
    background-color: rgba(0, 255, 136, 0.2) !important;
    color: #00ff88;
    border: 1px solid #00ff88;
}

.badge.bg-warning {
    background-color: rgba(255, 193, 7, 0.2) !important;
    color: #ffc107;
    border: 1px solid #ffc107;
}

.badge.bg-secondary {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #cccccc;
    border: 1px solid #555;
}

/* --- Efecto Hover Mejorado --- */
.project-card:hover, .hardware-card:hover, .sensor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 212, 255, 0.3); /* Borde cyan suave al pasar el mouse */
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.5rem; }
    .shape-1 { width: 150px; height: 150px; }
    .shape-2 { width: 200px; height: 200px; }
}
/* --- Estilos para tarjetas de Proyecto con Imagen (Estilo Hardware mejorado) --- */
.card-img-top-wrapper {
    height: 200px;
    overflow: hidden;
    border-top-left-radius: 0.5rem; /* Coincide con border-radius de la card */
    border-top-right-radius: 0.5rem;
}

.card-img-top-project {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-img-top-project,
.hardware-card:hover .card-img-top-project {
    transform: scale(1.05);
}

/* --- Estilos Sección Mediciones --- */
.sensor-card {
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.sensor-icon-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(157,0,255,0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0,212,255,0.2);
}

.sensor-icon-circle i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Datos numéricos grandes */
.data-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.data-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.data-label {
    font-size: 0.9rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}
