/* ==========================================
   ESTILOS GENERALES Y RESPONSIVOS - LSSD
   ========================================== */
* {
    box-sizing: border-box;
}

body {
    background-color: #f0f2f5;
    font-family: 'Times New Roman', Times, serif, Arial, sans-serif;
    color: #000;
    margin: 0;
    padding: 10px;
}

/* Barra de navegación superior */
.navbar {
    background: #1b263b;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    border-radius: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.nav-brand { font-weight: bold; letter-spacing: 1px; font-size: 14px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-btn {
    background: #415a77;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
}
.nav-btn.active { background: #e0e1dd; color: #000; }

/* Contenedor principal tipo hoja oficial */
.container {
    max-width: 850px;
    width: 100%;
    background: #fff;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.form-section { display: none; }
.form-section.active { display: block; }

/* Encabezado clásico con escudos a los lados */
.official-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.sheriff-badge {
    width: 75px;
    height: 75px;
    object-fit: contain;
}

.header-text h2 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
}

.header-text h3 {
    margin: 2px 0;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.header-text p {
    margin: 2px 0;
    font-size: 13px;
    font-style: italic;
}

.header-text small {
    font-size: 10px;
    letter-spacing: 1px;
    font-weight: bold;
}

.document-title {
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    border-bottom: 1px solid #000;
    padding-bottom: 12px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* Tipografía de documentos oficiales */
.doc-text {
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 15px;
}
.doc-list, .doc-list-bullets {
    margin: 10px 0 15px 20px;
    font-size: 14px;
}
.section-subtitle {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* Inputs y áreas de texto */
input[type="text"], input[type="date"], input[type="datetime-local"], textarea {
    border: none;
    border-bottom: 1px solid #000;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    padding: 2px 5px;
    outline: none;
}
textarea {
    width: 100%;
    border: 1px solid #ccc;
    padding: 10px;
    resize: vertical;
    border-radius: 4px;
}
.inline-input-long { width: 100%; max-width: 350px; }
.inline-input-medium { width: 100%; max-width: 250px; }
.inline-input-short { width: 80px; }
.inline-input { width: 140px; }

/* Estilos de firma automática cursiva */
.firma-nombre {
    font-style: italic;
    font-weight: bold;
    font-size: 15px;
    display: inline-block;
}
.firma-rango {
    font-style: italic;
    font-size: 13px;
    display: inline-block;
    margin-top: 2px;
}

/* Pie de página y firmas */
.doc-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 35px;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 20px;
}
.signature-block span:last-child {
    font-style: italic;
    font-size: 12px;
}

.doc-footer-address {
    text-align: center;
    font-size: 11px;
    margin-top: 35px;
    border-top: 1px solid #ddd;
    padding-top: 8px;
    letter-spacing: 0.5px;
}

/* ==========================================
   BLOQUE B.O.L.O. Y FOTO DE IMGBUR
   ========================================== */
.bolo-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.bolo-left { flex: 1; min-width: 280px; }
.bolo-right { width: 100%; max-width: 220px; margin: 0 auto; }

.bolo-field {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: bold;
}
.bolo-field input { width: 100%; font-weight: normal; }

.bolo-photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.bolo-photo-box {
    border: 2px solid #000;
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.bolo-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.photo-placeholder-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #555;
    z-index: 1;
}

.photo-placeholder { 
    font-size: 65px; 
    line-height: 1;
}

.photo-placeholder-wrapper small {
    font-size: 10px;
    font-family: inherit;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.bolo-photo-input-group {
    width: 100%;
    font-size: 11px;
    font-weight: bold;
    margin-top: 10px;
}

.bolo-photo-input-group label {
    display: block;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.bolo-photo-input-group input {
    width: 100% !important;
    font-size: 11px !important;
    border: 1px solid #ccc !important;
    padding: 6px !important;
    background: #fff;
    border-radius: 3px;
    box-sizing: border-box;
}

/* ==========================================
   BOTONES Y UTILIDADES
   ========================================== */
.export-buttons {
    margin-top: 25px;
    text-align: center;
}
.submit-btn {
    background: #1b263b;
    color: #fff;
    border: none;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}
.submit-btn:hover { background: #415a77; }

.add-item-btn {
    background: #415a77;
    color: white;
    border: none;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 5px;
    margin-bottom: 10px;
}
.add-item-btn:hover { background: #1b263b; }

.delete-item-btn {
    background: #d90429;
    color: white;
    border: none;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 5px;
}

.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

@media (max-width: 650px) {
    body { padding: 5px; }
    .container { padding: 15px; }
    .doc-footer { flex-direction: column; align-items: flex-start; }
    .bolo-right { max-width: 100%; }
}

/* ==========================================
   ESTILOS DE IMPRESIÓN
   ========================================== */
@media print {
    body {
        background-color: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .navbar, .export-buttons, .add-item-btn, .delete-item-btn, .bolo-photo-input-group {
        display: none !important;
    }
    .container {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .bolo-photo-box {
        border: 2px solid #000 !important;
    }
}