/* ================================================================================
   CHOIX - TRÁMITES Y SERVICIOS
   ================================================================================ */

/* =============================================
   SECCION DE TRAMITES (COMPACTO 4 COLUMNAS)
   Shortcode: [seccion_tramites]
   ============================================= */

.tramites-section {
    margin: 50px 0;
    padding: 0 20px;
}

.tramites-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
}

.tramites-header {
    text-align: center;
    margin-bottom: 25px;
}

.tramites-titulo {
    font-size: 26px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

.tramites-subtitulo {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* Grid compacto de 4 columnas */
.tramites-grid-compacto {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Item de trámite compacto */
.tramite-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.tramite-item:hover {
    background: white;
    border-color: var(--tram-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.tramite-item .tramite-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--tram-color);
    border-radius: 8px;
    color: white;
    flex-shrink: 0;
}

.tramite-item .tramite-nombre {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.tramite-item:hover .tramite-nombre {
    color: var(--tram-color);
}

.tramite-item .tramite-arrow {
    color: #cbd5e1;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.tramite-item:hover .tramite-arrow {
    color: var(--tram-color);
    transform: translate(2px, -2px);
}

/* Footer con botón ver todos */
.tramites-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.tramites-ver-todos,
.tramites-ver-todos:link,
.tramites-ver-todos:visited,
.tramites-ver-todos:active {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #233E8D !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tramites-ver-todos:hover {
    background: #1a2f6b !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35,62,141,0.3);
    color: #fff !important;
}

.tramites-ver-todos svg {
    transition: transform 0.2s ease;
}

.tramites-ver-todos:hover svg {
    transform: translateX(3px);
}

/* Responsive */
@media (max-width: 1024px) {
    .tramites-grid-compacto {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .tramites-section {
        padding: 0 15px;
        margin: 40px 0;
    }

    .tramites-container {
        padding: 20px;
    }

    .tramites-titulo {
        font-size: 22px;
    }

    .tramites-grid-compacto {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .tramite-item {
        padding: 10px 12px;
    }

    .tramite-item .tramite-icono {
        width: 34px;
        height: 34px;
    }

    .tramite-item .tramite-icono svg {
        width: 18px;
        height: 18px;
    }

    .tramite-item .tramite-nombre {
        font-size: 12px;
    }

    .tramite-item .tramite-arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .tramites-grid-compacto {
        grid-template-columns: 1fr;
    }
}

/* Sobrescribir estilos del tema Publisher en páginas con shortcode */
.page-content .tramites-section,
.entry-content .tramites-section,
article .tramites-section {
    margin: 50px 0 !important;
    padding: 0 !important;
}

.page-content .tramites-container,
.entry-content .tramites-container,
article .tramites-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    padding: 30px !important;
}

.page-content .tramites-header,
.entry-content .tramites-header,
article .tramites-header {
    text-align: center !important;
    margin-bottom: 25px !important;
}

.page-content .tramites-grid-compacto,
.entry-content .tramites-grid-compacto,
article .tramites-grid-compacto {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.page-content .tramite-item,
.entry-content .tramite-item,
article .tramite-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    background: #f8fafc !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    border: 1px solid transparent !important;
    list-style: none !important;
}

.page-content .tramite-item:hover,
.entry-content .tramite-item:hover,
article .tramite-item:hover {
    background: white !important;
    border-color: var(--tram-color) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    transform: translateY(-2px) !important;
}

.page-content .tramite-item .tramite-icono,
.entry-content .tramite-item .tramite-icono,
article .tramite-item .tramite-icono {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    background: var(--tram-color) !important;
    border-radius: 8px !important;
    color: white !important;
    flex-shrink: 0 !important;
}

.page-content .tramite-item .tramite-nombre,
.entry-content .tramite-item .tramite-nombre,
article .tramite-item .tramite-nombre {
    flex: 1 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}

.page-content .tramite-item:hover .tramite-nombre,
.entry-content .tramite-item:hover .tramite-nombre,
article .tramite-item:hover .tramite-nombre {
    color: var(--tram-color) !important;
}


/* =========================================================================
   PÁGINA COMPLETA DE TRÁMITES
   Shortcode: [todos_tramites]
   ========================================================================= */

.todos-tramites-page {
    padding: 0 !important;
    background: transparent !important;
}

.todos-tramites-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    padding: 30px !important;
}

.todos-tramites-header {
    text-align: center !important;
    margin-bottom: 25px !important;
}

.todos-tramites-header h1 {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    margin: 0 0 8px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif !important;
}

.todos-tramites-header h1 svg {
    width: 28px !important;
    height: 28px !important;
    stroke: #2563eb !important;
}

.todos-tramites-header p {
    font-size: 15px !important;
    color: #64748b !important;
    margin: 0 !important;
}

.todos-tramites-grid {
    display: grid !important;
    gap: 12px !important;
}

/* Grid responsive para trámites */
@media (min-width: 1025px) {
    .todos-tramites-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

@media (max-width: 1024px) {
    .todos-tramites-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
    .todos-tramites-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 480px) {
    .todos-tramites-grid { grid-template-columns: 1fr !important; }
}

.todos-tramites-grid .tramite-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    background: #f8fafc !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    border: 1px solid transparent !important;
}

.todos-tramites-grid .tramite-item:hover {
    background: white !important;
    border-color: var(--tram-color) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    transform: translateY(-2px) !important;
}

.todos-tramites-grid .tramite-icono {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    background: var(--tram-color) !important;
    border-radius: 8px !important;
    color: white !important;
    flex-shrink: 0 !important;
}

.todos-tramites-grid .tramite-icono svg {
    width: 20px !important;
    height: 20px !important;
}

.todos-tramites-grid .tramite-nombre {
    flex: 1 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

.todos-tramites-grid .tramite-item:hover .tramite-nombre {
    color: var(--tram-color) !important;
}

.todos-tramites-grid .tramite-arrow {
    color: #cbd5e1 !important;
    flex-shrink: 0 !important;
    transition: all 0.25s ease !important;
}

.todos-tramites-grid .tramite-item:hover .tramite-arrow {
    color: var(--tram-color) !important;
    transform: translate(2px, -2px) !important;
}

.todos-tramites-count {
    text-align: center !important;
    margin-top: 25px !important;
    padding-top: 25px !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    font-size: 14px !important;
}


/* =========================================================================
   PANEL DE ADMINISTRACIÓN - Meta Box de Trámites
   NOTA: .tramite-field (y sus hijos) tambien se queda en style.css del tema
   porque el CPT "documento" reutiliza esa misma clase en su propio meta box.
   ========================================================================= */

.tramite-field {
    margin-bottom: 20px;
}

.tramite-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.tramite-field input[type="text"],
.tramite-field input[type="url"],
.tramite-field input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.tramite-field input[type="color"] {
    width: 80px;
    height: 40px;
    padding: 0;
    border: none;
    cursor: pointer;
}

.tramite-field .description {
    color: #64748b;
    font-size: 13px;
    margin-top: 5px;
}

.iconos-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.icono-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.icono-option:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.icono-option.selected {
    border-color: #3b82f6;
    background: #dbeafe;
}

.icono-option input {
    display: none;
}

.icono-option svg {
    margin-bottom: 6px;
}

.icono-option span {
    font-size: 11px;
    color: #475569;
    text-align: center;
}

.color-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.color-preview .preview-box {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}
