/* =========================================
   1. VARIABLES DE COLOR Y FUENTES (Identidad Profesional)
   ========================================= */
:root {
    /* Paleta de colores exacta del diseño */
    --azul-corporativo: #1a2a3a; /* Deep Blue */
    --cobre-accion: #c46b3d;     /* Action Copper */
    --cobre-hover: #a85a30;
    
    /* Colores de fondo y texto */
    --fondo-sitio: #f4f6f8;      /* Light Gray */
    --fondo-cards: #ffffff;      /* Pure White */
    --texto-principal: #333333;
    --texto-secundario: #666666;
    
    /* Elementos visuales */
    --borde-suave: #e2e8f0;
    
    /* Tipografía Moderna */
    --fuente-principal: 'Montserrat', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* Efectos */
    --shadow-soft: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-card: 0 10px 25px rgba(0,0,0,0.08); /* Sombra densa del diseño */
    --border-radius-main: 10px;
}

/* =========================================
   2. RESET Y ESTILOS GENERALES (Moderno)
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--fuente-principal);
    background-color: var(--fondo-sitio);
    color: var(--texto-principal);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased; /* Suavizado de fuente pro */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Títulos ultra-bold del diseño */
h1, h2, h3, h4 {
    color: var(--azul-corporativo);
    font-weight: 800; /* Ultra-bold */
    margin-bottom: 15px;
    line-height: 1.2;
}

a {
    color: var(--cobre-accion);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--cobre-hover);
}

/* =========================================
   3. CABECERA (HEADER) Y NAVEGACIÓN
   ========================================= */
header {
    background-color: var(--fondo-cards);
    color: var(--azul-corporativo);
    padding: 5px 20px; /* ¡AJUSTE!: Reducido drásticamente de 15px 40px a 5px 20px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h2 {
    color: var(--azul-corporativo);
    margin: 0;
    font-size: 1.6em;
    font-weight: 800;
    letter-spacing: -1px;
}

nav {
    display: flex;
    align-items: center;
    gap: 15px; /* ¡AJUSTE!: Reducido de 25px a 15px para juntar más los botones */
}

nav a {
    color: var(--texto-principal);
    font-weight: 500;
    font-size: 0.95em;
}

nav a:hover {
    color: var(--cobre-accion);
}

/* Botón especial en el menú */
.btn-registro {
    background-color: var(--cobre-accion);
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 700;
    color: #ffffff !important;
}

.btn-registro:hover {
    background-color: var(--cobre-hover);
    transform: translateY(-1px);
}

/* =========================================
   4. SISTEMA DE GRILLAS Y TARJETAS (Catálogo y Lotes)
   ========================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Tarjeta base densificada (Usada en lotes/detalle) */
.card {
    background: var(--fondo-cards);
    padding: 25px;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--borde-suave);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--shadow-card);
}

/* =========================================
   5. FORMULARIOS Y PANELES (Admin / Registro)
   ========================================= */
.form-panel {
    background: var(--fondo-cards);
    padding: 35px;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--borde-suave);
}

input[type="text"], input[type="email"], input[type="password"], select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--cobre-accion);
    box-shadow: 0 0 0 3px rgba(196, 107, 61, 0.2);
}

button[type="submit"], .btn-principal {
    background-color: var(--azul-corporativo);
    color: #ffffff;
    border: none;
    padding: 15px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    width: 100%;
}

button[type="submit"]:hover {
    background-color: #111d28;
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
    background-color: var(--azul-corporativo);
    color: #a0aec0;
    text-align: center;
    padding: 30px;
    margin-top: 70px;
    border-top: 4px solid var(--cobre-accion);
    font-size: 0.9em;
}

/* =========================================
   7. NUEVAS REGLAS: PORTADA ALTA FIDELIDAD (¡MAGIA AQUÍ!)
   ========================================= */

/* --- A. HERO SECTION --- */
.hero {
    background: linear-gradient(rgba(26, 42, 58, 0.92), rgba(26, 42, 58, 0.98)), url('https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
    color: #ffffff;
    padding: 130px 20px 100px 20px; /* Padding inferior generoso */
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: #ffffff;
    font-size: 3.2em; /* Muy grande */
    font-weight: 800; /* Ultra-bold */
    letter-spacing: -2px; /* Toque profesional */
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 50px;
    color: #cbd5e1;
    font-weight: 400;
}

/* Botones especiales del Hero */
.btn-modern-solid {
    background-color: var(--cobre-accion);
    color: #ffffff !important;
    padding: 16px 35px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid var(--cobre-accion);
}

.btn-modern-solid:hover {
    background-color: var(--cobre-hover);
    transform: translateY(-2px);
}

.btn-modern-outline {
    background-color: transparent;
    color: #ffffff !important;
    padding: 16px 35px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid #ffffff;
}

.btn-modern-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* --- B. SECCIÓN CATEGORÍAS FLOTANTES --- */
.category-section {
    background-color: var(--fondo-sitio);
    padding-bottom: 60px;
}

.category-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: -60px; /* ¡EFECTO CLAVE!: Sube las tarjetas sobre el Hero */
    position: relative;
    z-index: 10;
}

.category-card {
    background: var(--fondo-cards);
    padding: 40px 30px;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-card); /* Sombra densa */
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--borde-suave);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.category-card .icon {
    font-size: 3.5em;
    margin-bottom: 20px;
    display: block;
}

.category-card h3 {
    color: var(--azul-corporativo);
    font-size: 1.25em;
    font-weight: 700;
    margin: 0;
}

/* --- C. SECCIÓN REMATES DESTACADOS --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 4px solid var(--azul-corporativo);
    padding-bottom: 15px;
    margin-bottom: 35px;
    margin-top: 60px;
}

.section-header h2 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 700;
}

.section-header a {
    color: var(--cobre-accion);
    font-weight: bold;
}

/* Tarjeta densificada moderna de remate */
.featured-card {
    padding: 0; /* Imagen borde a borde */
    overflow: hidden;
    height: 100%;
}

.featured-card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.featured-card-body h3 {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 20px;
    height: 50px; /* Altura fija para alineación */
    overflow: hidden;
}

/* La caja de datos profesional de la imagen */
.data-box {
    background-color: #f1f5f9; /* Gris muy suave */
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.95em;
    color: var(--texto-secundario);
    border: 1px solid var(--borde-suave);
}

.data-box-item {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

.data-box-item:last-child {
    margin-bottom: 0;
}

.data-box-item .icon {
    width: 25px;
    font-size: 1.1em;
}

.data-box-item strong {
    color: var(--azul-corporativo);
}

/* Etiqueta flotante cobre sobre la imagen */
.floating-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(196, 107, 61, 0.95); /* Cobre transparente */
    color: #ffffff;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* NUEVO ESTILO HERO */

/* --- CONFIGURACIÓN HERO PARALLAX SLIDER (CON CORRECCIÓN DE COLOR) --- */
.hero-parallax-slider {
    position: relative;
    height: 500px; /* Altura del hero */
    width: 100%;
    overflow: hidden; /* Importante para que el fondo no se salga */
    color: white;
    margin-top: -20px; /* Ajuste según header */
}

/* 1. Capa de Fondo (El Slider que tendrá Parallax) */
.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Más alto que el contenedor para permitir el movimiento parallax */
    z-index: 1;
    will-change: transform; /* Optimización de rendimiento para JS */
}

/* Estilo individual de cada slide */
.hero-slides .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0; /* Ocultos por defecto */
    transition: opacity 1.5s ease-in-out; /* Velocidad del fundido cruzado */
    z-index: 1;
}

/* Slide activo */
.hero-slides .slide.active {
    opacity: 1;
    z-index: 2; /* Se superpone a los demás */
}

/* 2. Capa de Superposición (Overlay) */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado oscuro para legibilidad del texto */
    background: linear-gradient(90deg, rgba(26, 42, 58, 0.9) 0%, rgba(26, 42, 58, 0.5) 100%);
    z-index: 2; /* Sobre las imágenes, bajo el texto */
}

/* 3. Capa de Contenido Estático */
.hero-content-wrapper {
    position: relative;
    z-index: 3; /* Sobre todas las capas de fondo */
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* --- ESTILOS DE TEXTO (CON CORRECCIÓN DE COLOR) --- */
.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin: 0;
    /* CORRECCIÓN DE CONTRASTE AQUÍ: Forzamos color blanco puro */
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUpMussa 1s ease-out;
}

.hero-text p {
    font-size: 1.25rem;
    max-width: 550px;
    margin: 15px 0 35px 0;
    opacity: 0.95;
    color: #ffffff; /* Aseguramos que el párrafo también sea blanco */
    animation: fadeInUpMussa 1.2s ease-out;
}

/* --- BOTONES Y STATS (SE MANTIENEN IGUAL) --- */
.btn-hero-principal, .btn-hero-secundario {
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    display: inline-block;
}

.btn-hero-principal {
    background: var(--cobre-accion);
    color: white;
    margin-right: 15px;
}

.btn-hero-secundario {
    border: 2px solid white;
    color: white;
}

.btn-hero-secundario:hover {
    background: white;
    color: var(--azul-corporativo);
}

.hero-btns a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Stats */
.hero-stats {
    display: flex;
    gap: 30px;
    animation: fadeInRightMussa 1.4s ease-out;
}

.stat-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--cobre-accion);
}

.stat-lab {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    color: #ffffff;
}

/* --- ANIMACIONES CSS --- */
@keyframes fadeInUpMussa {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRightMussa {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- SEGURO PARA LA GRILLA DE CATEGORÍAS --- */
.categorias-grid { /* Ajusta este nombre al que uses en tu HTML */
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    flex-direction: row !important; /* Por si usabas flex anteriormente */
    margin-top: 40px;
}

/* Ajuste para que las tarjetas de categoría no hereden estilos del Hero */
.categoria-card {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: var(--azul-corporativo) !important; /* Forzamos color oscuro si se puso blanco */
}