:root {
    --primary-purple: #2E1A5F;
    --primary-teal: #3BBCA8;
    --bg-light: #f4f7fa;
    --border-color: #ddd;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: #333;
    padding-top: 100px; /* Espacio para navbar */
}

.libro-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

@media (max-width: 1366px) {
    .libro-container {
        max-width: 720px;
    }

    .reclamo-form {
        padding: 32px;
    }
}

/* --- HEADER --- */
.libro-header {
    text-align: center;
    margin-bottom: 40px;
}

.libro-header h1 {
    font-family: 'Poltawski Nowy', serif;
    color: var(--primary-purple);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.libro-header p {
    color: #666;
    font-size: 0.95rem;
}

.fecha-box {
    display: inline-block;
    background: #eefdfa;
    color: var(--primary-teal);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 15px;
    border: 1px solid var(--primary-teal);
}

/* --- FORMULARIO --- */
.reclamo-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 5px solid var(--primary-purple);
}

fieldset {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
}

legend {
    font-weight: 700;
    color: var(--primary-purple);
    padding: 0 10px;
    font-size: 1.1rem;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #444;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    transition: border 0.3s;
    box-sizing: border-box; /* Importante para que no se desborde */
}

input:focus, textarea:focus {
    border-color: var(--primary-teal);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 188, 168, 0.1);
}

/* --- RADIOS --- */
.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* --- SELECTOR DE TIPO (Reclamo/Queja) --- */
.tipo-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.tipo-selector .radio-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0;
    cursor: pointer;
}

.tipo-selector input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.tipo-selector .radio-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
}

.tipo-selector .radio-label i {
    font-size: 1.5rem;
    color: var(--primary-teal);
    transition: transform 0.3s ease;
}

.tipo-selector .radio-label strong {
    font-size: 1rem;
    color: #333;
    display: block;
}

.tipo-selector .radio-label small {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.3;
}

.tipo-selector input[type="radio"]:checked + .radio-label {
    border-color: var(--primary-purple);
    background: linear-gradient(135deg, rgba(46, 26, 95, 0.05) 0%, rgba(59, 188, 168, 0.05) 100%);
    box-shadow: 0 4px 12px rgba(46, 26, 95, 0.15);
    transform: translateY(-2px);
}

.tipo-selector input[type="radio"]:checked + .radio-label i {
    color: var(--primary-purple);
    transform: scale(1.15);
}

.tipo-selector input[type="radio"]:checked + .radio-label strong {
    color: var(--primary-purple);
}

.tipo-selector .radio-label:hover {
    border-color: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tag-reclamo { color: #d9534f; font-weight: 800; }
.tag-queja { color: #f0ad4e; font-weight: 800; }

small {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

/* --- FOOTER DEL FORM --- */
.legal-text {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 20px;
    line-height: 1.5;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.btn-enviar {
    width: 100%;
    background-color: var(--primary-purple);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-enviar:hover {
    background-color: var(--primary-teal);
}

/* --- ALERTS --- */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    margin-top: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .libro-container { margin: 30px auto; }
    .reclamo-form { padding: 30px; }
}

@media (max-width: 768px) {
    .reclamo-form { padding: 20px; }
    .form-row { flex-direction: column; gap: 0; }
    .libro-header h1 { font-size: 1.8rem; }
    legend { font-size: 1rem; }
    fieldset { padding: 15px; }
    
    .tipo-selector {
        grid-template-columns: 1fr;
    }
    
    .tipo-selector .radio-label {
        padding: 12px;
    }
}