/* =================================================================    
   SmartHome Pro - Estilos Globales Personalizados
   ================================================================ */

@layer base {
  html {
    scroll-behavior: smooth;
  }
  
  body {
    background-color: #0f172a; /* Slate 900 */
    color: #f1f5f9; /* Slate 100 */
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  }
}



/* Transiciones y efectos suaves para componentes */
.glass-effect {
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Personalización de scrollbars para mantener el diseño limpio */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #020617; /* Slate 950 */
}

::-webkit-scrollbar-thumb {
  background: #334155; /* Slate 700 */
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3b82f6; /* Blue 500 */
}

/* =================================================================    
   Cabecera, Navegación y Estructura Global
   ================================================================ */
header {
    background-color: #0f172a; /* Slate 900 */
    border-bottom: 1px solid #1e293b;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    box-sizing: border-box;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

/* Navegación de Escritorio */
header nav {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #38bdf8;
}

.nav-links a.blog-link {
    color: #38bdf8;
    font-weight: 600;
}

/* Buscador integrado (Escritorio) */
.search-form {
    display: flex;
    align-items: center;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 6px 12px;
    max-width: 240px;
    width: 100%;
    box-sizing: border-box;
}

.search-form input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.85rem;
    width: 100%;
    color: #f1f5f9;
}

.search-form input::placeholder {
    color: #64748b;
}

.search-form button {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenedor de botones móviles (Oculto en escritorio) */
.mobile-actions {
    display: none;
    align-items: center;
    gap: 8px;
}

/* Botones móviles */
.mobile-search-btn, .hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.mobile-search-btn:hover, .hamburger-btn:hover {
    background: #1e293b;
}

/* =================================================================    
   Utilidades de Texto (Line Clamp)
   ================================================================ */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =================================================================    
   Media Queries (Responsive Layout para Móviles y Tablets)
   ================================================================ */
@media (max-width: 992px) {
    .mobile-actions {
        display: flex;
    }

    /* Buscador en versión móvil desplegable */
    .search-form {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0f172a;
        padding: 15px 20px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
        border-bottom: 1px solid #1e293b;
        max-width: 100% !important;
        box-sizing: border-box;
        z-index: 999;
    }

    .search-form.active {
        display: flex;
    }

    /* Menú desplegable hamburguesa en móvil */
    header nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0f172a;
        border-bottom: 1px solid #1e293b;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        z-index: 998;
    }

    header nav.active {
        max-height: 600px;
    }

    .nav-links {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        align-items: flex-start;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 8px 0;
        border-bottom: 1px solid #1e293b;
    }
}