/* =========================================
   ESTILOS LEGALES (Libro, Términos, Privacidad)
   ========================================= */

:root {
    --primary: #1F4FFF;
    --primary-dark: #1636b0;
    --text-dark: #0f172a;
    --text-gray: #64748b; /* Ajustado para mejor contraste */
    --bg-light: #e2ebf5;
    --white: #fbfcfd;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* --- BASES --- */
body { font-family: 'Inter', sans-serif; background-color: var(--bg-light); color: var(--text-dark);
    margin: 0; line-height: 1.6;
}
.container { max-width: 800px; margin: 40px auto; padding: 0 20px; }


/* --- HEADER SUPERIOR --- */
.legal-header { background: var(--white); box-shadow: var(--shadow-sm); position: sticky;
    top: 0; z-index: 1000; padding: 1rem 0;
}
.legal-header .container { margin-top: 0; margin-bottom: 0; }
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.header-logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border-radius: 8px;
    font-weight: 600; cursor: pointer; border: none; font-size: 0.95rem; transition: all 0.3s ease; text-decoration: none;
}
.btn-outline { border: 2px solid var(--border); color: var(--text-dark); background: transparent; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: white; }


/* --- CONTENEDOR PRINCIPAL (Tarjeta Blanca) --- */
.legal-content { background: var(--white); padding: 40px; border-radius: 12px; box-shadow: var(--shadow-card); }


/* Títulos Generales (Términos/Privacidad) */
h1 { font-family: 'Poppins', sans-serif; color: var(--primary); margin-bottom: 10px; }
.last-update { display: block; color: #94a3b8; font-size: 0.9rem; margin-bottom: 30px;
    border-bottom: 1px solid var(--border); padding-bottom: 20px;
}
h2 { font-size: 1.2rem; margin-top: 30px; color: var(--text-dark); font-weight: 700; }
p, li { color: var(--text-gray); font-size: 0.95rem; text-align: justify; }
ul { padding-left: 20px; }
li { margin-bottom: 10px; }

/* =========================================
   SECCIÓN LIBRO DE RECLAMACIONES
   ========================================= */

/* Encabezado del Libro (Icono + Título) */
.reclamaciones-header { display: flex; align-items: center; gap: 20px; margin-bottom: 30px;
    border-bottom: 1px solid var(--border); padding-bottom: 25px;
}
.icon-box { width: 70px; height: 70px; background: #EFF6FF; color: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0;
}
.header-title { margin: 0; line-height: 1.2; color: var(--text-dark); font-size: 1.6rem; font-weight: 700; }
.header-subtitle { margin: 5px 0 0 0; color: var(--text-gray); font-size: 0.9rem; text-align: left; }
.legal-ruc { display: block; margin-top: 8px; font-size: 0.8rem; color: #94a3b8; font-weight: 600; }

/* --- GRID DEL FORMULARIO --- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

.full-width { grid-column: 1 / -1; }

.form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; color: var(--text-dark); }

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-family: 'Inter', sans-serif;
    font-size: 0.95rem; box-sizing: border-box; transition: 0.2s; background-color: #FAFAFA;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none; border-color: var(--primary); background-color: #fff; box-shadow: 0 0 0 3px rgba(31, 79, 255, 0.1);
}

/* --- TARJETAS DE SELECCIÓN (RADIO CARDS) --- */
.radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.radio-card { display: flex; align-items: flex-start; gap: 12px; padding: 15px; border: 1px solid var(--border);
    border-radius: 10px; cursor: pointer; transition: all 0.2s ease; background: white;
}

.radio-card:hover { border-color: var(--primary); background: #f8fafc; }

/* Estilo cuando el input dentro está marcado */
.radio-card:has(input:checked) { border-color: var(--primary); background: #EFF6FF; box-shadow: 0 0 0 1px var(--primary); }
.radio-card input { margin-top: 4px; accent-color: var(--primary); }
.radio-info { display: flex; flex-direction: column; }
.radio-info strong { color: var(--text-dark); font-size: 0.95rem; margin-bottom: 2px; }
.radio-info span { font-size: 0.8rem; color: var(--text-gray); line-height: 1.3; }

/* --- CHECKBOX Y BOTÓN --- */
.checkbox-label { font-weight: 400; font-size: 0.9rem; cursor: pointer; display: flex; gap: 12px; align-items: center;
    color: var(--text-gray); margin-top: 15px; padding: 12px; background: #f8fafc; border-radius: 8px; border: 1px solid transparent;
}
.checkbox-label:hover { border-color: var(--border); }
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--primary); }
.btn-submit { background: var(--primary); color: white; padding: 16px; border: none; border-radius: 8px; font-weight: 700;
    cursor: pointer; width: 100%; font-size: 1rem; margin-top: 20px; transition: background 0.3s;
}
.btn-submit:hover { background: var(--primary-dark); }
.radio-card input:focus { outline: none; box-shadow: none; }

/* 1. El contenedor relativo para poder mover el icono adentro */
.custom-select-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.custom-select-wrapper select { width: 100%; padding: 12px 40px 12px 20px; border: 1px solid #cbd5e1; border-radius: 8px;
    font-family: 'Inter', sans-serif; font-size: 0.95rem; background-color: #FAFAFA; cursor: pointer;
    appearance: none; -webkit-appearance: none; -moz-appearance: none; z-index: 2; background: transparent;
}
.custom-select-wrapper select { background-color: transparent; background: #FAFAFA; }
.custom-select-wrapper .arrow-icon {
    position: absolute; right: 15px; color: var(--text-gray);
    font-size: 0.8rem; pointer-events: none; z-index: 3;
}
.custom-select-wrapper:hover select { border-color: var(--primary); }
.custom-select-wrapper select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 79, 255, 0.1); }
.custom-select-wrapper select:focus + .arrow-icon { transform: rotate(180deg); transition: 0.2s; color: var(--primary); }


/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .reclamaciones-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .form-grid, 
    .radio-group {
        grid-template-columns: 1fr; /* Colapsar a una columna */
    }
    
    .header-subtitle {
        text-align: center;
    }
    
    .legal-content {
        padding: 25px;
    }
}