/* ============================================
   LLAQTA INGENIEROS — descargas.css
   Complementa inicio.css — no lo reemplaza
   ============================================ */

/* ============================================
   HERO DESCARGAS — imagen de fondo + título centrado
   ============================================ */
.dl-hero {
    position: relative;
    height: 52vh;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dl-hero-img-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.dl-hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dl-hero-img-fallback {
    background: linear-gradient(135deg, var(--verde-oscuro) 0%, var(--negro) 100%) !important;
}

.dl-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(0, 0, 0, 0.62) 100%
    );
    z-index: 1;
}

/* Línea dorada inferior — igual que el index */
.dl-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--verde), var(--amarillo), var(--verde));
    z-index: 10;
}

.dl-hero-center {
    position: relative;
    z-index: 5;
    text-align: center;
}

.dl-hero-title {
    font-family: var(--fuente-titulo);
    font-size: clamp(4rem, 12vw, 8rem);
    color: var(--blanco);
    letter-spacing: 6px;
    line-height: 1;
    margin: 0;
}

/* ============================================
   SECCIÓN INTRO + FILTROS
   ============================================ */
.dl-intro-section {
    padding: 64px 0 40px;
    background: var(--gris-claro);
    border-bottom: 1px solid #e0ddd7;
}

.dl-intro-grid {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.dl-intro-texto h2 {
    font-family: var(--fuente-titulo);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    letter-spacing: 1px;
    color: var(--negro);
    line-height: 1.05;
    margin-bottom: 14px;
}

.dl-intro-texto p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.75;
    max-width: 520px;
}

/* Botones de filtro */
.dl-filtros {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.dl-filtro-btn {
    font-family: var(--fuente-cuerpo);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 8px 18px;
    border-radius: 4px;
    border: 1.5px solid #ccc;
    background: transparent;
    color: #888;
    cursor: pointer;
    transition: all var(--transicion);
    white-space: nowrap;
}
.dl-filtro-btn:hover {
    border-color: var(--verde);
    color: var(--verde);
}
.dl-filtro-btn.active {
    background: var(--verde);
    border-color: var(--verde);
    color: var(--blanco);
}

/* ============================================
   GRID DE PRODUCTOS (tarjetas horizontales)
   ============================================ */
.dl-grid-section {
    padding: 56px 0 80px;
    background: var(--gris-claro);
}

.dl-producto-card {
    display: grid;
    grid-template-columns: 380px 1fr;
    background: var(--blanco);
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #e8e5df;
    margin-bottom: 28px;
    transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}
.dl-producto-card:last-child { margin-bottom: 0; }
.dl-producto-card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.11);
    border-color: var(--verde);
    transform: translateY(-3px);
}

/* Imagen del producto */
.dl-prod-img-wrap {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
    min-height: 260px;
}
.dl-prod-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: brightness(0.75);
}
.dl-producto-card:hover .dl-prod-img-wrap img {
    transform: scale(1.05);
    filter: brightness(0.9);
}
.dl-prod-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 50%,
        rgba(45, 90, 39, 0.25) 100%
    );
    pointer-events: none;
}

/* Badge ícono del producto */
.dl-prod-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: rgba(242, 183, 5, 0.92);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--negro);
    z-index: 2;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}
.dl-producto-card:hover .dl-prod-badge {
    background: var(--verde);
    color: var(--blanco);
}

/* Tag especial (ej. "Producto estrella") */
.dl-prod-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--negro);
    background: var(--amarillo);
    padding: 4px 10px;
    border-radius: 3px;
    z-index: 2;
}

/* Fallback imagen */
.dl-img-fallback {
    background: linear-gradient(135deg, var(--verde-oscuro) 0%, var(--verde) 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dl-img-fallback::after {
    content: '⚙️';
    font-size: 4rem;
    opacity: 0.35;
    position: absolute;
}

/* Info del producto (derecha) */
.dl-prod-info {
    display: flex;
    flex-direction: column;
    padding: 32px 36px;
    gap: 24px;
}

.dl-prod-header h3 {
    font-family: var(--fuente-titulo);
    font-size: 2rem;
    letter-spacing: 1px;
    color: var(--negro);
    line-height: 1.05;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}
.dl-producto-card:hover .dl-prod-header h3 {
    color: var(--verde);
}
.dl-prod-header p {
    font-size: 0.92rem;
    color: #666;
    line-height: 1.7;
}

/* Separador */
.dl-prod-header {
    padding-bottom: 20px;
    border-bottom: 1px solid #ece9e2;
}

/* ── Lista de archivos descargables ── */
.dl-archivos {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-archivo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--gris-claro);
    border-radius: 8px;
    border: 1px solid #e5e2db;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.dl-archivo:hover {
    background: #edf2ec;
    border-color: var(--verde);
}

/* Ícono del archivo */
.dl-archivo-icono {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--blanco);
}
.dl-archivo-icono.pdf {
    background: #d32f2f;
}
.dl-archivo-icono.sw {
    background: var(--verde);
}

/* Info del archivo */
.dl-archivo-info {
    flex: 1;
    min-width: 0;
}
.dl-archivo-nombre {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--negro);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dl-archivo-meta {
    display: block;
    font-size: 0.72rem;
    color: var(--gris-medio);
    margin-top: 2px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botón de descarga */
.dl-btn-download {
    width: 36px;
    height: 36px;
    background: var(--verde);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanco);
    text-decoration: none;
    flex-shrink: 0;
    transition: background var(--transicion), transform var(--transicion), box-shadow var(--transicion);
}
.dl-btn-download:hover {
    background: var(--amarillo);
    color: var(--negro);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 183, 5, 0.35);
}

/* Tipos de archivo — colores de etiqueta lateral opcionales */
.dl-archivo.brochure .dl-archivo-icono.pdf { background: #c62828; }
.dl-archivo.ficha .dl-archivo-icono.pdf { background: #1565c0; }
.dl-archivo.manual .dl-archivo-icono.pdf { background: #37474f; }
.dl-archivo.software .dl-archivo-icono.sw { background: var(--verde-oscuro); }

/* ============================================
   NOTA DE SOPORTE
   ============================================ */
.dl-soporte-note {
    padding: 56px 0;
    background: var(--gris-claro);
    border-top: 1px solid #e8e5df;
}

.dl-note-grid {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(45, 90, 39, 0.06) 0%, rgba(45, 90, 39, 0.02) 100%);
    border: 1.5px solid rgba(45, 90, 39, 0.15);
    border-radius: 12px;
    padding: 28px 36px;
}

.dl-note-icono {
    width: 60px;
    height: 60px;
    background: rgba(45, 90, 39, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--verde);
    flex-shrink: 0;
}

.dl-note-texto {
    flex: 1;
    min-width: 220px;
}
.dl-note-texto strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--negro);
    margin-bottom: 4px;
}
.dl-note-texto p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.65;
}

.dl-note-btn {
    white-space: nowrap;
    padding: 12px 26px;
    font-size: 0.82rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .dl-producto-card {
        grid-template-columns: 300px 1fr;
    }
}

@media (max-width: 860px) {
    .dl-hero { height: 44vh; min-height: 260px; }

    .dl-producto-card {
        grid-template-columns: 1fr;
    }
    .dl-prod-img-wrap {
        min-height: 220px;
        max-height: 260px;
    }
    .dl-prod-info { padding: 24px 24px 28px; }

    .dl-intro-grid { flex-direction: column; align-items: flex-start; }
    .dl-filtros { width: 100%; }

    .dl-note-grid { flex-direction: column; align-items: flex-start; padding: 24px; }
    .dl-note-btn { width: 100%; text-align: center; justify-content: center; }
}

@media (max-width: 680px) {
    .dl-hero-title { font-size: clamp(3rem, 18vw, 6rem); letter-spacing: 4px; }
    .dl-filtros { gap: 6px; }
    .dl-filtro-btn { font-size: 0.7rem; padding: 7px 14px; }
    .dl-prod-info { padding: 20px; }
    .dl-prod-header h3 { font-size: 1.6rem; }
    .dl-archivo { padding: 10px 12px; }
    .dl-archivo-nombre { font-size: 0.8rem; }
    .dl-grid-section { padding: 40px 0 60px; }
}